equest.Form("FundTypeA"))or_
notIsNumeric(Request.Form("FundTypeB"))or_
notIsNumeric(Request.Form("FundTypeC"))or_
notIsNumeric(Request.Form("FundTypeD"))then
TheMessage="记录中的款项字段中出现了非数字内容,无法添加此记录,请重填记录"
Warning=true
else
TheFundTypeA=CCur(Request.Form("FundTypeA"))
TheFundTypeB=CCur(Request.Form("FundTypeB"))
TheFundTypeC=CCur(Request.Form("FundTypeC"))
TheFundTypeD=CCur(Request.Form("FundTypeD"))
TheSummary=Cstr(Request.Form("Summary"))
TheRemark=Cstr(Request.Form("Remark"))
TheAccountName=Cstr(Session("Name"))
TheDate=Date
TheSum=CCur(TheFundTypeA+TheFundTypeB+TheFundTypeC+TheFundTypeD)
setRSDoExistName=conn.execute("select*fromPSLoginswhereName='"&TheName&"'")
setRSDoExistProject=conn.execute("select*fromFinancialProjectwhereFinancialProjectName='"_
&TheProjectName&"'")
'判断用户输入的财务记录经手人是否存在
ifRSDoExistName.Eofthen
TheMessage="您输入的记录中财务经手人不存在,请重新输入(如果是新员工请添加此员工记录)"
Warning=true
'判断用户输入的财务记录所属财务项目是否存在
elseifRSDoExistProject.Eofthen
TheMessage="您输入的记录中财务项目不存在,请重新输入(如果是新项目,请添加财务项目)"
Warning=true
else
TheDepartment=RSDoExistName("Department")
'添加新财务记录到数据库
'sql="insertinto用户记录(用户名,密码,权限)values('"&name&"','"&mima&"','一般用户')"
conn.Execute"InsertintoFinancialRecord(Name,Department,ProjectName,"_
&"FundTypeA,FundTypeB,"_
&"FundTypeC,FundTypeD,Summary,Remark,AddDate,AccountName)values("_
&"'"&TheName&"',"_
&"'"&TheDepartment&"',"_
&"'"&TheProjectName&"',"_
&"'"&TheFundTypeA&"',"_
&"'"&TheFundTypeB&"',"_
&"'"&TheFundTypeC&"',"_
&"'"&TheFundTypeD&"',"_
&"'"&TheSummary&"',"_
&"'"&TheRemark&"',"_
&"'"&TheDate&"',"_
&"'"&TheAccountName&"')"
2.5.2修改财务记录
代码如下:
TheMessage="请在下面修改此条财务记录"
setRSThisRecord=conn.Execute("select*fromFinancialRecord"_
&"whereID="&Request.Form("RadioFinancialRecord"))
QueryLabel=3
'用户对选定的财务记录进行了更新
elseifnotIsEmpty(Request.Form("UpdateRecord"))then
'校验用户的输入
ifnotIsNumeric(Request.Form("UpdateFundTypeA"))or_
notIsNumeric(Request.Form("UpdateFundTypeB"))or_
notIsNumeric(Request.Form("UpdateFundTypeC"))or_
notIsNumeric(Request.Form("UpdateFundTypeD"))then
TheMessage="记录中的款项字段中出现了非数字内容,无法修改此记录,请重填记录"
Warning=true
QueryLabel=3
else
setRSLinkedDepartment=conn.Execute("selectDepartmentfromPSLoginswhereName='"_
&Request.Form("UpdateName")&"'")
TheName=Request.Form("UpdateName")
TheDepartment=RSLinkedDepartment("Department")
TheProjectName=Request.Form("UpdateProjectName")
TheFundTypeA=CCur(Request.Form("UpdateFundTypeA"))
TheFundTypeB=CCur(Request.Form("UpdateFundTypeB"))
TheFundTypeC=CCur(Request.Form("UpdateFundTypeC"))
TheFundTypeD=CCur(Request.Form("UpdateFundTypeD"))
TheSummary=Cstr(Request.Form("UpdateSummary"))
TheRemark=Cstr(Request.Form("UpdateRemark"))
TheModifyDate=Date
TheSum=CCur(TheFundTypeA+TheFundTypeB+TheFundTypeC+TheFundTypeD)
2.5.3删除财务记录
elseifnotIsEmpty(Request.Form("DeleteProject"))then
'判断用户是否是财务部门主管
ifSession("Department")="财务部"andSession("Position")="主管"then
conn.execute("deletefromFinancialProjectwhereFinancialProjectID="_
&Request.Form("RadioFinancialProject"))
TheMessage="您已经删除了此财务项目"
else
TheMessage="您不是财务部主管,无权删除此财务项目"
Warning=true
endif
2.5.4生成财务报表
代码如下:
'报表的排序方式
ifRequest.Form("ReportOrder")="Name"then
TheOrder="姓名"
elseifRequest.Form("ReportOrder")="ProjectName"then
TheOrder="财务项目名称"
elseifRequest.Form("ReportOrder")="AccountName"then
TheOrder="会计经手人"
else
TheOrder="记录添加日期"
endif
'报表是否有时间期限
ifRequest.Form("DateLimit")="Yes"then
StartDate=Request.Form("StartYear")&"-"&Request.Form("StartMonth")_
&"-"&Request.Form("StartDay")
EndDate=Request.Form("EndYear")&"-"&Request.Form("EndMonth")_
&"-"&Request.Form("EndDay")
TheTimeLimit="时间期限:从"&CStr(StartDate)&"到"&Cstr(EndDate)&""
else
StartDate="1900-1-1"
EndDate="2100-1-1"
TheTimeLimit="时间期限:无"
endif
'生成总流水账报表
ifRequest.Form("FinancialReportType")="AllFinancialRecord"then
ifSession("Position")="经理"or(Session("Department")="财务部"and_
Session("Position")="主管")then
SqlString="select*fromFinancialRecordwhereAddDate>=#"&StartDate_
&"#andAddDate<=#"&EndDate&"#orderby"&Request.Form("ReportOrder")
SetRSAllFinancialRecord=conn.Execute(SqlString)
TheMessage=TheTimeLimit&"总流水账报表按-"&TheOrder&"-排序如下"
label=true
ReportLabel=True
else
TheMessage="您不是[经理/财务部主管],无权生成总流水账报表"
Warning=true
endif
'生成部门财务报表
elseifRequest.Form("FinancialReportType")="DepartmentFinancialRecord"then
ifSession("Position")="经理"or(Session("Department")=Request.Form("DepartmentName")and_
Session("Position")="主管")then
SetRSAllFinancialRecord=conn.Execute("select*fromFinancialRecordwhereDepartment='"_
&Request.Form("DepartmentName")&"'andAddDate>=#"&StartDate&"#andAddDate<=#"_
&EndDate&"#orderby"&Request.Form("ReportOrder"))
ReportLabel=true
TheMessage=TheTimeLimit&"部门-"&Request.Form("DepartmentName")&"-财务报表按-"_
&TheOrder&"-排序如下"
else
TheMessage="您不是[经理/此部门主管],无权生成部门财务报表"
Warning=true
endif
'生成项目财务报表
elseifRequest.Form("FinancialReportType")="FinancialProjectReport"then
SetRSFinancailManager=conn.execute("selectFinancialManagerfromFinancialProject"_
&"whereFinancialProjectName='"&Request.Form("ProjectName")&"'")
ifSession("Name")=RSFinancailManager("FinancialManager")orSession("Position")="经理"then
SetRSAllFinancialRecord=conn.Execute("select*fromFinancialRecordwhereProjectName='"_
&Request.Form("ProjectName")&"'andAddDate>=#"&StartDate&"#andAddDate<=#"_
&EndDate&"#orderby"&Request.Form("ReportOrder"))
ReportLabel=true
TheMessage=TheTimeLimit&"项目-"&Request.Form("ProjectName")&"-财务报表按-"_
&TheOrder&"-排序如下"
else
TheMessage="您不是[经理/此财务项目主管],无权生成总流水账报表"
Warning=true
endif
'生成个人财务报表
else
ifSession("Position")="经理"orSession("Name")=Request.Form("Person")then
SetRSAllFinancialRecord=conn.Execute("select*fromFinancialRecordwhereName='"_
&Request.Form("Person")&"'andAddDate>=#"&StartDate&"#andAddDate<=#"&EndDate_
&"#orderby"&Request.Form("ReportOrder"))
SetRSAllFinancialRecord=conn.Execute("select*fromFinancialRecordwhereName='"_
&Request.Form("Person")&"'andAddDate>='"&StartDate&"'andAddDate<='"&EndDate_
&"'orderby"&Request.Form("ReportOrder"))
ReportLabel=true
TheMessage=TheTimeLimit&"用户-"&Request.Form("Person")&"-个人财务报表按-"_
&TheOrder&"-排序如下"
TheMessage="select*fromFinancialRecordwhereName='"_
&Request.Form("Person")&"'andAddDate>='"&StartDate&"'andAddDate<='"&EndDate_
&"'orderby"&Request.Form("ReportOrder")
else
TheMessage="您不是[经理/此个用户],无权生成此用户个人财务报表"
Warning=true
endif
endif
else
TheMessage="请选择您要生成的报表类型"
endif
setRSDepartments=conn.Execute("selectDepartmentNamefromDepartments"_
&"orderbyDepartmentName")
setRSProjectName=conn.Execute("select*fromFinancialProjectorderbyFinancialProjectName")
setRSPerson=conn.Execute("selectNamefromPSLoginsorderbyName")
%>
2.6用户进入公司内部信息交流系统
代码如下:
公司内部信息交流系统-> 通知公告牌
公司内部信息交流系统-> 内部意见箱
今日公司有如下公共通知
通知发送日期
通知内容
通知类型
通知发送者
有效天数
<%
DoUntilRSPublicMessage.EOF
%>
<%Response.writeRSPublicMessage("MessageSendDate")%>
<%Response.writeRSPublicMessage("MessageContent")%>
<%Response.writeRSPublicMessage("MessageType")%>
<%Response.writeRSPublicMessage("MessageSender")%>
<%Response.writeRSPublicMessage("MessageValidTime")%>
<%
RSPublicMessage.MoveNext
Loop
%>
2.6.1通知公告牌
代码如下:
'用户选择发送新通知
ifnotIsEmpty(Request.Form("SendNewMessage"))then
Response.Redirect"SendNewMessage.asp"
'用户选择删除某条通知
elseifnotIsEmpty(Request.Form("DeleteThisMessage"))then
ifnotIsEmpty(Request.Form("CheckMessage"))then
setRSThisMessage=conn.Execute("select*fromMessageBoardwhereMessageID="_
&Request.Form("CheckMessage"))
ifSession("IsSystemManager")then
conn.Execute"deletefromMessageBoardwhereMessageID="&Request.Form("CheckMessage")
TheMessage="此条通知已删除"
elseifRSThisMessage("MessageSender")=Session("Name")then
conn.Execute"deletefromMessageBoardwhereMessageID='"_
&Request.Form("CheckMessage")&"'"
TheMessage="此条通知已删除"
elseifRSThisMessage("MessageType")=Session("Name")then
conn.Execute"deletefromMessageBoardwhereMessageID='"_
&Request.Form("CheckMessage")&"'"
TheMessage="此条通知已删除"
else
TheMessage="您不是系统管理员,也不是此条通知的发送者,无权删除此条通知"
Warning=true
endif
else
TheMessage="日程通知看板"
endif
'用户选择修改某条通知
elseifnotIsEmpty(Request.Form("ModifyThisMessage"))then
ifnotIsEmpty(Request.Form("CheckMessage"))then
setRSThisMessage=conn.Exe
上一篇:
ASP办公信息管理系统(论文和程序)
下一篇:
多年来只想说一句,我不怪你