project_regist7_3.asp

来自「ASP程序实现的科技期刊系统」· ASP 代码 · 共 66 行

ASP
66
字号
<!--#include file="../Include/TimeOut.asp"-->
<!--#include file="../Include/AdoConn.asp"-->
<!--#include file="../Include/online.asp"-->
<%
'取得表单数据
ZhiKT=request("ZhiKT")
JianSMB=request("JianSMB")
ZhongSCD=request("ZhongSCD")
GongZSX=request("GongZSX")
%>
<%
'第七页(项目类型为(四)(工程中心、重点实验室))填写的信息写入数据库
ProjectCode=session("ProjectCode")
IF projectcode="" then
   Response.Redirect ("Project_edit1.asp?projectInfo=请先注册封面信息!")
else
	'判断是否是修改状态
	set rst=server.CreateObject ("ADODB.recordset")
	StrSQL="select * from XT_VD_ProjectSupplyIndustry where 项目编码='"&projectcode&"'"
	rst.CursorType =3
	rst.CursorLocation =3
	rst.LockType =2
	rst.Open StrSQL,strconn
if not rst.EOF then '修改状态
	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 项目编码='"&ProjectCode&"'"
conn.Execute strsql
Response.Redirect ("Project_edit7_3.asp?projectInfo=项目专项补充计划修改成功!")
else '注册
StrSQL="insert into XT_TD_ProjectSupplyIndustry (项目编码) values ('"&ProjectCode&"')"
conn.Execute StrSQL
	set rst1=server.CreateObject ("ADODB.recordset")
	StrSQL="select * from XT_VD_ProjectSupplyIndustry where 项目编码='"&projectcode&"'"
	rst1.CursorType =3
	rst1.CursorLocation =3
	rst1.LockType =2
	rst1.Open StrSQL,strconn
'生成查询语句
	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 项目编码='"&ProjectCode&"'"
conn.Execute strsql

Response.Redirect ("Project_edit8.asp?projectInfo=项目专项补充计划注册成功!")
end if

end if
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?