📄 frmmain.vb
字号:
ofrmCSearch.MdiParent = Me
ofrmCSearch.Show()
End Sub
Private Sub MenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem7.Click
Dim ofrmIStatus As New frmIStatus
ofrmIStatus.MdiParent = Me
ofrmIStatus.Show()
End Sub
Private Sub MenuItem4_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click
Dim ofrmClient As New frmClient
ofrmClient.MdiParent = Me
ofrmClient.Show()
End Sub
Private Sub MenuItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem9.Click
Dim ofrmStatus As New frmStatus
ofrmStatus.MdiParent = Me
ofrmStatus.Show()
End Sub
Private Sub MenuItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem8.Click
If MsgBox("By clising this application, you might loose unsaved information!" & vbCrLf & "Do you want to continue?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, "Warning!") = MsgBoxResult.Yes Then
End
End If
End Sub
Dim x As Integer
Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem11.Click
If MsgBox("When you open this Attendance, only System Admin can close it !" & vbCrLf & vbCrLf & "Proceed?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, " Confirmation") = MsgBoxResult.Yes Then
Dim ofrmlog As New Form1
ofrmlog.MdiParent = Me
ofrmlog.Show()
End If
End Sub
Private Sub MenuItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem13.Click
Dim ofrmcandidate As New frmcandidate
ofrmcandidate.MdiParent = Me
ofrmcandidate.Show()
End Sub
Private Sub MenuItem14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem14.Click
Dim ofrmAgent As New frmAgent
ofrmAgent.MdiParent = Me
ofrmAgent.Show()
End Sub
Private Sub MenuItem15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem15.Click
Dim ofrmClient As New frmClient
ofrmClient.MdiParent = Me
ofrmClient.Show()
End Sub
Private Sub MenuItem24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem24.Click
If MsgBox("By clising this application, you might loose unsaved information!" & vbCrLf & "Do you want to continue?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, "Warning!") = MsgBoxResult.Yes Then
End
End If
End Sub
Private Sub MenuItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem17.Click
Dim ofrmCSearch As New frmCSearch
ofrmCSearch.MdiParent = Me
ofrmCSearch.Show()
End Sub
Private Sub MenuItem18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem18.Click
Dim ofrmStatus As New frmStatus
ofrmStatus.MdiParent = Me
ofrmStatus.Show()
End Sub
Private Sub MenuItem19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem19.Click
Dim ofrmIStatus As New frmIStatus
ofrmIStatus.MdiParent = Me
ofrmIStatus.Show()
End Sub
Private Sub MenuItem21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem21.Click
If MsgBox("When you open this Attendance, only System Admin can close it !" & vbCrLf & vbCrLf & "Proceed?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, " Confirmation") = MsgBoxResult.Yes Then
Dim ofrmlog As New Form1
ofrmlog.MdiParent = Me
ofrmlog.Show()
End If
End Sub
Private Sub MenuItem25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem25.Click
If MsgBox("By clising this application, you might loose unsaved information!" & vbCrLf & "Do you want to continue?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, "Warning!") = MsgBoxResult.Yes Then
End
End If
End Sub
Private Sub MenuItem27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem27.Click
Dim ofrno As New frmNoEmp
ofrno.MdiParent = Me
ofrno.Show()
End Sub
'Dim eno As New repCand
Private Sub MenuItem28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem28.Click
Dim ofrca As New frmNoCand
ofrca.MdiParent = Me
ofrca.Show()
End Sub
Private Sub MenuItem34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem34.Click
Dim ofrd As New adLog
ofrd.MdiParent = Me
ofrd.Show()
End Sub
Private Sub MenuItem35_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem35.Click
Dim ofrq As New emPyroll
ofrq.MdiParent = Me
ofrq.Show()
End Sub
Private Sub MenuItem31_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem31.Click
Dim ofrq As New delLog
ofrq.MdiParent = Me
ofrq.Show()
End Sub
Private Sub MenuItem36_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem36.Click
Dim ofrl As New frmNoClnts
ofrl.MdiParent = Me
ofrl.Show()
End Sub
Private Sub MenuItem37_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem37.Click
Dim ofrr As New frmNoAgnts
ofrr.MdiParent = Me
ofrr.Show()
End Sub
Private Sub MenuItem38_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem38.Click
Dim ofrq As New frmDailyAtt
ofrq.MdiParent = Me
ofrq.Show()
End Sub
Private Sub MenuItem41_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem41.Click
Dim ofq As New frmCurMnthPay
ofq.MdiParent = Me
ofq.Show()
End Sub
Private Sub MenuItem40_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem40.Click
Dim ofq As New frmPreMnthPay
ofq.MdiParent = Me
ofq.Show()
End Sub
Private Sub MenuItem42_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem42.Click
Dim ofq As New frmGenPay
ofq.MdiParent = Me
ofq.Show()
End Sub
Private Sub MenuItem48_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem48.Click
Dim ofh As New CanAllToday
ofh.MdiParent = Me
ofh.Show()
End Sub
Private Sub MenuItem47_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem47.Click
Dim oft As New frmIntervList
oft.MdiParent = Me
oft.Show()
End Sub
Private Sub MenuItem50_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem50.Click
Dim ofb As New frmAvJobs
ofb.MdiParent = Me
ofb.Show()
End Sub
Private Sub MenuItem51_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem51.Click
Dim ofb As New frmIndvTotalPay
ofb.MdiParent = Me
ofb.Show()
End Sub
Private Sub MenuItem52_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem52.Click
Dim ofm As New frmAddJob
ofm.MdiParent = Me
ofm.Show()
End Sub
Private Sub MenuItem68_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem68.Click
Dim ofq As New frmGenPay
ofq.MdiParent = Me
ofq.Show()
End Sub
Private Sub MenuItem56_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem56.Click
Dim ofrno As New frmNoEmp
ofrno.MdiParent = Me
ofrno.Show()
End Sub
Private Sub MenuItem57_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem57.Click
Dim ofrq As New frmDailyAtt
ofrq.MdiParent = Me
ofrq.Show()
End Sub
Private Sub MenuItem58_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem58.Click
Dim ofrca As New frmNoCand
ofrca.MdiParent = Me
ofrca.Show()
End Sub
Private Sub MenuItem60_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem60.Click
Dim ofh As New CanAllToday
ofh.MdiParent = Me
ofh.Show()
End Sub
Private Sub MenuItem61_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem61.Click
Dim oft As New frmIntervList
oft.MdiParent = Me
oft.Show()
End Sub
Private Sub MenuItem63_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem63.Click
Dim ofrl As New frmNoClnts
ofrl.MdiParent = Me
ofrl.Show()
End Sub
Private Sub MenuItem64_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem64.Click
Dim ofrr As New frmNoAgnts
ofrr.MdiParent = Me
ofrr.Show()
End Sub
Private Sub MenuItem66_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem66.Click
Dim ofq As New frmPreMnthPay
ofq.MdiParent = Me
ofq.Show()
End Sub
Private Sub MenuItem67_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem67.Click
Dim ofq As New frmCurMnthPay
ofq.MdiParent = Me
ofq.Show()
End Sub
Private Sub MenuItem69_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem69.Click
Dim ofb As New frmIndvTotalPay
ofb.MdiParent = Me
ofb.Show()
End Sub
Private Sub MenuItem71_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem71.Click
Dim ofb As New frmAvJobs
ofb.MdiParent = Me
ofb.Show()
End Sub
Private Sub MenuItem22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem22.Click
Dim ofrq As New emPyroll
ofrq.MdiParent = Me
ofrq.Show()
End Sub
Private Sub MenuItem73_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem73.Click
Dim ofrq As New delLog
ofrq.MdiParent = Me
ofrq.Show()
End Sub
Private Sub MenuItem75_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem75.Click
Dim ofrd As New adLog
ofrd.MdiParent = Me
ofrd.Show()
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub MenuItem30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem30.Click
Try
Dim sDBFile As String = "C:\Program Files\HRMS\HRMS.mdb"
Dim sBackUpFile As String = "C:\HRMSdbBackUps"
If Not System.IO.Directory.Exists(sBackUpFile) Then
System.IO.Directory.CreateDirectory(sBackUpFile)
End If
sBackUpFile &= "\HRMSp1BackUp.mdb"
'First check the file u want to compact exists or not
If File.Exists(sDBFile) Then
Dim db As New OleDb.OleDbConnection
'CompactDatabase has two parameters, creates a copy of compact DB at the Destination path
FileCopy(sDBFile, sBackUpFile)
End If
'restore the original file from the compacted file
If File.Exists(sBackUpFile) Then
File.Copy(sDBFile, sBackUpFile, True)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
MsgBox("Part 1 of HRMS database was backedUp successfully !" & vbCrLf & "This Backup can bi found in C:\HRMSdbBackUps\HRMSp1BackUp.mdb ", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "HRMS Database!")
End Sub
Private Sub MenuItem76_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem76.Click
Try
Dim sDBFile As String = "C:\Program Files\HRMS\bin\EIS.mdb"
Dim sBackUpFile As String = "C:\HRMSdbBackUps"
If Not System.IO.Directory.Exists(sBackUpFile) Then
System.IO.Directory.CreateDirectory(sBackUpFile)
End If
sBackUpFile &= "\HRMSp2BackUp.mdb"
'First check the file u want to compact exists or not
If File.Exists(sDBFile) Then
Dim db As New OleDb.OleDbConnection
'CompactDatabase has two parameters, creates a copy of compact DB at the Destination path
FileCopy(sDBFile, sBackUpFile)
End If
'restore the original file from the compacted file
If File.Exists(sBackUpFile) Then
File.Copy(sDBFile, sBackUpFile, True)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
MsgBox("Part 2 of HRMS database was backedUp successfully !" & vbCrLf & "This Backup can bi found in C:\HRMSdbBackUps\HRMSp2BackUp.mdb ", MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "HRMS Database!")
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -