?? xgprocess.cls
字號(hào):
Tname = Split(Uname, "|")
Uname = Mid(Tname(0), 2)
Com.CommandText = "insert into workflow_tell_user(username,date_id,form_name,flow_name,flow_no)values('" & Uname & "','" & Curformnum & "','" & Curformname & "','" & Curflowname & "','" & Curstepnum & "')"
Com.Execute
End Select
'---------------------------------------------
End Select
Else
Com.CommandText = "update workflow_process_rec set iffinish='yes' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If '當(dāng)前流程結(jié)束
End If '沒(méi)有當(dāng)前流程步驟紀(jì)錄
ProRs.MoveNext
Wend
ProRs.Close
End If '連接不通
End Sub
Private Sub Forprocess(tmpstr)
Dim Formunit1, Formunit2 As String
Dim Condition1, Condition2 As String
Dim Gostep1, Gostep2 As String
Dim Js1, Js2 As String
Dim Formtype1 As String
Dim Tmpvalue As String
If Cnn.State = 1 Then
Prostr = "select * from workflow_flow_construction where parent_no='" & Curstepnum & "' and flow_name='" & Curflowname & "'"
Rs.Open Prostr, Cnn, adOpenStatic
If Not Rs.EOF And Not Rs.BOF Then
If Rs.RecordCount = 2 Then
If Rs.Fields("Judge_type") = "表單判斷" Then
Formunit1 = Rs.Fields("form_unit")
Condition1 = Rs.Fields("judge_value")
Js1 = Rs.Fields("judge_symbol")
Gostep1 = Rs.Fields("flow_no")
Rs.MoveNext
Formunit2 = Rs.Fields("form_unit")
Condition2 = Rs.Fields("judge_value")
Js2 = Rs.Fields("judge_symbol")
Gostep2 = Rs.Fields("flow_no")
Rs.Close
If Formunit1 = Formunit2 Then
Prostr = "select form_type from workflow_form_construction where form_arrno='" & Formunit1 & "' and form_name='" & Curformname & "'"
Rs.Open Prostr
If Not Rs.EOF And Not Rs.BOF Then Formtype1 = Rs.Fields("form_type")
Rs.Close
Prostr = "select content from workflow_" & Formtype1 & "_content where form_arrno='" & Formunit1 & "' and form_name='" & Curformname & "' and date_id='" & Curformnum & "'"
Rs.Open Prostr
If Not Rs.EOF And Not Rs.BOF Then Tmpvalue = Rs.Fields("content")
Rs.Close
Select Case Js1
Case ">"
If Tmpvalue > Condition1 Then
Com.CommandText = "update workflow_process_rec set flow_no='" & Gostep1 & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If
Case "<"
If Tmpvalue < Condition1 Then
Com.CommandText = "update workflow_process_rec set flow_no='" & Gostep1 & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If
Case ">="
If Tmpvalue >= Condition1 Then
Com.CommandText = "update workflow_process_rec set flow_no='" & Gostep1 & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If
Case "<="
If Tmpvalue <= Condition1 Then
Com.CommandText = "update workflow_process_rec set flow_no='" & Gostep1 & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If
Case "="
If Tmpvalue = Condition1 Then
Com.CommandText = "update workflow_process_rec set flow_no='" & Gostep1 & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If
End Select
Select Case Js2
Case ">"
If Tmpvalue > Condition1 Then
Com.CommandText = "update workflow_process_rec set flow_no='" & Gostep2 & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If
Case "<"
If Tmpvalue < Condition1 Then
Com.CommandText = "update workflow_process_rec set flow_no='" & Gostep2 & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If
Case ">="
If Tmpvalue >= Condition1 Then
Com.CommandText = "update workflow_process_rec set flow_no='" & Gostep2 & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If
Case "<="
If Tmpvalue <= Condition1 Then
Com.CommandText = "update workflow_process_rec set flow_no='" & Gostep2 & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If
Case "="
If Tmpvalue = Condition1 Then
Com.CommandText = "update workflow_process_rec set flow_no='" & Gostep2 & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
End If
End Select
Else
ErrorMessage = "只能針對(duì)同一表單的同一個(gè)域進(jìn)行判斷分支!"
End If
Else
ErrorMessage = tmpstr & "之后只能是表單判斷,流程設(shè)置有誤!"
Rs.Close
End If
Else
Com.CommandText = "update workflow_process_rec set flow_no='" & Rs.Fields("flow_no") & "' where flow_no='" & Curstepnum & "' and flow_name='" & Curflowname & "' and date_id='" & Curformnum & "'"
Com.Execute
Rs.Close
End If
End If
End If
End Sub
Private Sub Class_Initialize()
Cnn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;password=;Initial Catalog=shaowuoffice;Data Source=netli"
Cnn.Open
If Cnn.State = 1 Then
ProRs.ActiveConnection = Cnn
Rs.ActiveConnection = Cnn
Com.ActiveConnection = Cnn
End If
End Sub
Private Sub Class_Terminate()
Set ProRs = Nothing
Set Rs = Nothing
Set Com = Nothing
Cnn.Close
Set Cnn = Nothing
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -