⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 post_update.asp

📁 这是一个自己研发的薪酬管理系统
💻 ASP
字号:
<%@ Language=VBScript %>
<%
'文件功能:view_salaries--存储
'编写人员:阿房
'编写时间:2003-09-03 17:08:12
'开发平台:ASP3.0 + MSSQL2000
'版本:1.1.20030908.01
%>

<!-- #include file="../Common/Cls_DbProcess2.1.asp" -->
<!-- #include file="../view_salaries/Cls_view_salaries.asp" -->

<HTML>
<HEAD>
    <META NAME="GENERATOR" CONTENT="WindSoft Programmer3">
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=gb2312">
    <TITLE>view_salaries--存储</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
            select case mStr_WINDCallType
                case else:
                    call WindowReplace("Main.asp?"+mStr_WINDURL)
            end select
        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_salary_id                       '主鍵
dim Str_salary_id                          'salary_id
dim Str_salary_date                        'salary_date
dim Str_salary_month                       'salary_month
dim Str_employee_id                        'employee_id
dim Str_salary_info1                       'salary_info1
dim Str_salary_info2                       'salary_info2
dim Str_salary_memo                        'salary_memo
dim Str_Expr1                              'Expr1

    Str_PK_salary_id                       = trim(request.form("PK_salary_id"))
    Str_salary_id                          = trim(request.form("salary_id"))
    Str_salary_date                        = trim(request.form("salary_date"))
    Str_salary_month                       = trim(request.form("salary_month"))
    Str_employee_id                        = trim(request.form("employee_id"))
    Str_salary_info1                       = trim(request.form("salary_info1"))
    Str_salary_info2                       = trim(request.form("salary_info2"))
    Str_salary_memo                        = trim(request.form("salary_memo"))
    Str_Expr1                              = trim(request.form("Expr1"))

    Str_Mess           =  ""
    Int_Count          =  1

    if (not (IsNumeric(Str_salary_id))) then
        Str_Mess  = Str_Mess  +"\n"+ cstr(Int_Count) + ") [salary_id] 一栏必须为数值!"
        Int_Count = Int_Count+1
    end if
    if (not (IsDate(Str_salary_date))) then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [salary_date] 一栏必须为日期!"
        Int_Count = Int_Count+1
    end if
    if (not (IsNumeric(Str_salary_month))) then
        Str_Mess  = Str_Mess  +"\n"+ cstr(Int_Count) + ") [salary_month] 一栏必须为数值!"
        Int_Count = Int_Count+1
    end if
    if (not (IsNumeric(Str_employee_id))) then
        Str_Mess  = Str_Mess  +"\n"+ cstr(Int_Count) + ") [employee_id] 一栏必须为数值!"
        Int_Count = Int_Count+1
    end if
    if (trim(Str_salary_info1)="") then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [salary_info1] 一栏不能为空!"
        Int_Count = Int_Count+1
    end if
    if (trim(Str_salary_info2)="") then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [salary_info2] 一栏不能为空!"
        Int_Count = Int_Count+1
    end if
    if (trim(Str_salary_memo)="") then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [salary_memo] 一栏不能为空!"
        Int_Count = Int_Count+1
    end if
    if (trim(Str_Expr1)="") then
        Str_Mess  = Str_Mess +"\n"+ cstr(Int_Count) + ") [Expr1] 一栏不能为空!"
        Int_Count = Int_Count+1
    end if

    if (Str_Mess<>"") then
        CheckData= "对不起,您录入的资料存在以下错误:" _
        +"\n"+ Str_Mess  _
        +"\n"+"\n"+"请检查资料或联系管理员!"
        exit function
    end if
    CheckData = mCls_view_salaries.SaveData(Str_PK_salary_id, Str_salary_id, Str_salary_date, Str_salary_month, Str_employee_id, Str_salary_info1, Str_salary_info2, Str_salary_memo, Str_Expr1)
end function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -