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

📄 frmmenu.frm

📁 公司人力资源管理 数据库要求:Access 2000或者更高的版本。 系统要求:Windows系列操作系统。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form popmenu 
   Caption         =   "菜单"
   ClientHeight    =   5430
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6900
   LinkTopic       =   "Form1"
   ScaleHeight     =   5430
   ScaleWidth      =   6900
   StartUpPosition =   3  '窗口缺省
   Begin VB.Menu popmenu 
      Caption         =   "popmenu"
      Visible         =   0   'False
      Begin VB.Menu add 
         Caption         =   "添加员工基本信息"
      End
      Begin VB.Menu Change 
         Caption         =   "修改员工基本信息"
      End
      Begin VB.Menu Check 
         Caption         =   "查询员工基本信息"
      End
      Begin VB.Menu Del 
         Caption         =   "删除员工基本信息"
      End
   End
   Begin VB.Menu popmenu1 
      Caption         =   "popmenu1"
      Visible         =   0   'False
      Begin VB.Menu addInOut 
         Caption         =   "添加上下班信息"
      End
      Begin VB.Menu checkKQ1 
         Caption         =   "查询考勤信息"
      End
      Begin VB.Menu delKQ1 
         Caption         =   "删除上下班信息"
      End
   End
   Begin VB.Menu popmenu2 
      Caption         =   "popmenu2"
      Visible         =   0   'False
      Begin VB.Menu addOtherKQ 
         Caption         =   "添加其他考勤信息"
      End
      Begin VB.Menu checkKQ2 
         Caption         =   "查询考勤信息"
      End
      Begin VB.Menu delKQ2 
         Caption         =   "删除其他考勤信息"
      End
   End
   Begin VB.Menu popmenu3 
      Caption         =   "popmenu3"
      Visible         =   0   'False
      Begin VB.Menu addAlteration 
         Caption         =   "添加调动信息"
      End
      Begin VB.Menu ChangeAlter 
         Caption         =   "修改调动信息"
      End
      Begin VB.Menu Checkalter 
         Caption         =   "查询调动信息"
      End
      Begin VB.Menu DelAlter 
         Caption         =   "删除调动信息"
      End
   End
End
Attribute VB_Name = "popmenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public str1 As String

Private Sub add_Click()                             '添加员工信息
    flag = 1
    frmStuff_info.Show vbModal
    frmStuff_info.ZOrder 0
    frmResult.ZOrder 1
End Sub

Private Sub addAlteration_Click()                   '添加调动信息
    flag = 1
    frmAlteration.Show
    frmAlteration.ZOrder 0
End Sub

Private Sub addInOut_Click()                        '添加上下班信息
    flag = 1
    FrmAttendance.Show
    FrmAttendance.ZOrder 0
End Sub

Private Sub AddOtherKQ_Click()                       '添加其他考勤信息
    flag = 1
    frmOtherKQ.Show
    frmOtherKQ.ZOrder 0
End Sub

Private Sub change_Click()                           '修改员工信息
    flag = 2
    If frmResult.rsGrid.Rows > 1 Then
        gSQL = "select * from StuffInfo where SID='" & Trim(frmResult.rsGrid.TextMatrix( _
                frmResult.rsGrid.Row, 0)) & "'"
        frmStuff_info.Show
        frmStuff_info.ZOrder 0
    Else
     MsgBox "目前没有员工信息,请先添加员工信息!", vbOKOnly + vbExclamation, "警告!"
     flag = 1
     frmStuff_info.Show
    End If
End Sub

Private Sub ChangeAlter_Click()                      '修改调动信息
    Dim rs As New ADODB.Recordset
    flag = 2
    frmAlteration.Caption = "修改员工调动信息"
    If frmAlterationResult.DataGrid1.Row < 0 Then
        MsgBox "目前没有记录!", vbOKOnly + vbExclamation, "提示!"
        flag = 1
        frmAlteration.Show
        frmAlteration.ZOrder 0
    Else
       str1 = "select * from AlterationInfo where ID=" & Trim( _
            frmAlterationResult.DataGrid1.Columns(0))
        frmAlteration.ID = Trim(frmAlterationResult.DataGrid1.Columns(0))
        Set rs = TransactSQL(str1)
        If rs.EOF = False Then
        With rs
            frmAlteration.AID = rs(1)
            frmAlteration.AName = rs(2)
            frmAlteration.AOldDept = rs(3)
            frmAlteration.ANewDept = rs(4)
            frmAlteration.AOldPosition = rs(5)
            frmAlteration.ANewPosition = rs(6)
            frmAlteration.AOutTime = rs(7)
            frmAlteration.AInTime = rs(8)
            frmAlteration.ARemark = rs(9)
        End With
            rs.Close
        End If
        frmAlteration.Show
        frmAlteration.ZOrder 0
    End If
End Sub

Private Sub check_Click()                            '查询员工信息
    frmCheckStuff.Show
End Sub

Private Sub checkKQ1_Click()                         '查询考勤班信息
    frmCheckKQ.Show
    frmCheckKQ.ZOrder 0
End Sub

Private Sub checkKQ2_Click()                         '查询考勤班信息
    frmCheckKQ.Show
    frmCheckKQ.ZOrder 0
End Sub

Private Sub del_Click()                              '删除员工信息
    Dim SQL As String
    If frmResult.rsGrid.Rows = 1 Then
        MsgBox "目前没有员工信息,请先添加员工信息!", vbOKOnly + vbExclamation, "警告!"
        flag = 1
        frmStuff_info.Show
        frmStuff_info.ZOrder 0
    Else
        SQL = "delete from StuffInfo where SID='" & Trim(frmResult.rsGrid.TextMatrix( _
                frmResult.rsGrid.Row, 0)) & "'"
        If MsgBox("真的要删除这条记录么?", vbOKCancel + vbExclamation, "提示!") = vbOK _
        Then
        TransactSQL (SQL)
        MsgBox "员工信息记录已经删除!", vbOKOnly + vbExclamation, "警告!"
        Unload Me
        SQL = "select * from StuffInfo"
        frmResult.createList (SQL)
        frmResult.Show
        End If
    End If
End Sub

Private Sub DelAlter_Click()                         '删除调动信息
    Dim SQL As String
    If frmAlterationResult.DataGrid1.Row < 0 Then
        MsgBox "目前没有记录!", vbOKOnly + vbExclamation, "提示!"
        flag = 1
        frmAlteration.Show
        frmAlteration.ZOrder 0
    Else
        SQL = "delete from AlterationInfo where ID=" & Trim( _
            frmAlterationResult.DataGrid1.Columns(0).CellText( _
            frmAlterationResult.DataGrid1.Bookmark))
        If MsgBox("真的要删除这条记录么?", vbOKCancel) = vbOK Then
            TransactSQL (SQL)
            MsgBox "记录已经删除!", vbOKOnly + vbExclamation, "提示!"
            SQL = "select * from AlterationInfo order by ID"
            frmAlterationResult.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\Person.mdb"
            frmAlterationResult.Adodc1.RecordSource = SQL
            If SQL <> "" Then
                frmAlterationResult.Adodc1.Refresh
            End If
            Set frmAlterationResult.DataGrid1.DataSource = frmAlterationResult.Adodc1.Recordset
            frmAlterationResult.DataGrid1.Refresh
            frmAlterationResult.Show
            frmAlterationResult.ZOrder 0
        End If
    End If
End Sub

Private Sub delKQ1_Click()                           '删除上下班信息
    Dim SQL As String
    If frmAResult.recordlist.Rows = 1 Then
        MsgBox "目前没有上下班信息!", vbOKOnly + vbExclamation, "警告!"
        flag = 1
        FrmAttendance.Show
        FrmAttendance.ZOrder 0
    Else
        SQL = "delete from AttendanceInfo where ID='" & Trim(frmAResult.recordlist.TextMatrix( _
                frmAResult.recordlist.Row, 0)) & "'"
        If MsgBox("真的要删除这条记录么?", vbOKCancel + vbExclamation, "提示!") = vbOK _
        Then
        TransactSQL (SQL)
        MsgBox "记录已经删除!", vbOKOnly + vbExclamation, "警告!"
        Unload Me
        SQL = "select * from AttendanceInfo"
        frmAResult.ListTopic
        frmAResult.ShowData (SQL)
        frmAResult.Show
        End If
    End If
End Sub

Private Sub delKQ2_Click()                            '删除其他考勤信息
    Dim SQL As String
    Select Case frmOKQResult.SSTab.Caption
    Case "员工请假信息列表"
        If frmOKQResult.LRecordList.Rows = 1 Then
            MsgBox "目前没有请假信息!", vbOKOnly + vbExclamation, "警告!"
            flag = 1
            frmOtherKQ.Show
            frmOtherKQ.ZOrder 0
        Else
            SQL = "delete from LeaveInfo where LID='"
            SQL = SQL & Trim(frmOKQResult.LRecordList.TextMatrix( _
                                    frmOKQResult.LRecordList.Row, 0)) & "'"
            If MsgBox("真的要删除这条记录么?", vbOKCancel + vbExclamation, "提示!") = vbOK _
            Then
                TransactSQL (SQL)
                MsgBox "记录已经删除!", vbOKOnly + vbExclamation, "警告!"
                Unload Me
                SQL = "select * from LeaveInfo"
                Call frmOKQResult.LeaveTopic
                Call frmOKQResult.ShowLRecord(SQL)
            End If
        End If
    Case "员工加班信息列表"
        If frmOKQResult.ORecordList.Rows = 1 Then
            MsgBox "目前没有加班信息!", vbOKOnly + vbExclamation, "警告!"
            flag = 1
            frmOtherKQ.Show
            frmOtherKQ.ZOrder 0
        Else
            SQL = "delete from OvertimeInfo where OID='"
            SQL = SQL & Trim(frmOKQResult.ORecordList.TextMatrix( _
                                    frmOKQResult.ORecordList.Row, 0)) & "'"
            If MsgBox("真的要删除这条记录么?", vbOKCancel + vbExclamation, "提示!") = vbOK _
            Then
                TransactSQL (SQL)
                MsgBox "记录已经删除!", vbOKOnly + vbExclamation, "警告!"
                Unload Me
                SQL = "select * from OvertimeInfo"
                Call frmOKQResult.OverTimeTopic
                Call frmOKQResult.ShowORecord(SQL)
            End If
        End If
    Case "员工出差信息列表"
        If frmOKQResult.ERecordList.Rows = 1 Then
            MsgBox "目前没有出差信息!", vbOKOnly + vbExclamation, "警告!"
            flag = 1
            frmOtherKQ.Show
            frmOtherKQ.ZOrder 0
        Else
            SQL = "delete from ErrandInfo where EID='"
            SQL = SQL & Trim(frmOKQResult.ERecordList.TextMatrix( _
                                    frmOKQResult.ERecordList.Row, 0)) & "'"
            If MsgBox("真的要删除这条记录么?", vbOKCancel + vbExclamation, "提示!") = vbOK _
            Then
                TransactSQL (SQL)
                MsgBox "记录已经删除!", vbOKOnly + vbExclamation, "警告!"
                Unload Me
                SQL = "select * from ErrandInfo"
                Call frmOKQResult.ErrandTopic
                Call frmOKQResult.ShowERecord(SQL)
            End If
        End If
    End Select
End Sub

⌨️ 快捷键说明

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