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

📄 lendsave.asp

📁 财务管理系统 报账等基本功能实现 有完整的实现
💻 ASP
字号:
<!--#include file="../../conndb.asp"-->
<html>
<head>
<title>保存资料借阅信息</title>
</head>
<body>
<%
 Dim StrAction,lid
 '得到动作参数,如果为add则表示添加操作,如果为edit则表示更改操作
 StrAction = Request.QueryString("action")
 Set rs = Server.CreateObject("ADODB.RECORDSET")
 '判断借阅数量是否小于库存数量
 sql = "Select * From Information Where InfoNo='" & Request("ino") & "'" 
 Set rs = Conn.Execute(sql)
 If Not rs.EOF Then
   iCnt = rs("iCount")
 Else
   iCnt = 0
 End If
 If (iCnt-Request("count"))<0 Then
   Response.Write "<Script>alert('资料库存数量不足,不能借阅!');history.back();</Script>"
   Response.End()
 End If 
 rs.Close()
 If StrAction="edit" Then
   lid = Request.QueryString("lid")
   '更改信息
   sql="Select * From InfoLend Where LendId=" & lid 
   rs.Open sql,Conn,1,3
   rs("InfoNo")= Request("ino")
   rs("LendDate") = Request("ldate")
   rs("LendCount") = Request("count")
   rs("EmpId") = Request("empid")
   rs.Update
   Response.Write "<h3>资料借阅信息成功保存</h3>"
 Else
   '在数据库表InfoLend中插入新信息
   sql="Select * From InfoLend"
   rs.Open sql,Conn,1,3
   rs.AddNew
   rs("InfoNo")= Request("ino")
   rs("LendDate") = Request("ldate")
   rs("LendCount") = Request("count")
   rs("EmpId") = Request("empid")
   rs("Flag") = 0
   rs.Update
   Response.Write "<h3>资料借阅信息成功保存</h3>"
 End If
 Set rs = Nothing
%>
</body>
<script language="javascript">
  // 刷新父级窗口,延迟此关闭
  opener.location.reload();
  setTimeout("window.close()",600);
</script>
</html>

⌨️ 快捷键说明

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