📄 post_update.asp
字号:
<%@ Language=VBScript %>
<%
'文件功能:wh_tech_bonuses--存储
'编写人员:阿房
'编写时间:2003-08-16 19:57:18
'开发平台:ASP3.0 + MSSQL2000
%>
<!-- #include file="../Common/Cls_DbProcess2.1.asp" -->
<!-- #include file="../wh_tech_bonuses/Cls_wh_tech_bonuses.asp" -->
<!-- #include file="../pub/fun.asp" -->
<!-- #include file="../pub/conn.asp" -->
<%call checklogin()%>
<%if session("right")<2 then
dim lr
lr="<font color=red>"&now()&"有"&session("name")&"试图修改技术部提成 IP:"&REQUEST.SERVERVARIABLES("REMOTE_ADDR")&"</font>"
call savelog("../pub/error.htm",lr)
call savedatalog(now(),session("name"),"试图修改技术部提成",REQUEST.SERVERVARIABLES("REMOTE_ADDR"),2)
response.redirect("../error.asp?msg=2")
end if
dim flag
flag = trim(request.form("flag"))
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="WindSoft Programmer3">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=gb2312">
<TITLE>wh_tech_bonuses--存储</TITLE>
<%
dim mStr_WINDCallType
mStr_WINDCallType = trim(request.querystring("WINDCallType")) '调用方式
dim mStr_WINDURL '请将需要全局传递的变量链接到本变量上,使用方法参见WINDCallType,多个变量之间采用&链接
mStr_WINDURL = "WINDCallType="+Server.URLEncode(mStr_WINDCallType)
%>
</HEAD>
<BODY>
<%
call InitData()
%>
</BODY>
</HTML>
<%
function InitData()
'功能:初始化
'参数:无
'返回:无
dim Str_Mess
Str_Mess = CheckData()
if (Str_Mess<>"") then
call ShowMess(16,Str_Mess)
call WindowBack()
else
if (request.form("Continue")="") then
if len(flag)=0 then
call WindowReplace("Main2.asp?"+mStr_WINDURL)
else
'call WindowReplace("Main2.asp?"+mStr_WINDURL)
response.write("<script language=JavaScript>")
response.write("self.parent.opener.location.href='main.asp?PK_project_id="&flag&"';")
response.write("window.close()")
response.write("</script>")
end if
else
call WindowReplace("Update.asp?"+mStr_WINDURL+"&Continue=1")
end if
end if
end function
function CheckData()
'功能:存储资料
'参数:无
'返回:无
dim Str_Mess
dim Int_Count
dim Str_PK_tbonus_id '主鍵
dim Str_tbonus_memo '备注
dim Str_tbonus_quote '技术部分配比例
dim Str_tbonus_firstsum '项目纯分配金额(前期)
dim Str_tbonus_fpercent '个人前期分配比例
dim Str_tbonus_fisgive '前期是否发放
dim Str_tbonus_fdate '前期发放日期
dim Str_tbonus_lastsum '项目纯分配金额(后期)
dim Str_tbonus_lpercent '个人后期分配比例
dim Str_tbonus_lisgive '后期是否发放
dim Str_tbonus_ldate '后期发放日期
dim Str_employee_id '员工ID
dim Str_project_id '项目ID
Str_PK_tbonus_id = trim(request.form("PK_tbonus_id"))
Str_tbonus_memo = trim(request.form("tbonus_memo"))
Str_tbonus_quote = 3
Str_tbonus_firstsum = trim(request.form("tbonus_firstsum"))
Str_tbonus_fpercent = trim(request.form("tbonus_fpercent"))
Str_tbonus_fisgive = trim(request.form("tbonus_fisgive"))
Str_tbonus_fdate = trim(request.form("tbonus_fdate"))
Str_tbonus_lastsum = trim(request.form("tbonus_lastsum"))
Str_tbonus_lpercent = trim(request.form("tbonus_lpercent"))
Str_tbonus_lisgive = trim(request.form("tbonus_lisgive"))
Str_tbonus_ldate = trim(request.form("tbonus_ldate"))
Str_employee_id = trim(request.form("employee_id"))
Str_project_id = trim(request.form("project_id"))
Str_Mess = ""
Int_Count = 1
if (not (IsNumeric(Str_tbonus_firstsum))) then
Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [项目纯分配金额(前期)] 一栏必须为数值!"
Int_Count = Int_Count+1
end if
if (not (IsNumeric(Str_tbonus_fpercent))) then
Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [个人前期分配比例] 一栏必须为数值!"
Int_Count = Int_Count+1
end if
if (IsNumeric(Str_tbonus_fpercent)) then
if Str_tbonus_fpercent>100 or Str_tbonus_fpercent<0 then
Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [个人前期应分配比例] 一栏必须为0-100数值!"
Int_Count = Int_Count+1
end if
end if
if (trim(Str_tbonus_fisgive)="") then
Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [前期是否发放] 一栏不能为空!"
Int_Count = Int_Count+1
end if
if (trim(Str_employee_id)="") then
Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [员工姓名] 一栏不能为空!"
Int_Count = Int_Count+1
end if
if (trim(Str_project_id)="") then
Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [参与项目] 一栏不能为空!"
Int_Count = Int_Count+1
end if
if ((IsNumeric(Str_tbonus_lpercent))) then
if Str_tbonus_lpercent>100 or Str_mbonus_lercent<0 then
Str_Mess = Str_Mess +"\n"+cstr(Int_Count) + ") [个人后期应分配比例] 一栏必须为0-100数值!"
Int_Count = Int_Count+1
end if
end if
if ((IsNumeric(Str_tbonus_lastsum))) then
if (trim(Str_tbonus_lisgive)="") and Str_tbonus_lastsum>0 then
Str_Mess = Str_Mess +"\n"+ cstr(Int_Count) + ") [后期是否发放] 一栏不能为空!"
Int_Count = Int_Count+1
end if
end if
if (Str_Mess<>"") then
CheckData= "对不起,您录入的资料存在以下错误:" _
+"\n"+ Str_Mess _
+"\n"+"\n"+"请检查资料或联系管理员!"
exit function
end if
CheckData = mCls_wh_tech_bonuses.SaveData(Str_PK_tbonus_id, Str_tbonus_memo, Str_tbonus_quote, Str_tbonus_firstsum, Str_tbonus_fpercent, Str_tbonus_fisgive, Str_tbonus_fdate, Str_tbonus_lastsum, Str_tbonus_lpercent, Str_tbonus_lisgive, Str_tbonus_ldate, Str_employee_id, Str_project_id)
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -