📄 frmmain.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm frmMain
BackColor = &H8000000C&
Caption = "企业人事管理信息系统"
ClientHeight = 5250
ClientLeft = 165
ClientTop = 735
ClientWidth = 6690
LinkTopic = "MDIForm1"
StartUpPosition = 3 '窗口缺省
WindowState = 2 'Maximized
Begin MSComctlLib.StatusBar sbStatusBar
Align = 2 'Align Bottom
Height = 270
Left = 0
TabIndex = 0
Top = 4980
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 = 6165
Text = "Status"
TextSave = "Status"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
AutoSize = 2
TextSave = "2005-4-24"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
AutoSize = 2
TextSave = "3:44"
EndProperty
EndProperty
End
Begin VB.Menu menuSystem
Caption = "系统管理"
Begin VB.Menu menuAdduser
Caption = "添加用户"
End
Begin VB.Menu menuDeluser
Caption = "删除用户"
End
Begin VB.Menu menuModifypwd
Caption = "修改密码"
End
Begin VB.Menu menuExit
Caption = "退出系统"
End
End
Begin VB.Menu menuManrecord
Caption = "员工基本信息"
Begin VB.Menu menuAddrecord
Caption = "添加员工信息"
End
Begin VB.Menu menuModifyrecord
Caption = "修改员工信息"
End
Begin VB.Menu menuDelete
Caption = "删除员工信息"
End
Begin VB.Menu menuInquirerecord
Caption = "员工信息查询"
End
End
Begin VB.Menu menuCheck
Caption = "员工考勤管理"
Begin VB.Menu menuAddcheck
Caption = "添加考勤信息"
End
Begin VB.Menu menuModifychek
Caption = "修改考勤信息"
End
Begin VB.Menu menuDeletecheck
Caption = "删除考勤信息"
End
Begin VB.Menu menuInquirechek
Caption = "考勤信息查询"
End
End
Begin VB.Menu menuPay
Caption = "员工工资管理"
Begin VB.Menu menuAddpay
Caption = "计发员工工资信息"
End
Begin VB.Menu menuModifypay
Caption = "修改员工工资信息"
End
Begin VB.Menu menuInquirepay
Caption = "员工工资信息查询"
End
End
Begin VB.Menu menuPrint
Caption = "打印报表"
Begin VB.Menu menuPrint_pay
Caption = "打印个人工资"
End
Begin VB.Menu menuPrint_Allpay
Caption = "打印工资汇总表"
End
End
Begin VB.Menu menuHelp
Caption = "帮助"
Begin VB.Menu menuAbout
Caption = "关于"
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Private Const MF_BYPOSITION = &H400&
Private Sub MDIForm_Load()
Dim hwndMenu As Long
Dim c As Long
hwndMenu = GetSystemMenu(Me.hwnd, 0)
c = GetMenuItemCount(hwndMenu)
DeleteMenu hwndMenu, c - 1, MF_BYPOSITION
c = GetMenuItemCount(hwndMenu)
DeleteMenu hwndMenu, c - 2, MF_BYPOSITION
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)
flagEdit = False
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
Unload Me
End Sub
Private Sub menuAbout_Click()
frmAbout.Show
End Sub
Private Sub menuAddcheck_Click()
gintMode = 1
frmCheck1.Show
frmCheck1.ZOrder 0
End Sub
Private Sub menuAddpay_Click()
gintMode = 1
frmPay1.Show
frmPay1.ZOrder 0
End Sub
Private Sub menuAddrecord_Click()
gintMode = 1
frmManRecord1.Show
frmManRecord1.ZOrder 0
End Sub
Private Sub menuAdduser_Click()
frmAdduser.Show
End Sub
Private Sub menuDelete_Click()
Dim txtSQL As String
Dim MsgText As String
Dim intCount As Integer
Dim mrc As ADODB.Recordset
If flagEdit Then
If frmManRecord.msgList.Rows > 1 Then
If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
intCount = frmManRecord.msgList.Row
txtSQL = "delete from manrecord where ygid='" & Trim(frmManRecord.msgList.TextMatrix(frmManRecord.msgList.Row, 1)) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
frmManRecord.txtSQL = "select * from manrecord"
flagEdit = True
frmManRecord.ShowTitle
frmManRecord.ShowData
End If
End If
Else
MsgBox "请选择要删除的记录?", vbOKOnly + vbExclamation, "警告"
frmManRecord.txtSQL = "select * from manrecord"
frmManRecord.Show
frmManRecord.ZOrder 0
End If
End Sub
Private Sub menuDeletecheck_Click()
Dim txtSQL As String
Dim MsgText As String
Dim intCount As Integer
Dim mrc As ADODB.Recordset
If flagEdit Then
If frmCheck.msgList.Rows > 1 Then
If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
intCount = frmCheck.msgList.Row
txtSQL = "delete from checkin where kqid='" & Trim(frmCheck.msgList.TextMatrix(frmCheck.msgList.Row, 1)) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
frmCheck.txtSQL = "select * from checkin"
flagEdit = True
frmCheck.ShowTitle
frmCheck.ShowData
End If
End If
Else
MsgBox "请选择要删除的记录?", vbOKOnly + vbExclamation, "警告"
frmManRecord.txtSQL = "select * from manrecord"
frmManRecord.Show
frmManRecord.ZOrder 0
End If
End Sub
Private Sub menuDeluser_Click()
frmDeleuser.Show
End Sub
Private Sub menuExit_Click()
ExitProcess 0
End Sub
Private Sub menuInquirechek_Click()
frmCheck2.Show
End Sub
Private Sub menuInquirepay_Click()
frmPay2.Show
End Sub
Private Sub menuInquirerecord_Click()
frmManRecord2.Show '注意!!!!!
End Sub
Private Sub menuModifychek_Click()
On Error Resume Next
Dim intCount As Integer
If flagEdit Then
gintMode = 2
If frmCheck.msgList.Rows > 1 Then
intCount = frmCheck.msgList.Row
frmCheck1.txtSQL = "select * from checkin where kqid='" & Trim(frmCheck.msgList.TextMatrix(intCount, 1)) & "'"
frmCheck1.Show
Else
Call menuAddcheck_Click
End If
Else
MsgBox "请选择要修改的记录?", vbOKOnly + vbExclamation, "警告"
frmCheck.txtSQL = "select * from checkin"
frmCheck.Show
frmCheck.ZOrder 0
End If
End Sub
Private Sub menuModifypay_Click()
On Error Resume Next
Dim intCount As Integer
If flagEdit Then
gintMode = 2
If frmPay.msgList.Rows > 1 Then
intCount = frmPay.msgList.Row
frmPay1.txtSQL = "select * from pay where gzid='" & Trim(frmPay.msgList.TextMatrix(frmPay.msgList.Row, 1)) & "' and year(gzdate)='" & Year(Format(frmPay.msgList.TextMatrix(intCount, 16), "yyyy-mm-dd")) & "' and month(gzdate)='" & Month(Format(frmPay.msgList.TextMatrix(intCount, 16), "yyyy-mm-dd")) & "'"
frmPay1.Show
Else
Call menuAddpay_Click
End If
Else
MsgBox "请选择要修改的记录?", vbOKOnly + vbExclamation, "警告"
frmPay.txtSQL = "select * from pay"
frmPay.Show
frmPay.ZOrder 0
End If
End Sub
Private Sub menuModifypwd_Click()
frmModifyuserinfo.Show
End Sub
Private Sub menuModifyrecord_Click()
On Error Resume Next
Dim intCount As Integer
If flagEdit Then
gintMode = 2
If frmManRecord.msgList.Rows > 1 Then
intCount = frmManRecord.msgList.Row
frmManRecord1.txtSQL = "select * from manrecord where ygid='" & Trim(frmManRecord.msgList.TextMatrix(frmManRecord.msgList.Row, 1)) & "'"
frmManRecord1.Show
Else
Call menuAddrecord_Click
End If
Else
MsgBox "请选择要修改的记录?", vbOKOnly + vbExclamation, "警告"
frmManRecord.txtSQL = "select * from manrecord"
frmManRecord.Show
frmManRecord.ZOrder 0
End If
End Sub
Private Sub menuPrint_Allpay_Click()
pay_total.Show
End Sub
Private Sub menuPrint_pay_Click()
pay_personal.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -