kq_qjsq_edit_save.asp

来自「OFFICE办公自动化」· ASP 代码 · 共 59 行

ASP
59
字号
<%@ Language=VBScript.Encode %>
<%Response.Expires=0%>
<%
    dim ssqxh
    ssqxh=Request.Form("sqxh")
    if ssqxh & ""="" then
        Response.Write "申请序号错误"
        Response.End
    end if 
%>
<!-- #include file="../share/connectdb.asp" -->
<!-- #include file="../inc/pubfun_a.inc" -->
<%
	Dim rs
	set rs=server.CreateObject("ADODB.recordset")
	dim ssqsy
	dim syjkssj,syjjssj,sjb,ssqsj
	ssqsy=""
	ssyjkssj=""
	ssyjjssj=""
	sjb=""
	ssqsy=Request.Form("sqsy")
	syjkssj=Request.Form("yjkssj")
	syjjssj=Request.Form("yjjssj")
	sjb=Request.Form("jb")
	ssqsj=formatdatetime_activenew(now,"yyyy-mm-dd hh:nn:ss")
	conn.begintrans
	'保存申请基本信息
	rs.Open "Select * from oa_sqjbxx where sqxh=" & ssqxh,conn,3,2
	if not rs.EOF then
	    rs("sqsy")=ssqsy
	    rs.Update
	end if
    rs.Close
	'保存请假单信息
	rs.Open "select * from kq_qjd where sqxh=" & ssqxh,conn,3,2
	if not rs.EOF then
	    rs("jb")=sjb
	    rs("yjkssj")=syjkssj
	    rs("yjjssj")=syjjssj
	    '事后请假
	    if syjjssj<=ssqsj then
	        rs("sjkssj")=syjkssj
	        rs("sjjssj")=syjjssj
	        rs("xjqk")="3"
	    else
	        rs("sjkssj")=""
	        rs("sjjssj")=""
	        rs("xjqk")="0"
	    end if
	    rs.Update
	end if
	rs.Close
	conn.committrans
  set rs=nothing
  conn.close
  set conn=nothing
	Response.Redirect "kq_qjsq.asp"
%> 

⌨️ 快捷键说明

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