?? 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 + -