kq_jbsq_edit_save.asp
来自「OFFICE办公自动化」· ASP 代码 · 共 61 行
ASP
61 行
<%@ 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,syjgs
ssqsy=""
ssyjkssj=""
ssyjjssj=""
syjgs=0
ssqsy=Request.Form("sqsy")
syjkssj=Request.Form("yjkssj")
syjjssj=Request.Form("yjjssj")
syjgs=Request.Form("yjgs")
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 oa_jbmx where sqxh=" & ssqxh,conn,3,2
if not rs.EOF then
rs("yjkssj")=syjkssj
rs("yjjssj")=syjjssj
rs("yjgs")=syjgs
'事后报
if syjjssj<=ssqsj then
rs("sjkssj")=syjkssj
rs("sjjssj")=syjjssj
rs("hzqk")="3"
rs("sjgs")=syjgs
else
rs("sjkssj")=""
rs("sjjssj")=""
rs("hzqk")="0"
rs("sjgs")=0
end if
rs.Update
end if
rs.Close
conn.committrans
set rs=nothing
conn.close
set conn=nothing
Response.Redirect "kq_jbsq.asp"
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?