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

📄 frmmain.frm

📁 人事管理信息系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.MDIForm frmMain 
   BackColor       =   &H8000000C&
   Caption         =   "企业人事管理信息系统"
   ClientHeight    =   5265
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   6690
   LinkTopic       =   "MDIForm1"
   StartUpPosition =   3  'Windows Default
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   1680
      Top             =   2640
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   7
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0000
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":015A
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":02B4
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0706
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0860
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":09BA
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0CD4
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar tbToolBar 
      Align           =   1  'Align Top
      Height          =   855
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   6690
      _ExtentX        =   11800
      _ExtentY        =   1508
      ButtonWidth     =   1455
      ButtonHeight    =   1349
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   8
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "添加"
            Key             =   "Add"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "修改"
            Key             =   "Edit"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "删除"
            Key             =   "Delete"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "刷新"
            Key             =   "Refresh"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "查询"
            Key             =   "Find"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "报表预览"
            Key             =   "Preview"
            ImageIndex      =   6
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Caption         =   "报表打印"
            Key             =   "Print"
            ImageIndex      =   7
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.StatusBar sbStatusBar 
      Align           =   2  'Align Bottom
      Height          =   270
      Left            =   0
      TabIndex        =   0
      Top             =   4995
      Width           =   6690
      _ExtentX        =   11800
      _ExtentY        =   476
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   6138
            Text            =   "Status"
            TextSave        =   "Status"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            AutoSize        =   2
            TextSave        =   "2005-12-3"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            AutoSize        =   2
            TextSave        =   "12:36"
         EndProperty
      EndProperty
   End
   Begin VB.Menu menuSystem 
      Caption         =   "系统"
      Begin VB.Menu menuAdduser 
         Caption         =   "添加用户"
      End
      Begin VB.Menu menuModifypwd 
         Caption         =   "修改密码"
      End
      Begin VB.Menu menuExit 
         Caption         =   "退出系统"
      End
   End
   Begin VB.Menu menuManrecord 
      Caption         =   "员工基本信息"
      Visible         =   0   'False
   End
   Begin VB.Menu menuCheck 
      Caption         =   "员工考勤管理"
      Visible         =   0   'False
   End
   Begin VB.Menu menuManapprise 
      Caption         =   "员工工作评价管理"
      Visible         =   0   'False
   End
   Begin VB.Menu menuPay 
      Caption         =   "员工工资管理"
      Visible         =   0   'False
   End
   Begin VB.Menu mnuWork 
      Caption         =   "操作(&O)"
      Visible         =   0   'False
      Begin VB.Menu mnuWorkAdd 
         Caption         =   "添加(&A)"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuWorkEdit 
         Caption         =   "修改(&E)"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuWorkDelete 
         Caption         =   "删除(&D)"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuWorkRefresh 
         Caption         =   "刷新(&R)"
      End
      Begin VB.Menu mnuWorkFind 
         Caption         =   "查询(&F)"
      End
      Begin VB.Menu mnusysn 
         Caption         =   "-"
      End
      Begin VB.Menu mnuPreview 
         Caption         =   "报表预览"
      End
      Begin VB.Menu mnuPrint 
         Caption         =   "报表打印"
      End
   End
   Begin VB.Menu menuHelp 
      Caption         =   "帮助"
      Begin VB.Menu menuAbout 
         Caption         =   "About"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub MDIForm_Load()
    Dim sSql As String
    Dim recTest As ADODB.Recordset
    Dim recTemp As ADODB.Recordset
    Dim MsgText As String
    
    Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
    Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
    Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
    Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
    
    '进入时间
    sDate = Format(Now, "yyyy-mm-dd hh:mm")
    
    
    '根据权限显示菜单
    sSql = "select * from permission where id='" & sUserName & "'"
    Set recTest = ExecuteSQL(sSql, MsgText)
    
    Do While Not recTest.EOF
        Select Case recTest!module
            Case 10
                menuManrecord.Visible = True
                '写日志
                sSql = "INSERT log (id,date,module) values ('" & sUserName & "','" & sDate & "',10)"
                'Set recTemp = ExecuteSQL(SQLDATEMODE, MsgText)
                'recTemp.Close
                
                
                Set recTemp = ExecuteSQL(sSql, MsgText)
                'recTemp.Close

            Case 11
                menuCheck.Visible = True
                '写日志
                sSql = "INSERT log (id,date,module) values ('" & sUserName & "','" & sDate & "',11)"
                'Set recTemp = ExecuteSQL(SQLDATEMODE, MsgText)
                'recTemp.Close
                
                
                Set recTemp = ExecuteSQL(sSql, MsgText)
                'recTemp.Close
                
            Case 12
                menuManapprise.Visible = True
                '写日志
                sSql = "INSERT log (id,date,module) values ('" & sUserName & "','" & sDate & "',12)"
                'Set recTemp = ExecuteSQL(SQLDATEMODE, MsgText)
                'recTemp.Close
                
                
                Set recTemp = ExecuteSQL(sSql, MsgText)
                'recTemp.Close
                
            Case 13
                menuPay.Visible = True
                '写日志
                sSql = "INSERT log (id,date,module) values ('" & sUserName & "','" & sDate & "',13)"
                'Set recTemp = ExecuteSQL(SQLDATEMODE, MsgText)
                'recTemp.Close
                
                
                Set recTemp = ExecuteSQL(sSql, MsgText)
                'recTemp.Close
               
        End Select

        
        recTest.MoveNext
    Loop
    
  
End Sub





Private Sub MDIForm_Unload(Cancel As Integer)
    If Me.WindowState <> vbMinimized Then
        SaveSetting App.Title, "Settings", "MainLeft", Me.Left
        SaveSetting App.Title, "Settings", "MainTop", Me.Top
        SaveSetting App.Title, "Settings", "MainWidth", Me.Width
        SaveSetting App.Title, "Settings", "MainHeight", Me.Height
    End If
End Sub

Private Sub menuAddpay_Click()
End Sub

Private Sub menuCheck_Click()
        frmCheck.txtSQL = "select * from checkin "
        frmCheck.reportSQL = "{checkin.kqname} like '*'"
        frmCheck.Show
End Sub

Private Sub menuInquirepay_Click()
End Sub

Private Sub menuManapprise_Click()
        frmManApp.txtSQL = "select pjno,pjdept,pjid,pjname,pjdate,pjresult,pjposition,pjlevel,pjother1,pjother2,pjremark from manappraise"
        frmManApp.reportSQL = "{manappraise.pjname} like '*'"
        frmManApp.Show
End Sub

Private Sub menuManrecord_Click()
       frmManRecord.txtSQL = "select * from manrecord "
        frmManRecord.reportSQL = "{manrecord.ygname} like '*'"
       frmManRecord.Show

End Sub
Private Sub menuPay_Click()
        frmPay.txtSQL = "select * from pay"
frmPay.reportSQL = "{pay.gzname} like '*'"
        frmPay.Show
End Sub

Private Sub mnuPreview_Click()
'
    If Trim(ActiveForm.reportSQL) <> "" Then
        frmPreview.reportSQL = ActiveForm.reportSQL
        frmPreview.reportName = App.Path & "\rpt\" & ActiveForm.reportName
        frmPreview.Show
    Else
        MsgBox "当前模块没有供打印的报表!", vbOKOnly, "报表预览"
    End If
End Sub

Private Sub mnuPrint_Click()
    Dim CRXApplication As New CRAXDRT.Application
    Dim CRXReport As CRAXDRT.Report
    Dim reportName As String
    
    If Trim(ActiveForm.reportSQL) <> "" Then
        reportName = App.Path & "\rpt\" & ActiveForm.reportName
        Set CRXReport = CRXApplication.OpenReport(reportName)
        CRXReport.RecordSelectionFormula = ActiveForm.reportSQL
        CRXReport.PrintOut
    Else
        MsgBox "当前模块没有供打印的报表!", vbOKOnly, "报表打印"
    End If
    


End Sub
Private Sub mnuWindowArrangeIcons_Click()
    Me.Arrange vbArrangeIcons
End Sub


Private Sub mnuWindowCascade_Click()
    Me.Arrange vbCascade
End Sub


Private Sub mnuWindowTileHorizontal_Click()
    Me.Arrange vbTileHorizontal
End Sub


Private Sub mnuWindowTileVertical_Click()
    Me.Arrange vbTileVertical
End Sub

Private Sub mnuWorkAdd_Click()
    ActiveForm.RecordAdd

End Sub
Private Sub mnuWorkDelete_Click()
    ActiveForm.RecordDelete
End Sub

Private Sub mnuWorkEdit_Click()
    ActiveForm.RecordEdit
End Sub

Private Sub mnuWorkFind_Click()
    ActiveForm.RecordFind
End Sub
Private Sub mnuWorkRefresh_Click()
    ActiveForm.RecordRefresh
End Sub


Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
        Case "Add"
            mnuWorkAdd_Click
        Case "Edit"
            mnuWorkEdit_Click
        Case "Delete"
            mnuWorkDelete_Click
        Case "Refresh"
            mnuWorkRefresh_Click
        Case "Find"
            mnuWorkFind_Click
        Case "Print"
            mnuPrint_Click
        Case "Preview"
            mnuPreview_Click
    End Select

End Sub

⌨️ 快捷键说明

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