?? pcedit.asp
字號:
<!--#include file="pcdb.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>設(shè)備資源</title>
</head>
<%
title=request.form("編號")
if title <> "" then
Set rs=Server.CreateObject("ADODB.Recordset")
if Request.QueryString("action")="edit" then
sqlstr="select * from 設(shè)備資源 where id=" + Request.QueryString("id")
rs.open sqlstr,conn,3,3
else
sqlstr="select * from 設(shè)備資源 "
rs.open sqlstr,conn,3,3
rs.AddNew
end if
rs("編號")=Request.Form("編號")
rs("部門")=Request.Form("部門")
rs("使用人")=Request.Form("使用人")
rs("CPU")=Request.Form("CPU")
rs("顯示器")=Request.Form("顯示器")
rs("硬盤")=Request.Form("硬盤")
rs("光驅(qū)")=Request.Form("光驅(qū)")
rs("軟驅(qū)")=Request.Form("軟驅(qū)")
rs("主板")=Request.Form("主板")
rs("內(nèi)存")=Request.Form("內(nèi)存")
rs("聲卡")=Request.Form("聲卡")
rs("音箱")=Request.Form("音箱")
rs("網(wǎng)卡")=Request.Form("網(wǎng)卡")
rs("鎖號")=Request.Form("鎖號")
rs("其他設(shè)備")=Request.Form("其他設(shè)備")
rs("采購時間")=Request.Form("采購時間")
rs("供應(yīng)商")=Request.Form("供應(yīng)商")
rs("保修期")=Request.Form("保修期")
rs("錄入時間")=Request.Form("錄入時間")
rs("設(shè)備狀態(tài)")=Request.Form("設(shè)備狀態(tài)")
rs("IP地址")=Request.Form("IP地址")
rs("備注")=Request.Form("備注")
rs.Update
rs.close
%>
<script language="javascript">
link="pc.asp?row="+ <% =(Session("row")+1)%>
document.location.href=link
</script>
<%
else
%>
<!--------------------------- Formatting Section ------------------------------>
<%
if Request.QueryString("id")<>"" and Request.QueryString("action")="edit" then
sql="SELECT * FROM 設(shè)備資源 WHERE id=" + Request.QueryString("id") +" "
Set RS = Conn.Execute(sql)
end if
action = Request.QueryString("action")
%>
<BODY bgcolor="White" text="#000000" style="margin-left:3px;margin-top: 3px" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" link="#0072E3" vlink="#0072E3" >
<!--#include file="pctop.asp"-->
<form NAME="formedit" ACTION="pcedit.asp?id=<% =Request.QueryString("id")%>&action=<% =Request.QueryString("action")%>"
METHOD="POST">
<!----------------------------- Form Section ---------------------------------->
<table CELLPADDING="2" BORDER="0" width="500" cellspacing="0">
<tr bgcolor="#F3F8F8" span style="font-size: 9pt">
<td HEIGHT="25" ALIGN="Left" NOWRAP> 編號</td>
<td WIDTH="100%"><input TYPE="Text" NAME="編號" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("編號")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 部門</td>
<td WIDTH="100%"><input NAME="部門" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("部門")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 使用人</td>
<td WIDTH="100%"><input NAME="使用人" SIZE="18" MAXLENGTH="32"
<% if action="edit" then %> VALUE="<% =RS("使用人")%>" <% end if %>></td>
</tr>
<tr bgcolor="#F3F8F8" span style="font-size: 9pt">
<td HEIGHT="25" ALIGN="Left" NOWRAP> CPU</td>
<td WIDTH="100%"><input TYPE="Text" NAME="CPU" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("CPU")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 顯示器</td>
<td WIDTH="100%"><input TYPE="Text" NAME="顯示器" SIZE="18"
MAXLENGTH="16" <% if action="edit" then %> VALUE="<% =RS("顯示器")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 硬盤</td>
<td WIDTH="100%"><input TYPE="Text" NAME="硬盤" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("硬盤")%>" <% end if %>></td>
</tr>
<tr bgcolor="#F3F8F8" span style="font-size: 9pt">
<td HEIGHT="25" ALIGN="Left" NOWRAP> 光驅(qū)</td>
<td WIDTH="100%"><input TYPE="Text" NAME="光驅(qū)" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("光驅(qū)")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 軟驅(qū)</td>
<td WIDTH="100%"><input TYPE="Text" NAME="軟驅(qū)" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("軟驅(qū)")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 主板</td>
<td WIDTH="100%"><input TYPE="Text" NAME="主板" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("主板")%>" <% end if %>></td>
</tr>
<tr bgcolor="#F3F8F8" span style="font-size: 9pt">
<td HEIGHT="25" ALIGN="Left" NOWRAP> 內(nèi)存</td>
<td WIDTH="100%"><input TYPE="Text" NAME="內(nèi)存" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("內(nèi)存")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 聲卡</td>
<td WIDTH="100%"><input TYPE="Text" NAME="聲卡" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("聲卡")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 音箱</td>
<td WIDTH="100%"><input TYPE="Text" NAME="音箱" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("音箱")%>" <% end if %>></td>
</tr>
<tr bgcolor="#F3F8F8" span style="font-size: 9pt">
<td HEIGHT="25" ALIGN="Left" NOWRAP> 網(wǎng)卡</td>
<td WIDTH="100%"><input TYPE="Text" NAME="網(wǎng)卡" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("網(wǎng)卡")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 鎖號</td>
<td WIDTH="100%"><input TYPE="Text" NAME="鎖號" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("鎖號")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 其他設(shè)備</td>
<td WIDTH="100%"><input TYPE="Text" NAME="其他設(shè)備" SIZE="18"
MAXLENGTH="16" <% if action="edit" then %> VALUE="<% =RS("其他設(shè)備")%>" <% end if %>></td>
</tr>
<tr bgcolor="#F3F8F8" span style="font-size: 9pt">
<td HEIGHT="25" ALIGN="Left" NOWRAP> 采購時間</td>
<td WIDTH="100%"><input TYPE="Text" NAME="采購時間" SIZE="18"
MAXLENGTH="16" <% if action="edit" then %> VALUE="<% =RS("采購時間")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 供應(yīng)商</td>
<td WIDTH="100%"><input TYPE="Text" NAME="供應(yīng)商" SIZE="18"
MAXLENGTH="16" <% if action="edit" then %> VALUE="<% =RS("供應(yīng)商")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 保修期</td>
<td WIDTH="100%"><input TYPE="Text" NAME="保修期" SIZE="18"
MAXLENGTH="16" <% if action="edit" then %> VALUE="<% =RS("保修期")%>" <% end if %>></td>
</tr>
<tr bgcolor="#F3F8F8" span style="font-size: 9pt">
<td HEIGHT="25" ALIGN="Left" NOWRAP> 錄入時間</td>
<td WIDTH="100%"><input TYPE="Text" NAME="錄入時間" SIZE="18"
MAXLENGTH="16" <% if action="edit" then %> VALUE="<% =RS("錄入時間")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 實價</td>
<td WIDTH="100%"><input TYPE="Text" NAME="實價" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("實價")%>" <% end if %>></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> IP地址</td>
<td WIDTH="100%"><input TYPE="Text" NAME="IP地址" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("IP地址")%>" <% end if %>></td>
<tr bgcolor="#F3F8F8" span style="font-size: 9pt">
<td HEIGHT="25" ALIGN="Left" NOWRAP> 設(shè)備狀態(tài)</td>
<td WIDTH="100%"><select NAME="設(shè)備狀態(tài)" size="1" >
<option></option>
<% if action="edit" then %>
<option selected VALUE="<% =RS("設(shè)備狀態(tài)")%>"><% =RS("設(shè)備狀態(tài)")%></option>
<% end if %>
<option VALUE="報廢">報廢</option>
<option VALUE="使用中">使用中</option>
<option VALUE="淘汰">淘汰</option>
<option VALUE="未使用">未使用</option>
</select></td>
<td HEIGHT="25" ALIGN="Left" NOWRAP> 備注</td>
<td COLSPAN="5" WIDTH="100%"><input TYPE="Text" NAME="備注" SIZE="18" MAXLENGTH="16"
<% if action="edit" then %> VALUE="<% =RS("備注")%>" <% end if %>></td>
</tr>
</tr>
</table>
<table WIDTH="100%">
<tr>
<td><font > </font></td>
</tr>
<tr>
<td NOWRAP ><span style="font-size: 9pt"> [<a
href="javascript:document.formedit.submit();"><% if action="edit" then %>更改<% else %>添加<% end if %></a>] [<a
href="javascript:document.formedit.reset();">恢復(fù)</a>] <% if action="edit" then %>[<a
HREF="javascript:document.location.href='pcdel.asp?gid=<% =Request.QueryString("id")%>'">刪除</a>] <% end if %>[<a
href="javascript:history.go(-1);">返回</a>] </span></td>
</tr>
</table>
</form>
<!---------------------------- Footer Section --------------------------------->
</body>
</html>
<%
end if
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -