📄 newwhse.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "inventory","edit"
set objcheck=nothing
if request("id")<>"" then
dim connq
dim rsq
set connq=server.CreateObject("adodb.connection")
set rsq=server.CreateObject("adodb.recordset")
connq.Open connstring
rsq.Open "select * from warehouse where whseid="&request("id"),connq,2,3,1
strwhse=rsq("whse")
strcontact=rsq("contact")
strphone=rsq("phone")
strfax=rsq("fax")
straddress=rsq("address")
strzip=rsq("zip")
strdescription=rsq("description")
strstatus=rsq("status")
rsq.Close
set rsq=nothing
connq.Close
set connq=nothing
end if
if request("whse")<>"" then
dim conn
dim rs
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
if request("id")="" then
rs.Open "select * from warehouse",conn,2,3,1
rs.AddNew
else
rs.Open "select * from warehouse where whseid="&request("id"),conn,2,3,1
end if
rs("whse")=request("whse")
rs("contact")=request("contact")
rs("phone")=request("phone")
rs("fax")=request("fax")
rs("address")=request("address")
rs("zip")=request("zip")
rs("description")=request("description")
rs("status")=request("status")
rs.Update
rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>
<script language=javascript>
window.opener.location.reload();
window.close();
</script>
<%
end if
%>
<HTML><HEAD><TITLE><%if request("id")="" then%>新建仓库<%else%>编辑仓库<%end if%></TITLE>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script language="javascript">
function save(){
if (form1.whse.value==''){
alert('请输入仓库');
form1.whse.focus();
return;
}
form1.submit();
}
</script>
<form name=form1 method="post" id=form1>
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><strong><font size="2" class=title><b><%if request("id")="" then%>新建仓库<%else%>编辑仓库<%end if%></b></font></strong></td>
<td> </td>
</tr>
<tr >
<td height="16" colspan="2" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
<table width="100%" cellpadding="2" cellspacing="1" bgcolor="999999">
<tr bgcolor="white">
<td width="10%" bgcolor="DEDFDE"><div align="center">仓库</div></td>
<td width="40%" bgcolor="efefef" > <input name=whse type=text value="<%=strwhse%>" size="20">
</td>
<td width="10%" bgcolor="DEDFDE"><div align="center">联系人</div></td>
<td width="40%" bgcolor="efefef"> <input name=contact type=text value="<%=strcontact%>" size="20">
</td>
</tr>
<tr bgcolor="white">
<td nowrap bgcolor="DEDFDE"><div align="center">电话</div></td>
<td bgcolor="efefef"> <input name=phone type=text value="<%=strphone%>" size="20"></td>
<td bgcolor="DEDFDE"><div align="center">传真</div></td>
<td bgcolor="efefef"> <input name=fax type=text value="<%=strfax%>" size="20"></td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center">地址</div></td>
<td bgcolor="efefef"> <input name=address type=text value="<%=straddress%>" size="25"></td>
<td bgcolor="DEDFDE"><div align="center">邮编</div></td>
<td bgcolor="efefef"> <input name=zip type=text value="<%=strzip%>" size="20"></td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center">状态</div></td>
<td colspan="3" bgcolor="efefef">
<select name="status" class="stedit">
<option value="-1">--选择仓库状态--</option>
<%getdefine "仓库状态",strstatus%>
</select></td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center">描述</div></td>
<td colspan="3" bgcolor="efefef"> <textarea name="description" cols="45" rows="4"><%=strdescription%></textarea>
</td>
</tr>
</table>
<table>
<tr>
<td height=10 colspan="4"></a></td>
</tr>
<tr>
<td></td>
<td style="cursor:hand"> <a onclick="save();"><img src="../images/button_save.gif"></a> <a onclick="window.close();"><img src="../images/button_cancel.gif"></a>
</td>
<td style="cursor:hand"> </td>
<td style="cursor:hand"> </td>
</tr>
</table>
</form>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -