📄 add.asp
字号:
<!--#include file="../includes/keepHouse.asp"-->
<head>
<%
call insureID()
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>WebOffice</title>
<script language="JavaScript">
function isNotEmpty(){
var PIECES = document.FormAdd.PIECES.value;
if ( PIECES==""){
alert("必须指定件数!");
return false;
}
}
function IsNumeric(sText){
var ValidChars = "0123456789.";
var IsNumber=true;
var Char;
for (i = 0; i < sText.length && IsNumber == true; i++) {
Char = sText.charAt(i);
if (ValidChars.indexOf(Char) == -1){
IsNumber = false;
}
}
return IsNumber;
}
function validate(){
var PIECES = document.FormAdd.PIECES.value;
if ( PIECES==""){
alert("必须指定件数!");
return false;
}
if (!IsNumeric(PIECES)){
alert("输入必须为数字!");
return false;
}
}
</script>
</head>
<body>
<center>
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="50">
<tr>
<td width="100%">
</td>
</tr>
</table>
<form name="FormAdd" method="post" action="SaveA.asp" onSubmit="return validate()">
<table border="0" width="75%" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" bgcolor="#0000FF" height="35" align=left><img border="0" src="../images/back.gif"></td>
<td width="65%" bgcolor="#0000FF" height="35" align=center>
<b><font color="#FFFFFF"><%=session("DEPARTMENT")%>部门订单添加</font></b></td>
<td width="5%" bgcolor="#0000FF" height="35" align=right><img border="0" src="../images/Close2.gif"></td>
</tr>
</table>
<table border="1" width="75%" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0">
<tr bgcolor="#efefef">
<td width="20%" bordercolor="#FCFCFC" bgcolor="#FCFCFC">公司名称:</td>
<td width="55%" bordercolor="#FCFCFC" bgcolor="#FCFCFC">
<select name="CLIENT_ID" style="border: 1 solid #D8D6E2" size="1">
<%
dim Counter
Counter=0
sql="SELECT Clients.CLIENT_ID, Clients.COMPANY_NAME " _
&"FROM Clients INNER JOIN Personnel " _
&"ON Clients.PERSONNEL_ID = Personnel.PERSONNEL_ID INNER JOIN " _
&"Department ON Personnel.DEPT_ID = Department.DEPT_ID " _
&"WHERE (Department.DEPT_ID = "&session("DEPT_ID")&" AND Clients.CONFIRMED=1) "
call openDB()
rs.open sql,conn,1,1
while not rs.eof
response.write"<option value="""&rs("CLIENT_ID")&""" "
if Counter=0 then
response.write " selected"
end if
response.write">"&rs("COMPANY_NAME")&"</option>"
Counter=Counter+1
rs.movenext
wend
set rs=nothing
%>
</select>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#FCFCFC" bordercolor="#FCFCFC">产品名:</td>
<td width="55%" bgcolor="#FCFCFC" bordercolor="#FCFCFC">
<select name="PRODUCT_ID" style="border: 1 solid #D8D6E2" size="1">
<%
set rs=Server.CreateObject("Adodb.RecordSet")
sql="SELECT PRODUCT_NAME,PRODUCT_ID FROM Products "
rs.open sql,conn,1,1
Counter=0
while not rs.eof
response.write"<option value="""&rs("PRODUCT_ID")&""" "
if Counter=0 then
response.write "selected"
end if
response.write">"&rs("PRODUCT_NAME")&"</option>"
Counter=Counter+1
rs.movenext
wend
call closeDB()
%>
</select>
</td>
</tr>
<tr>
<td width="20%" bordercolor="#FCFCFC" bgcolor="#FCFCFC">件数:</td>
<td width="55%" bordercolor="#FCFCFC" bgcolor="#FCFCFC">
<input name="PIECES" type="text" size="29" style="border: 1 solid #D8D6E2">
</td>
</tr>
<tr bgcolor="#efefef">
<td width="20%" bgcolor="#FCFCFC" bordercolor="#FCFCFC">到期时间:</td>
<td width="55%" bgcolor="#FCFCFC" bordercolor="#FCFCFC">
<input name="DUE_DATE_Year" type="text" size="6" style="border: 1 solid #D8D6E2" value="<%=year(date())%>">年
<input name="DUE_DATE_Month" type="text" size="6" style="border: 1 solid #D8D6E2">月
<input name="DUE_DATE_Day" type="text" size="6" style="border: 1 solid #D8D6E2">日
</td>
</tr>
<tr bgcolor="#FCFCFC">
<td width="20%" bgcolor="#FCFCFC" bordercolor="#FCFCFC" >录入人员:<%=session("PERSON_NAME")%>
</td>
<td width="55%" bgcolor="#FCFCFC" bordercolor="#FCFCFC">
</td>
</tr>
<tr bgcolor="#FCFCFC">
<td width="75%" height="50" colspan=2 align=center bgcolor="#EFEFEF">
<input type="hidden" value="Add" name="action">
<input type="submit" value="提 交" name="Save" class="buttonface">
<input type="reset" value="清 除" name="Clear" class="buttonface">
</td>
</tr>
</table>
</form>
</center>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -