?? xx_addproducts.asp
字號:
<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file=function.asp-->
<html>
<head><link href="css.css" rel="stylesheet" type="text/css">
<title>祥星送貨單打印系統--增加送貨單</title>
</head>
<body>
<%
Dim rss
Dim p_id,len_id,i,zero
Set rss=Conn.Execute("Select Product_ID From [XX_Products] Order By ID Desc")
if not rss.eof then
p_id = rss(0)
else
p_id=0
end if
p_id = Clng(p_id)+1
len_id = Len(p_id)
If len_id<10 Then
For i=1 To (10-len_id)
zero = zero & "0"
Next
p_id = zero & p_id
End if
rss.Close
Set rss=Nothing
%>
<center><table border=1 width=100% cellpadding=0 cellspacing=0 bordercolorlight=#cccccc bordercolordark=#ffffff>
<tr bgcolor=#efefef><td align=center>商品編號</td><td align=center>商品名稱</td><td align=center>商品規格</td><td align=center>商品類別</td><td align=center>商品單位</td><td align=center>操作</td></tr>
<form action="XX_Save.asp?action=ManPro" method=post id=form1 name=form1 onSubmit="return chk(this)">
<tr bgcolor=#efefef><td align=center><input name="product_id" type="text" id="product_id" value="<%=p_id%>" size="15" maxlength="20" readonly></td>
<td align=center><input name="pname" type="text" id="pname" size="25" maxlength="30"></td>
<td align=center><input name="spgg" type="text" id="spgg" size="10" maxlength="30"></td>
<td align=center><select name="type" id="type">
<option value="" selected>請選擇商品類別</option>
<%
Dim ty
Set ty=Conn.Execute("Select ID,Class From [Product_Class] Order By ID desc")
Do While Not ty.Eof
Response.Write "<option value='"& ty(0) &"'>" & ty(1) & "</option>"
ty.MoveNext
Loop
ty.Close
Set ty=Nothing
%>
</select></td>
<td align=center> <select name="SUnit" id="SUnit"> <option value="" selected>請選擇商品單位</option>
<%
Set ty=Conn.Execute("Select ShopUnit From [XX_ShopUnit] Order By ID desc")
Do While Not ty.Eof
Response.Write "<option value='"& ty(0) &"'>" & ty(0) & "</option>"
ty.MoveNext
Loop
ty.Close
Set ty=Nothing
%>
</select></td>
<td align=center><input type="submit" name="Submit" value="添 加"></td>
</tr>
</form>
</table>
</center>
</body></html>
<script javascript=javascript>
function chk(){
if (document.form1.product_id.value=="")
{
alert ("請填寫產品號。");
document.form1.product_id.value='';
document.form1.product_id.focus();
return false;
}
if (document.form1.pname.value=="")
{
alert ("請填寫產品名稱。");
document.form1.pname.value='';
document.form1.pname.focus();
return false;
}
var istrue;
istrue=confirm('您確定無誤要入庫是嗎?');
if(istrue) {
return true;
}
else {
return false;
}
}
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -