?? newname.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=forum.css>
</head>
<body topmargin="0" onload=this.document.input.name.focus();>
<!--#include file=myPrg.asp-->
<!--#include file=opendb.inc-->
<%
CheckLogin
Showtitle(title)
getStorage(session("storage"))
%>
<%
if Request.ServerVariables("REQUEST_METHOD")="POST" then
msg=""
if request("name")="" then
msg=msg+"請輸入物品名稱!<br>"
end if
if request("unit")="" then
msg=msg+"請輸入計量單位!<br>"
end if
if request("gg")="" then
msg=msg+"請輸入規格!<br>"
end if
if request("hh")="" then
msg=msg+"請輸入貨號!<br>"
end if
if request("hm")="" then
msg=msg+"請輸入貨名!<br>"
end if
if not IsNumeric(request("max")) then
msg=msg+"請檢查最高存量的正確性!(要為數字)<br>"
else
if request("max")<=0 then
msg=msg+"請檢查最高數量的正確性!(要為大于0)<br>"
end if
end if
if not IsNumeric(request("min")) then
msg=msg+"請檢查最低存量的正確性!(要為數字)<br>"
else
if request("min")<=0 then
msg=msg+"請檢查最低存量的正確性!(要為大于0)<br>"
end if
end if
if msg<>"" then
showerror(msg)
end if
sql="select * from stock where name='"&request.form("name")&"' and storage_id="&session("storage")&" and unit='"&request.form("unit")&"' and rule='"&request.form("gg")&"'"
rs.open sql,conn,3,2
if rs.eof then
rs.addnew
rs("name")=request.form("name")
rs("storage_id")=session("storage")
rs("type_id")=session("prnt")
rs("unit")=request.form("unit")
rs("rule")=request.form("gg")
rs("no")=request.form("hh")
rs("hm")=request.form("hm")
rs("max")=request.form("max")
rs("min")=request.form("min")
rs("address")=request.form("address")
rs("memo")=request.form("memo")
rs.update
ShowSuccess("數據已經成功保存!")
else
showerror("該名稱及其單位和規格的品名已經存在,請重新輸入")
end if
rs.close
else
%>
<form action="newname.asp" method="POST" name="input">
<p align=center><font color=red>請在以下的表格中填入相關的數據</font>
<p>
<table align=center border=0>
<tr>
<td nowrap><font color=blue>類別:</td>
<td><%gettype(session("prnt"))%></td>
</tr>
<tr>
<td nowrap><font color=blue>名稱:</td>
<td><input class=smallInput type=textbox name="name" value=''>**</td>
</tr>
<tr>
<td nowrap><font color=blue>計量單位:</td>
<td><input class=smallInput type=textbox name="unit" value=''>**</td>
</tr>
<tr>
<td nowrap><font color=blue>規格:</td>
<td><input class=smallInput type=textbox name="gg" value=''>**</td>
</tr>
<tr>
<td nowrap><font color=blue>貨號:</td>
<td><input class=smallInput type=textbox name="hh" value=' '>**</td>
</tr>
<tr>
<td nowrap><font color=blue>貨名:</td>
<td><input class=smallInput type=textbox name="hm" value=' '>**</td>
</tr>
<tr>
<td nowrap><font color=blue>最高存量:</td>
<td><input class=smallInput type=textbox name="max" value=''>**</td>
</tr>
<tr>
<td nowrap><font color=blue>最低存量:</td>
<td><input class=smallInput type=textbox name="min" value=''>**</td>
</tr>
<tr>
<td nowrap><font color=blue>儲存地點:</td>
<td><input class=smallInput type=textbox name="address" value=''>**</td>
</tr>
<tr>
<td valign="top"><font color=blue>相關說明:</td>
<td><textarea class=smallarea name=memo rows=3 cols=40> </textarea></td>
</tr>
<tr>
<td>
<td><br><input class=buttonface type=submit name=ok value=確定>
<input class=buttonface type=reset name=reset value=復原>
<input class=buttonface type=button name=retu value=返回 onclick=history.go(-1)>
</tr>
</table>
</form>
<%end if%>
<!--#include file=copyright.asp-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -