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

📄 edit.asp

📁 1.多种查询方式
💻 ASP
字号:
<%@ LANGUAGE="VBScript"%>
<%response.buffer=true%>
<%const title="设置前可分发数量"%>
<html>
<head>
<meta http-equiv="Content-Type"content="text/html; charset=gb_2312-80">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">

<title><%=title%></title>
<link rel=stylesheet type=text/css href=../data/forum.css>
<script language=vbscript>
<!--
Sub datacheck()
if input1.name.value=empty then
   msgbox "「数量」不得为空白!", 64, "请输入数量!"
     focusto(1)
     Exit Sub
  End if
if not isNumeric(trim(input1.name.value)) then
   msgbox "请检查数量的正确性!(要为数字)!", 64, "请输入数量!"
     focusto(1)
     Exit Sub
  end if

input1.Submit
End Sub
Sub focusto(x)
        document.input1.elements(x).focus()
End Sub
-->
</script>
</head>
<body topmargin=0 onload="javascript:input1.name.focus();">
<!-- #include file=../data/username.inc-->
<!-- #include file=../data/connect.asp-->
<!-- #include file=../data/myPrg.asp-->
<!-- #include file=../data/flag.inc-->
<%
Showtitle(title)
'检测ID是否为整数
if isnumeric(trim(request("id"))) = false then
	call closedatabase
	Response.Write "<script language=javascript>"
	Response.Write "alert(""id需为整数!!!"");history.go(-1);"
	Response.Write "</script>"
	Response.End 
end if
if flag > 3 then
	call closedatabase
	Response.Write "您无权操作!!!"
	Response.End 
end if
if Request.ServerVariables("REQUEST_METHOD")="POST" then
errmsg=""
name = trim(Request.Form("name"))
firstname = Request.Form("firstname")

sql="select * from inventory where inve_id= "&request("id")
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
if not rs.eof then
  dc_id = rs("inve_dc_id")
  companyid = rs("inve_companyid")
  prod_flag = rs("inve_flag") 
  rs("inve_maysent") = name + rs("inve_maysent")-rs("inve_fore_no")
  rs("inve_total") = name + rs("inve_total")-rs("inve_fore_no")
  rs("inve_fore_no") = name
  rs.update
  rs.Close
  set rs = nothing
  call closedatabase
  response.redirect "typeview.asp?dc_id=" & dc_id &"&prod_flag="&prod_flag&"&companyid="&companyid&"&page="&request("page")&"  "
else
  rs.Close 
  set rs = nothing
  call cosedatabase
  showerror("错误!没有该记录!")  
end if


else
	if flag = 3 then
		sql="select * from inventory where inve_id="&request("id")&" and inve_companyid = "&UserCompanyid&" " 
	elseif flag < 3 then
		sql="select * from inventory where inve_id="&request("id")
	else
		call closedatabase
		Response.Write "您无权限操作!"
		Response.End 
	end if
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
if not rs.eof then
%>
<form action="edit.asp" method="POST" name="input1">
<p align=center><font color=red>请在以下的表格中修改数据</font>
<p>
<table align=center border=0>
<input type=hidden name=id value=<%=request("id")%>>
<input type=hidden name=companyid value=<%=request("companyid")%>>
 <tr>
   <td nowrap><font color=blue>原前可分发数量:</td>
   <td><%=rs("inve_fore_no")%> </td>
 </tr>
  
 <tr>
   <td nowrap><font color=blue>现前可分发数量:</td>
   <td><input class=smallInput type=textbox name="name" value='<%=rs("inve_fore_no")%>'>**</td>
 </tr>
 <tr>
   <td nowrap><font color=blue>入 库 数 量:</td>
   <td><%=rs("inve_ruku")%></td>
 </tr>
 <tr>
   <td nowrap><font color=blue>待 入 库 数 量:</td>
   <td><%=rs("inve_zaitu")%></td>
 </tr>
 <tr>
   <td nowrap><font color=blue>已 分配数量:</td>
   <td><%=rs("inve_fenpei")%></td>
 </tr>
 <tr>
   <td nowrap><font color=blue>出 库 数 量:</td>
   <td><%=rs("inve_chuku")%></td>
 </tr>

 <tr>
   <td>
   <td ><br><input type="hidden" name="firstname" value='<%=rs("inve_fore_no")%>'>
			<input type="hidden" name="page" value='<%=request("page")%>'>
			<input class=buttonface type=button name=ok onclick="datacheck()" value=确定> 
           <input class=buttonface type=reset name=reset value=复原> 
           <input class=buttonface type=button name=retu value=返回 onclick="javascript:history.go(-1)">
 </tr>

</table>
</form>
<%
	rs.close
	set rs = nothing
	call closedatabase
else
	rs.close
	set rs = nothing
	call closedatabase
    showerror("找不到该记录!")
end if

%>

<%end if%>
<!--#include file=../data/copyright.asp-->

</body>
</html>


⌨️ 快捷键说明

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