⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xgprocess.cls

📁 asp+sql2000做的oa软件+vb制作的组件源码
💻 CLS
📖 第 1 页 / 共 2 页
字号:
                                   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 '当前流程结束
         End If  '没有当前流程步骤纪录
         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 = "只能针对同一表单的同一个域进行判断分支!"
                    End If
                Else
                    ErrorMessage = tmpstr & "之后只能是表单判断,流程设置有误!"
                    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

⌨️ 快捷键说明

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