?? project_regist7_3.asp
字號(hào):
<!--#include file="../Include/TimeOut.asp"-->
<!--#include file="../Include/AdoConn.asp"-->
<!--#include file="../Include/online.asp"-->
<%
'取得表單數(shù)據(jù)
ZhiKT=request("ZhiKT")
JianSMB=request("JianSMB")
ZhongSCD=request("ZhongSCD")
GongZSX=request("GongZSX")
%>
<%
'第七頁(yè)(項(xiàng)目類型為(四)(工程中心、重點(diǎn)實(shí)驗(yàn)室))填寫(xiě)的信息寫(xiě)入數(shù)據(jù)庫(kù)
ProjectCode=session("ProjectCode")
IF projectcode="" then
Response.Redirect ("Project_edit1.asp?projectInfo=請(qǐng)先注冊(cè)封面信息!")
else
'判斷是否是修改狀態(tài)
set rst=server.CreateObject ("ADODB.recordset")
StrSQL="select * from XT_VD_ProjectSupplyIndustry where 項(xiàng)目編碼='"&projectcode&"'"
rst.CursorType =3
rst.CursorLocation =3
rst.LockType =2
rst.Open StrSQL,strconn
if not rst.EOF then '修改狀態(tài)
n=0
strsql="update xt_td_ProjectSupplyIndustry set "
strsqlSet=""
for i=1 to Request.Form.Count-1
strsqlSet=strsqlSet+ rst(i).name &"='"&Request.Form.Item (i)&"'"
n=n+1
if n<>Request.Form.Count-1 then
strsqlSet=strsqlSet+","
end if
next
strsql=strsql+strsqlSet+" where 項(xiàng)目編碼='"&ProjectCode&"'"
conn.Execute strsql
Response.Redirect ("Project_edit7_3.asp?projectInfo=項(xiàng)目專項(xiàng)補(bǔ)充計(jì)劃修改成功!")
else '注冊(cè)
StrSQL="insert into XT_TD_ProjectSupplyIndustry (項(xiàng)目編碼) values ('"&ProjectCode&"')"
conn.Execute StrSQL
set rst1=server.CreateObject ("ADODB.recordset")
StrSQL="select * from XT_VD_ProjectSupplyIndustry where 項(xiàng)目編碼='"&projectcode&"'"
rst1.CursorType =3
rst1.CursorLocation =3
rst1.LockType =2
rst1.Open StrSQL,strconn
'生成查詢語(yǔ)句
n=0
strsql="update xt_td_ProjectSupplyIndustry set "
strsqlSet=""
for i=1 to Request.Form.Count-1
strsqlSet=strsqlSet+ rst(i).name &"='"&Request.Form.Item (i)&"'"
n=n+1
if n<>Request.Form.Count-1 then
strsqlSet=strsqlSet+","
end if
next
strsql=strsql+strsqlSet+" where 項(xiàng)目編碼='"&ProjectCode&"'"
conn.Execute strsql
Response.Redirect ("Project_edit8.asp?projectInfo=項(xiàng)目專項(xiàng)補(bǔ)充計(jì)劃注冊(cè)成功!")
end if
end if
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -