系统管理员选项
以姓名排序进入
以部门排序进入
以生日排序进入
2.4.1修改员工个人信息
代码如下:
'更新用户个人信息
conn.Execute"updatePSLoginsset"_
&"EmailAddress='"&Request.Form("EmailAddress")&"',"_
&"InternalPhone='"&Request.Form("InternalPhone")&"',"_
&"HomePhone='"&Request.Form("HomePhone")&"',"_
&"MobilePhone='"&Request.Form("MobilePhone")&"',"_
&"QQ='"&Request.Form("QQ")&"',"_
&"HomeAddress='"&Request.Form("HomeAddress")&"',"_
&"Birthday='"&Request.Form("BirthdayYear")&"-"_
&Request.Form("BirthdayMonth")&"-"_
&Request.Form("BirthdayDay")&"'"_
&"WhereName='"&Request.Form("Name")&"'"
TheMessage="您的个人信息已经修改成功"
else
'如果用户输入了新密码
ifRequest.Form("NewPassword")=Request.Form("ConfirmNewPassword")then
Session("Name")=Request.Form("Name")
Session("Password")=Request.Form("NewPassword")
Session("EmailAddress")=Request.Form("EmailAddress")
Session("InternalPhone")=Request.Form("InternalPhone")
Session("HomePhone")=Request.Form("HomePhone")
Session("MobilePhone")=Request.Form("MobilePhone")
Session("HomeAddress")=Request.Form("HomeAddress")
Session("Birthday")=Request.Form("BirthdayYear")&"-"&Request.Form("BirthdayMonth")&"-"&Request.Form("BirthdayDay")
Session("QQ")=Request.Form("QQ")
Session("HomeAddress")=Request.Form("HomeAddress")
conn.Execute"updatePSLoginsset"_
&"EmailAddress='"&Request.Form("EmailAddress")&"',"_
&"InternalPhone='"&Request.Form("InternalPhone")&"',"_
&"HomePhone='"&Request.Form("HomePhone")&"',"_
&"MobilePhone='"&Request.Form("MobilePhone")&"',"_
&"QQ='"&Request.Form("QQ")&"',"_
&"HomeAddress='"&Request.Form("HomeAddress")&"',"_
&"Birthday='"&Request.Form("BirthdayYear")&"-"_
&Request.Form("BirthdayMonth")&"-"_
&Request.Form("BirthdayDay")&"'"_
&"WhereName='"&Request.Form("Name")&"'"
TheMessage="您的个人信息已经修改成功"
else
TheMessage="新密码输入不一致,请重试"
endif
endif
else
TheMessage="您输入的密码有误,请重试"
endif
else
TheMessage="请在下面修改您的个人信息"
endif
用户信息修改表格:
姓名
"SIZE=51MAXLENGTH=50>
电子邮件地址
"SIZE=51MAXLENGTH=50>
内部分机电话
"SIZE=51MAXLENGTH=50>
移动电话
"SIZE=51MAXLENGTH=50>
家庭电话
"SIZE=51MAXLENGTH=50>
QQ号
"SIZE=51MAXLENGTH=50>
生日
<%
YearCounter=Year(Session("Birthday"))
%>
"> <%Response.WriteYearCounter%>
<%
YearCounter=2000
DountilYearCounter<=1900
%>
"> <%Response.WriteYearCounter%>
<%
YearCounter=YearCounter-1
loop
%>
年
<%
MonthCounter=Month(Session("Birthday"))
%>
"> <%Response.WriteMonthCounter%>
<%
MonthCounter=1
DountilMonthCounter>12
%>
"> <%Response.WriteMonthCounter%>
<%
MonthCounter=MonthCounter+1
loop
%>
月
<%
DayCounter=Day(Session("Birthday"))
%>
"> <%Response.WriteDayCounter%>
<%
DayCounter=1
DountilDayCounter>31
%>
"> <%Response.WriteDayCounter%>
<%
DayCounter=DayCounter+1
loop
%>
日
家庭住址
"SIZE=51MAXLENGTH=50>
请输入您的密码
请输入您的新密码
请确认您的新密码
2.4.2添加新用户信息
代码如下:
添加新用户
ifnotIsEmpty(Request.Form("Add"))then
TheLoginID=Request.Form("LoginID")
TheName=RealString(Request.Form("Name"))
TheEmailAddress=Request.Form("EmailAddress")
ThePassword=RealString(Request.Form("Password"))
Session("Password")=Request.Form("Password")
TheDepartment=Request.Form("Department")
ThePosition=RealString(Request.Form("Position"))
TheInternalPhone=Request.Form("InternalPhone")
TheHomePhone=Request.Form("HomePhone")
TheMobilePhone=Request.Form("MobilePhone")
TheQQ=Request.Form("QQ")
TheHomeAddress=Request.Form("HomeAddress")
TheIsSystemManager=Request.Form("IsSystemManager")
TheBirthday=Request.Form("BirthdayYear")&"-"_
&Request.Form("BirthdayMonth")&"-"&Request.Form("BirthdayDay")
TheIsFinancialManager=Request.Form("IsFinancialManager")
'对用户输入进行校验,合格则添加新用户信息
iflen(ThePassword)=0orlen(TheName)=0orlen(TheLoginID)=0then
TheMessage="登录名,姓名,密码不能为空,无法添加新用户"
else
strSQL="INSERTINTOPSLogins(LoginID,Name,EmailAddress,"_
&"Department,Position,Birthday,HomePhone,QQ,HomeAddress,"_
&"MobilePhone)values("_
&"'"&TheLoginID&"',"_
&"'"&TheName&"',"_
&"'"&TheEmailAddress&"',"_
&"'"&TheDepartment&"',"_
&"'"&ThePosition&"',"_
&"'"&TheBirthday&"',"_
&"'"&TheHomePhone&"',"_
&"'"&TheQQ&"',"_
&"'"&TheHomeAddress&"',"_
&"'"&TheMobilePhone&"')"
db.ExecutestrSQL
TheMessage="新用户添加成功"
endif
else
TheMessage="请在下面添加新用户"
endif
添加新用户表格
登录名
姓名
输入新密码
部门
<%
DoUntilRSDepartments.EOF
%>
"> <%Response.WriteRSDepartments("DepartmentName")%>
<%
RSDepartments.Movenext
loop
%>
职位
普通
主管
经理
电子邮件地址
内部分机电话
移动电话
家庭电话
QQ号
家庭住址
是否系统管理员
False
True
生日
<%
YearCounter=2000
DountilYearCounter<=1900
%>
"> <%Response.WriteYearCounter%>
<%
YearCounter=YearCounter-1
loop
%>
年
<%
MonthCounter=1
DountilMonthCounter>12
%>
"> <%Response.WriteMonthCounter%>
<%
MonthCounter=MonthCounter+1
loop
%>
月
<%
DayCounter=1
DountilDayCounter>31
%>
"> <%Response.WriteDayCounter%>
<%
DayCounter=DayCounter+1
loop
%>
日
是否财务管理员
False True
2.4.3删除用户信息:
ifnotIsEmpty(Request.Form("Delete"))then
ifnotIsEmpty(Request.Form("SelectWho"))then
conn.Execute"deletefromPSLoginswhereLoginID='"&Request.Form("SelectWho")&"'"
TheMessage="记录已被删除"
2.5用户进入公司财务信息管理系统
代码如下:
'用户选择了添加财务记录选项
ifRequest.Form("SendTo")="AddFinancialRecord"then
ifSession("IsFinancialManager")=Truethen
Response.Redirect"AddFinancialRecord.asp"
else
TheMessage="您不是财务管理员,无权进入此选项"
endif
'用户选择了财务报表选项
elseifRequest.Form("SendTo")="FinancialReport"then
Response.Redirect"FinancialReport.asp"
'用户选择了修改财务记录选项
else
ifSession("IsFinancialManager")=Truethen
Response.Redirect"ModifyFinancialRecord.asp"
else
TheMessage="您不是财务管理员,无权进入此选项"
2.5.1添加财务记录
代码如下:
'添加财务项目
ifnotIsEmpty(Request.Form("AddFinancialProject"))then
Response.Redirect"AddFinancialProject.asp"
endif
'添加财务记录信息
ifnotIsEmpty(Request.Form("AddRecord"))then
'从列表里选择财务记录经手人
ifRequest.Form("RadioFinancialRecordName")="FromList"then
TheName=Cstr(Request.Form("SelectFinancialRecordName"))
'用户自己输入财务记录经手人
else
TheName=Cstr(Request.Form("TextFinancialRecordName"))
endif
'从列表里选择财务记录所属项目
ifRequest.Form("RadioFinancialProject")="FromList"then
TheProjectName=Cstr(Request.Form("SelectFinancialProject"))
'用户自己输入财务记录所属项目
else
TheProjectName=Cstr(Request.Form("TextFinancialProject"))
endif
'对用户输入的财务记录信息进行校验
ifLen(Trim(TheName))=0orLen(Trim(TheProjectName))=0then
TheMessage="记录中记录经手人、记录隶属财务项目不能为空,无法添加此记录,请重填记录
上一篇:ASP办公信息管理系统(论文和程序)
下一篇:试析影响公路路面平整度的因素及应采取的施工措施