edit.asp

来自「功能齐全的oa系统」· ASP 代码 · 共 74 行

ASP
74
字号
<% option explicit%>
<!-- #include virtual="Include/DataEnvi.asp" -->
<!-- #include virtual="Include/Page.asp" -->
<!-- #include virtual="Include/SelectValue.asp" -->
<%
Dim ObjDB
Dim IntID,ObjRS1
Dim ObjRS,StrSQL
Dim StrSelectRole
Dim ClassID
IntID = Request.QueryString("ID")
Set ObjDB = Server.CreateObject("ADODB.Connection")
OpenDB ObjDB	
If Request.Form ("ClassID") <> "" then

	Set ObjRS = Server.CreateObject ("ADODB.RecordSet")
	StrSQL = "Select * from t_OA_Work_Document"
	ObjRS.Open StrSQL,ObjDB,1,3
	ObjRs.AddNew 

	Set ObjRS1 = Server.CreateObject ("ADODB.RecordSet")
	StrSQL = "Select * from T_CRM_Stock_Application where ID = "& IntID
	ObjRS1.Open StrSQL,ObjDB,1,3

	ObjRS("ClassID") = Request.Form ("ClassID")
	ObjRS("Title") = ObjRS1("Title")
	ObjRS("Body") = ObjRS1("Body")
	ObjRS("Attachs") = ObjRS1("Attachs")
	ObjRS("CreateTime") = ObjRS1("CreateTime")
	ObjRS("CreateAccountID") = ObjRS1("AccountID")
	ObjRS("UpdateAccountID") = Session("AccountID")
	ObjRS.Update ()
	StrSQL = "Update T_CRM_Stock_Application Set IsPack = 1 where ID ="& IntID
	ObjDB.Execute StrSQL
	ObjRS.Close 
	Set ObjRS = Nothing
	ObjRS1.Close 	
	Set ObjRS1 = Nothing
	ObjDB.Close
	Set ObjDB = Nothing
	Response.Redirect "List.asp"
Else
	StrSelectRole = SelectValue(ObjDB,"Select ID,ClassName from t_OA_Work_Document_Class")

Sub Main
%>
	<form action="" method="post" onsubmit="return(CheckForm(this))" id=form1 name=form1>
	<table class=Ltable cellspacing=1 cellpadding=3>
	<tr class=LHtr>
	<input type=hidden name=ID value="<%=IntID%>"></tr>
	<tr class=LHtr>
		<td width="15%">归档公文</td>
		<td width="85%"></td>
	</tr>
	<tr class=Ltr>
		<td>公文类别</td>
		<td><Select type="text" class=Input Check=1 Show="公文类别" name="ClassID" ><%=StrSelectRole%></Select></td>
	</tr>	
	</table>
	<table cellspacing=1 cellpadding=3>
	<tr>
		<td>
		<input type="submit"  name="Submit" class=Button value="提 交" >
		
		<input type="button" class=Button value="取 消"  onclick="doList()"id=button1 name=button1></td>
		<td></td>
	</tr>
	</table>
	</form>
<%
	End Sub
End if
%>
<!-- #include file="Templet.asp" -->

⌨️ 快捷键说明

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