?? odd_edit_sra.asp
字號:
<%@ LANGUAGE="VBSCRIPT" %>
<%
response.buffer=true
Response.Expires = 0
Response.CacheControl = "Private"
%>
<%const title="SRA修改"%>
<!-- #include file=../data/username.inc-->
<!-- #include file=../data/connect.asp-->
<!--#include file=../data/myPrg.asp-->
<html>
<head>
<meta http-equiv="Content-Type"content="text/html; charset=gb_2312-80">
<title><%=title%></title>
<link rel="stylesheet" type="text/css" href="../data/forum.css">
</head>
<body topmargin="0" onload="javascript:self.moveTo(0,0)">
<%
if isempty(session("username")) then
call closedatabase
Response.Write "請重新登入!"
Response.End
end if
newcompanyid = request("companyid")
if newcompanyid = "" then
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""請先選擇公司再做此步操作!"");"
Response.write "history.go(-1);"
Response.Write "</script>"
Response.End
elseif not isnumeric(newcompanyid) then
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""companyid必須為整數!"");history.go(-1);"
Response.Write "</script>"
Response.End
else
newcompanyid = cint(newcompanyid)
end if
arra = split(session("username"),";")
UserCompanyid = arra(0)
flag = arra(1)
User = arra(2)
userno = arra(4)
detail_outw_id = request("id")
if not isnumeric(elink_id) then
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""ID必須為數字!"");"
Response.write "history.go(-1);"
Response.Write "</script>"
Response.End
end if
if flag > 4 then
call closedatabase
Response.End
end if
if Request.ServerVariables("REQUEST_METHOD")="POST" then
outw_sra = trim(request("outw_sra"))
outw_sra = replace(outw_sra,"'","’")
sql = "select outw_id from outward where outw_sra = '"&outw_sra&"' and outw_id <> "&detail_outw_id&" "
set rst = conn.execute(sql)
if rst.eof then
rst.close
set rst = nothing
sql = "update outward set outw_sra = '"&outw_sra&"' where outw_id = "&detail_outw_id&" "
conn.execute(sql)
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "{window.close();}"
Response.Write "</script>"
Response.End
else
rst.close
set rst = nothing
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "{alert(""該SRA已經存在,請用其它的SRA!!!"");history.go(-1);}"
Response.Write "</script>"
Response.End
end if
else
sql = "select outw_sra,outw_dc_id,outw_companyid from outward where outw_id = "&detail_outw_id&""
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
if not rs.eof then
outw_sra = rs("outw_sra")
outw_dc_id = rs("outw_dc_id")
%>
<form action="odd_edit_sra.asp" method="POST" name="output1">
<table align=center width=100% cellspacing='0' cellpadding='0' bordercolorlight='#000000'bordercolordark='#FFFFFF'bgcolor='#DADBFC' border="1">
<tr>
<td colspan=4 align=center bgcolor=red><b><font color=yellow>出庫記錄詳細信息一覽</font></b></td>
</tr>
<tr>
<td colspan=4 align=left bgcolor=green height=20><b><font color=white> 訂 單 信 息</font></b></td>
</tr>
<tr>
<td width="15%">系統編號:</td>
<td colspan="3" width="85%">
<%response.write detail_outw_id%></td>
</tr>
<tr>
<td width="15%">S R A:</td>
<td colspan="3" width="85%">
<%response.write outw_sra%></td>
</tr>
<tr>
<td width="15%">修改為:</td>
<td colspan="3" width="85%">
<%
response.write "<input style=""font-size:9pt;width=120;BORDER-TOP-WIDTH: 1px;BORDER-BOTTOM-WIDTH: 2px;BORDER-LEFT-WIDTH: 1px;BORDER-RIGHT-WIDTH: 2px"" type=textbox name='outw_sra' value='"&outw_sra&"' maxlength=""15"" onkeydown=""javascript:if(event.keyCode==13)event.keyCode=9"">"
%></td>
</tr>
<input type=hidden name=id value=<%=detail_outw_id%>>
<input type=hidden name=companyid value=<%=newcompanyid%>>
<tr bgcolor=white>
<td colspan="5"><br><br>
<center>
<input class=buttonface type=button onclick="datacheck()" name=ok value=修改>
</center>
<br><br>
</tr>
</table>
</form>
<br><br>
<script language=vbscript>
<!--
Sub datacheck()
if trim(output1.outw_sra.value)=empty then
msgbox "「SRA」不得為空白!", 64, "請輸入SRA!"
document.output1.outw_sra.focus()
Exit Sub
End if
output1.Submit
End Sub
-->
</script>
<%
else
Response.Write "可能該數據已經被他人刪除,請刷新主頁面!"
end if
rs.Close
set rs = nothing
call closedatabase
end if
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -