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

📄 oamain

📁 一个OA办公自动化管理系统
💻
📖 第 1 页 / 共 5 页
字号:
'Private Sub Command1_Click()
'
'''Me.PicNode(0).Name = "1111"
''MsgBox Me.Picture2.Left
''MsgBox Me.Picture2.Top
'
''If Dir(App.Path & App.Path & "\" & "LuoBack" & ".Mdb") = "luoBack.mdb" Then
''    FileCopy App.Path & "\MainGalaxy.Mdb", App.Path & "\" & "LuoBack" & ".Mdb"
''    MsgBox "11"
''
''Else
''    MsgBox "0000"
''End If
''ShowFlowCheck "111"
'End Sub

Private Sub Form_Load()
On Error GoTo Err_VtlForm_Load
    Me.Caption = LoadResString(Val(Me.Caption & GLanguageID))
    GGetRes GLanguageID, Me
    Me.BackColor = &HC0C0C0
    Me.lblState.BackColor = &H888C15
    Dim i As Integer, j As Integer, rstUserWork As Recordset, rstWork As Recordset
    Dim AppPath As String, rstMeun As Recordset, rstIsOA As Recordset, strAccount As String
    
    App.HelpFile = App.Path & "\erphelp.chm"
    If LoginName <> "Admin" Then
        Me.menuPower.Enabled = False
    End If

    AppPath = App.Path
    If iniMenu = 0 Then MisMsg "iniMenu error"
    'Me.Show
    'DoEvents
    Set rstWork = New Recordset
    rstWork.Open "Select Description From AccountName Where AccountID='" & strAccountName & "'", GetCNMain, adOpenForwardOnly
    If rstWork.EOF = False Then
        strAccount = rstWork![Description]
    End If
    Me.Caption = LoginName & "  工作台 -- " & strAccount
    intMax = 0
    EmailStyle = 0
    tcpServer(0).LocalPort = 1001
    tcpServer(0).Listen
    'tcpClient.RemotePort = 1001
    'tcpClient.RemoteHost = "luo"
    Set rstIsOA = New Recordset
    rstIsOA.Open "Select IsOA From AccountName Where AccountId='" & strAccountName & "'", GetCNMain, adOpenForwardOnly
    If rstIsOA.EOF Then Exit Sub
    If IniOutLook(rstIsOA![IsOA]) = 0 Then MisMsg "iniOutLook Error"
    EmailStyle = 1
    'UnRead

    
    Me.VtlMenu.MenuCur = 1
    Set rstIsOA = Nothing
    Unload FrmFLash
    i = DrawFlow(Me.VtlMenu.MenuItemKey)


    Exit Sub
Err_VtlForm_Load:
    MisMsg "VtlForm_Load Error : " & Err.Description
    Exit Sub
End Sub

Private Sub Form_Resize()
    On Error Resume Next
    Me.VtlMenu.Height = Me.Height - Me.VtlMenu.Top - 800
    Me.Picture2.Top = Me.Picture1.Top
    Me.Picture2.Width = Me.Width - Me.Picture1.Left - 200
    Me.Picture2.Height = Me.Height - Me.Picture1.Top - 800
    Me.Picture1.Width = Me.Width - Me.Picture1.Left - 200
    Me.Picture1.Height = Me.Height - Me.Picture1.Top - 400
    Me.lblState.Width = Me.Picture1.Width
    Me.Gif89a1.Left = Me.Width - 700
    'WorkFlow
End Sub

Private Function DrawFlow(strFlowID As String) As Integer
    DrawFlow = 0
    Dim rstFlow As Recordset, StrCaption As String, strNextCaption As String, strTag As String, strNextTag As String
    Dim i As Integer, j As Integer, IsLoad As Integer, k As Integer, NextIsLoad As Integer
    'Stop
    
    Me.Picture2.Visible = False
    For i = 1 To lblNode.Count - 1
        Unload Me.lblNode(i)
    Next
    
    For i = 1 To PicNode.Count - 1
        Unload Me.PicNode(i)
    Next
    
    
    For i = 1 To Line1.Count - 1
        Unload Me.Line1(i)
    Next
    
    For i = 1 To Line2.Count - 1
        Unload Me.Line2(i)
    Next
    
    For i = 1 To Line3.Count - 1
        Unload Me.Line3(i)
    Next
    
    For i = 1 To Line4.Count - 1
        Unload Me.Line4(i)
    Next
    
    For i = 1 To lblSelect.Count - 1
        Unload lblSelect(i)
    Next
    
    For i = 1 To Me.Node.Count - 1
        Unload Node(i)
    Next
    
    
    For i = 1 To lblCaption.Count - 1
        Unload lblCaption(i)
    Next
    
    lblNode(0).Visible = False
    PicNode(0).Visible = False
    Line1(0).Visible = False
    Line2(0).Visible = False
    Line3(0).Visible = False
    
    Set rstFlow = New Recordset
    rstFlow.Open "Select * from v_DrawFlow   where FlowID='" & strFlowID & "' ", GetCNClient, adOpenForwardOnly
    'rstflow.Open "Select * from v_DrawFlow ", GetCNClient, adOpenForwardOnly
    If rstFlow.EOF And rstFlow.BOF Then
        Me.Picture2.Picture = LoadPicture(App.Path & "\GalaxyStock.bmp")
    Else
        Me.Picture2.Picture = LoadPicture(App.Path & "\Galaxy.bmp")
        
    End If
    Do Until rstFlow.EOF
    
        If IsNumeric(rstFlow![FlowExplain]) Then
            StrCaption = "" 'LoadResString(Val(rstflow![FlowExplain]) & GLanguageID) & Chr(10) & Chr(13)
            If rstFlow![GroupID] <> "*" Then
                StrCaption = StrCaption & DLookUp("Explain", "PubCustomGroup", "GroupID='" & rstFlow![GroupID] & "'")
            End If
            
            If rstFlow![Teamid] <> "*" Then
                StrCaption = StrCaption & DLookUp("Explain", "PubOATeam", "TeamID='" & rstFlow![Teamid] & "'")
            End If
            StrCaption = StrCaption & LoadResString(Val(rstFlow![PowerExplain] & GLanguageID))
        
        
        Else
            StrCaption = "" 'rstflow![FlowExplain] & Chr(10) & Chr(13)
            If rstFlow![GroupID] <> "*" Then
                StrCaption = StrCaption & DLookUp("Explain", "PubCustomGroup", "GroupID='" & rstFlow![GroupID] & "'")
            End If
            If rstFlow![Teamid] <> "*" Then
                StrCaption = StrCaption & DLookUp("Explain", "PubOATeam", "TeamID='" & rstFlow![Teamid] & "'")
            End If
            StrCaption = StrCaption & rstFlow![PowerExplain]
        End If
        
        If IsNumeric(rstFlow![NextFlowExplain]) Then
        
            strNextCaption = ""  ' LoadResString(Val(rstflow![NextFlowExplain]) & GLanguageID) & Chr(10) & Chr(13)
            If rstFlow![NextGroupID] <> "*" Then
                strNextCaption = strNextCaption & DLookUp("Explain", "PubCustomGroup", "GroupID='" & rstFlow![NextGroupID] & "'")
            End If
            If rstFlow![NextTeamID] <> "*" Then
                strNextCaption = strNextCaption & DLookUp("Explain", "PubOATeam", "TeamID='" & rstFlow![NextTeamID] & "'")
            End If
            strNextCaption = strNextCaption & LoadResString(Val(rstFlow![NextPowerExplain] & GLanguageID))
        Else
            strNextCaption = "" 'rstflow![NextFlowExplain] & Chr(10) & Chr(13)
            If rstFlow![NextGroupID] <> "*" Then
                strNextCaption = strNextCaption & DLookUp("Explain", "PubCustomGroup", "GroupID='" & rstFlow![NextGroupID] & "'")
            End If
            If rstFlow![NextGroupID] <> "*" Then
                strNextCaption = strNextCaption & DLookUp("Explain", "PubOATeam", "TeamID='" & rstFlow![NextTeamID] & "'")
            End If
            strNextCaption = strNextCaption & rstFlow![NextPowerExplain]
        End If
        strTag = rstFlow![FuncID] & "|" & rstFlow![GroupID] & "|" & rstFlow![Teamid] & "|" & rstFlow![FuncPower]
        strNextTag = rstFlow![NextFuncID] & "|" & rstFlow![NextGroupID] & "|" & rstFlow![NextTeamID] & "|" & rstFlow![NextFuncPower]
'        'If strTag = "" Then
'            MsgBox strTag
'        'End If
'        If strNextTag = "" Then
'            MsgBox strNextTag
'        End If
        IsLoad = 0
        
        i = lblNode.Count
        For j = 1 To i - 1
            If PicNode(j).Tag = strTag Then   'Or PicNode(j).Tag = strNextTag
                
                IsLoad = j
                Exit For
            End If
        Next
        
        If IsLoad = 0 Then
            Load Me.lblNode(i)
            Load Me.PicNode(i)
            lblNode(i).Visible = True
            PicNode(i).Visible = True
            lblNode(i).Left = rstFlow![NodeLeft] + PicNode(k).Width / 2 - lblNode(k).Width / 2
            lblNode(i).Top = rstFlow![NodeTop] + PicNode(k).Height + 120
            PicNode(i).Left = rstFlow![NodeLeft]
            PicNode(i).Top = rstFlow![NodeTop]
            IsLoad = i
            
            lblNode(i).Caption = StrCaption
            lblNode(i).Alignment = 2
            If rstFlow![TempCheck] = 1 Then
                lblNode(i).ForeColor = &HFF&
            End If
            PicNode(i).Tag = strTag
            If Dir(App.Path & "\ProgramIco\" & rstFlow![FuncID] & ".bmp") <> "" Then
                Set PicNode(i).Picture = LoadPicture(App.Path & "\ProgramIco\" & rstFlow![FuncID] & ".BMP")
            Else
                Set PicNode(i).Picture = LoadPicture(App.Path & "\ProgramIco\" & "A.bmp")
            
            End If
        End If
        
        NextIsLoad = 0
        k = lblNode.Count
        
        For j = 1 To k - 1
            If PicNode(j).Tag = strNextTag Then  'PicNode(j).Tag = strTag Or
                NextIsLoad = j
                Exit For
            End If
        Next
        
        If NextIsLoad = 0 Then
            Load Me.lblNode(k)
            Load Me.PicNode(k)
            lblNode(k).Visible = True
            PicNode(k).Visible = True
            
            lblNode(k).Left = rstFlow![NextNodeLeft] + PicNode(k).Width / 2 - lblNode(k).Width / 2
            lblNode(k).Top = rstFlow![NextNodeTop] + PicNode(k).Height + 120
            PicNode(k).Left = rstFlow![NextNodeLeft]
            PicNode(k).Top = rstFlow![NextNodeTop]
            
            lblNode(k).Caption = strNextCaption
            lblNode(k).Alignment = 2
            If rstFlow![TempCheck] = 1 Then
                lblNode(k).ForeColor = &HFF&
            End If
            PicNode(k).Tag = strNextTag
            
            If Dir(App.Path & "\ProgramIco\" & rstFlow![NextFuncID] & ".bmp") <> "" Then
                Set PicNode(k).Picture = LoadPicture(App.Path & "\ProgramIco\" & rstFlow![NextFuncID] & ".bmp")
            Else
                Set PicNode(k).Picture = LoadPicture(App.Path & "\ProgramIco\" & "A.bmp")
            
            End If
            
            NextIsLoad = k
        End If
        
        j = Line1.Count
        Load Me.Line1(j)
        Load Me.lblSelect(j)
        
        Line1(j).x1 = PicNode(IsLoad).Left + PicNode(IsLoad).Width / 2
        Line1(j).Y1 = PicNode(IsLoad).Top + PicNode(IsLoad).Height / 2
        Line1(j).x2 = PicNode(NextIsLoad).Left + PicNode(NextIsLoad).Width / 2
        Line1(j).Y2 = PicNode(NextIsLoad).Top + PicNode(NextIsLoad).Height / 2
        Line1(j).Visible = True
        lblSelect(j).Left = (Line1(j).x1 + Line1(j).x2) / 2
        lblSelect(j).Top = (Line1(j).Y1 + Line1(j).Y2) / 2
        lblSelect(j).Caption = IIf(IsNull(rstFlow![Summary]), "", rstFlow![Summary])
        lblSelect(j).Visible = True
        
        'MsgBox IsLoad & "|" & lblNode(IsLoad).Left & "|" & NextIsLoad & "|" & lblNode(NextIsLoad).Left
        Load Me.Line2(j)
        Load Me.Line3(j)
        ArrowLine Line1(j), Line2(j), Line3(j), lblNode(0).Height / 2, lblNode(0).Width / 2
        Me.Line2(j).Visible = True
        Me.Line3(j).Visible = True
    rstFlow.MoveNext
        
    Loop
    
    
'    Me.Picture3.Visible = True
'    Me.Picture3.Left = Me.Picture2.Left
'    Me.Picture3.Width = Me.Picture2.Width
'    Set rstflow = New Recordset
'    rstflow.Open "Select * from v_DrawFlow   where FlowID='" & strFlowID & "' ", GetCNClient, adOpenForwardOnly
'    Do Until rstflow.EOF
'        DrawFlow = 1
'        strTag = rstflow![FuncID]
'        i = Node.Count
'        For j = 1 To i - 1
'            If Node(j).Tag = strTag Then 'Or PicNode(j).Tag = strNextTag
'                DrawFlow = 0
'                Exit For
'            End If
'        Next
'        If DrawFlow = 1 Then
'            i = Node.Count
'            Load Me.Node(i)
'            Load Me.Line4(i)
'            Me.Node(i).Tag = strTag
'            If Dir(App.Path & "\ProgramIco\" & strTag & ".bmp") <> "" Then
'                Set Node(i).Picture = LoadPicture(App.Path & "\ProgramIco\" & strTag & ".bmp")
'            Else
'                Set Node(i).Picture = LoadPicture(App.Path & "\ProgramIco\" & "A.bmp")
'            End If
'
'            Me.Node(i).Left = 2000 * (i Mod 6 - 1) + 100
'            Me.Picture3.Top = (Me.Height - 2400) - (i \ 6) * (Me.Node(i).Height + 100)
'            Me.Picture3.Height = Me.VtlMenu.Top + Me.VtlMenu.Height - Me.Picture3.Top
'            Me.Picture2.Height = Me.Picture3.Top - Me.Picture2.Top - 30
'            Me.Picture3.Width = Me.Picture2.Width
'
'            Me.Node(i).Top = Me.Picture3.Top + 100
'            'MsgBox Me.Picture3.Top & "|" & Me.Node(i).Top
'
'            Line4(i).x1 = Me.Node(i).Left + Me.Node(i).Width
'            Line4(i).Y1 = Me.Node(i).Top + Me.Node(i).Height / 2
'            Line4(i).x2 = Me.Node(i).Left + Me.Node(i).Width + 200
'            Line4(i).Y2 = Me.Node(i).Top + Me.Node(i).Height / 2
'            Load Me.lblCaption(i)
'            Me.lblCaption(i).Caption = LoadResString(Val(rstflow![FlowExplain]) & GLanguageID)
'            Me.lblCaption(i).Left = Me.Node(i).Left + Me.Node(i).Width - 1000
'            Me.lblCaption(i).Top = Me.Node(i).Top + 200
'            Me.Line4(i).Visible = True
'            Me.Node(i).Visible = True
'            Me.lblCaption(i).Visible = True
'        End If
'
'
'        rstflow.MoveNext
'    Loop
    
  
    'Me.Picture3.Top = Me.Node(i - 1).Top + Me.Node(i - 1).Height
    Me.Picture2.Visible = True
    
End Function

Private Sub LoadEmail()
    On Error Resume Next
    Me.Picture1.Visible = True
    Me.Picture2.Visible = False
    Me.TDBGrid1.Visible = True
    Me.lblSend.Visible = True
    Me.lblTopic.Visible = True
    Me.RTxtSummary.Visible = True
    Me.RtxtSend.Visible = False
    Me.cmdLink.Visible = False
    Me.cmdSend.Visible = False
    Me.TDBGrid1.Width = Me.Picture1.Width
    Me.TDBGrid1.Height = Me.Picture1.Height / 3
    Me.lblSend.Top = Me.TDBGrid1.Height + 200
    Me.lblTopic.Top = Me.TDBGrid1.Height + Me.lblSend.Height + 200
    Me.RTxtSummary.Top = Me.lblTopic.Top + Me.lblTopic.Height + 200
    Me.RTxtSummary.Width = Me.Picture1.Width
    Me.RTxtSummary.Height = Me.Picture1.Height - Me.RTxtSummary.Top - 400
    
End Sub

⌨️ 快捷键说明

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