createdefineflow.asp

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

ASP
65
字号

<%
	Sub CreateDefineFlow (ObjDB,CreatorID,ComMsgID,FlowDate)
		Dim ObjRS,ObjRS1,StrSQL
		Dim IntComMsgID,ArrFlowDate
		Dim IntCreatorID,IntNodeID
		Dim i,j,ArrExecuteIDs
		
		IntCreatorID = CreatorID
		IntComMsgID = ComMsgID
		ArrFlowDate = FlowDate
		
		Set ObjRS = Server.CreateObject ("ADODB.RecordSet")
		StrSQL = "Select * from T_CRM_Stock_Application_Record where ID = 1" 
		ObjRS.Open StrSQL,ObjDB,1,2
		
		Set ObjRS1 = Server.CreateObject ("ADODB.RecordSet")
		StrSQL = "Select * from T_CRM_Stock_Application_Record_Des where ID = 1" 
		ObjRS1.Open StrSQL,ObjDB,1,3
		
		
		ObjRS.AddNew 
		ObjRS("ComMsgID") = IntComMsgID
		ObjRS("ParentID") = 0
		ObjRS("ExecuteID") = IntCreatorID
		ObjRS("NodeName") = "起始点"
		ObjRS("PassType") = 0
		ObjRS.Update 
		IntNodeID = ObjRS("ID")	
		ObjRS1.AddNew 
		ObjRS1("NodeID") = IntNodeID	
		ObjRS1("ExecuteID") = IntCreatorID	
		ObjRS1("IsCreator") = 1	

		
		For i = LBound(ArrFlowDate) To UBound(ArrFlowDate)
			ObjRS.AddNew 
			ObjRS("NodeName") = ArrFlowDate(i,0)			
			ObjRS("ComMsgID") = IntComMsgID
			ObjRS("ExecuteID") = ArrFlowDate(i,1)
			ObjRS("ParentID") = IntNodeID
			ObjRS("PassType") = ArrFlowDate(i,2)
			ObjRS("IsAllPass") = CBool(ArrFlowDate(i,3))
			ObjRS("IsNeed") = CBool(ArrFlowDate(i,4))
			If i = UBound(ArrFlowDate,1) Then ObjRS("IsEnd") = 1
			ObjRS.Update 
			IntNodeID = ObjRS("ID")
			ArrExecuteIDs = Split(ArrFlowDate(i,1),",")
			For j = LBound(ArrExecuteIDs) To UBound(ArrExecuteIDs)
				ObjRS1.AddNew 
				ObjRS1("NodeID") = IntNodeID
				ObjRS1("ExecuteID") = ArrExecuteIDs(j)			
				ObjRS1.Update 
			Next
		Next
		ObjRS.Close 
		Set ObjRS = Nothing
		ObjRS1.Close 
		Set ObjRS1 = Nothing
		
		
	End Sub
	

%>

⌨️ 快捷键说明

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