frmmain.frm
来自「企业工资管理系统的具体实现」· FRM 代码 · 共 499 行
FRM
499 行
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.MDIForm frmmain
BackColor = &H8000000C&
Caption = "桐乡巨人公司工资管理系统"
ClientHeight = 5460
ClientLeft = 165
ClientTop = 855
ClientWidth = 10590
Icon = "frmmain.frx":0000
LinkTopic = "MDIForm1"
MousePointer = 1 'Arrow
OLEDropMode = 1 'Manual
Picture = "frmmain.frx":030A
StartUpPosition = 3 '窗口缺省
WindowState = 2 'Maximized
Begin MSAdodcLib.Adodc Adodc1
Align = 1 'Align Top
Height = 360
Left = 0
Top = 690
Visible = 0 'False
Width = 10590
_ExtentX = 18680
_ExtentY = 635
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 690
Left = 0
TabIndex = 0
Top = 0
Width = 10590
_ExtentX = 18680
_ExtentY = 1217
ButtonWidth = 1773
ButtonHeight = 1164
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 13
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "职工录入"
Key = "bmdj"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "车间设置"
Key = "cjsz"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "工作分配"
Key = "gzfp"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "日工作登记"
Key = "rgzdj"
ImageIndex = 4
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "其他登记"
Key = "qtdj"
ImageIndex = 5
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "借款登记"
Key = "jkdj"
ImageIndex = 6
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "月工资统计"
Key = "ygztj"
ImageIndex = 7
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "年工资统计"
Key = "ngztj"
ImageIndex = 8
EndProperty
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "用户密码"
Key = "yhmm"
ImageIndex = 9
EndProperty
BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "tc"
ImageIndex = 10
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ImageList1
Left = 3015
Top = 2160
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 25
ImageHeight = 25
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 10
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmmain.frx":11A2B
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmmain.frx":11E7F
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmmain.frx":122D3
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmmain.frx":12727
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmmain.frx":12B7B
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmmain.frx":12FCF
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmmain.frx":13423
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmmain.frx":13877
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmmain.frx":13CCB
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmmain.frx":149A7
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu data1
Caption = "数据设置"
Begin VB.Menu recorddj
Caption = "职工录入"
End
Begin VB.Menu factorysz
Caption = "车间设置"
End
Begin VB.Menu workfp
Caption = "工作分配"
End
End
Begin VB.Menu data2
Caption = "数据采集"
Begin VB.Menu datagzdj
Caption = "日工作登记"
End
Begin VB.Menu otherdj
Caption = "其它登记"
End
Begin VB.Menu recomddj
Caption = "借款登记"
End
Begin VB.Menu line1
Caption = "-"
End
Begin VB.Menu monthgztj
Caption = "月工资统计"
End
Begin VB.Menu yeargztj
Caption = "年工资统计"
End
End
Begin VB.Menu data3
Caption = "数据查询"
Begin VB.Menu workfpcc
Caption = "工作分配查询"
End
Begin VB.Menu workqkcc
Caption = "工作情况查询"
Begin VB.Menu workzccc
Caption = "工作正常查询"
End
Begin VB.Menu workewcc
Caption = "工作额外查询"
End
End
Begin VB.Menu line2
Caption = "-"
End
Begin VB.Menu monthgzcc
Caption = "月工资查询"
End
Begin VB.Menu yeargzcc
Caption = "年工资查询"
End
Begin VB.Menu recomdcc
Caption = "借款查询"
End
End
Begin VB.Menu data4
Caption = "数据打印"
Begin VB.Menu monthgzdy
Caption = "月工资打印"
End
Begin VB.Menu yeargzdy
Caption = "年工资打印"
End
End
Begin VB.Menu system
Caption = "系统维护"
Begin VB.Menu databf
Caption = "数据备份"
End
Begin VB.Menu workerwh
Caption = "职工信息维护"
End
Begin VB.Menu datacsh
Caption = "数据初始化"
End
Begin VB.Menu line3
Caption = "-"
End
Begin VB.Menu usersz
Caption = "用户设置"
End
End
Begin VB.Menu help
Caption = "帮助"
Begin VB.Menu about
Caption = "关于"
End
Begin VB.Menu explaine
Caption = "软件说明"
End
Begin VB.Menu line4
Caption = "-"
End
Begin VB.Menu exit
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 Sub about_Click()
frm.Show
End Sub
Private Sub databf_Click()
frmsjbf.Show 1
End Sub
Private Sub datacsh_Click()
Dim cnn As New ADODB.Connection
Dim i As Integer
If MsgBox("警告!数据初始化操作将删除数据库中的所有数据," & Chr(10) & Chr(13) & "如果没有必要,请按“取消”后不进行初始化!", vbExclamation + vbOKCancel, "警告!") = vbOK Then
With cnn
.Open constr
.Execute "delete from bmb"
.Execute "delete from bmb1"
.Execute "delete from cjb"
.Execute "delete from grfpb"
.Execute "delete from gzkcb"
.Execute "delete from jzb"
.Execute "delete from ygzqkb"
.Execute "delete from gzzjb"
.Execute "delete from temp"
For i = 1 To 12
If Len(Trim(Str$(i))) = 1 Then
.Execute "delete from sbqkb" & Trim("0" & Trim(Str$(i)))
Else
.Execute "delete from sbqkb" & Trim(Str$(i))
End If
Next i
.Close
End With
Set cnn = Nothing
With frmmain
.Toolbar1.Buttons(5).Enabled = False
.Toolbar1.Buttons(6).Enabled = False
.Toolbar1.Buttons(7).Enabled = False
.datagzdj.Enabled = False
.otherdj.Enabled = False
.recomddj.Enabled = False
.Toolbar1.Buttons(1).Enabled = True
.recorddj.Enabled = True
End With
MsgBox "数据初始化完成!", vbInformation, "提示"
Else
Exit Sub
End If
End Sub
Private Sub datagzdj_Click()
frmrgzdj.Show
End Sub
Private Sub exit_Click()
End
End Sub
Private Sub explaine_Click()
frmljsm.Show 1
End Sub
Private Sub factorysz_Click()
frmcjsz.Show 1
End Sub
Private Sub MDIForm_Load()
With Adodc1
.ConnectionString = constr
.RecordSource = "select * from grfpb"
.Refresh
If .Recordset.EOF And .Recordset.BOF Then
With frmmain
.Toolbar1.Buttons(5).Enabled = False
.Toolbar1.Buttons(6).Enabled = False
.Toolbar1.Buttons(7).Enabled = False
.datagzdj.Enabled = False
.otherdj.Enabled = False
.recomddj.Enabled = False
.Toolbar1.Buttons(1).Enabled = True
.recorddj.Enabled = True
End With
Else
With frmmain
.Toolbar1.Buttons(5).Enabled = True
.Toolbar1.Buttons(6).Enabled = True
.Toolbar1.Buttons(7).Enabled = True
.datagzdj.Enabled = True
.otherdj.Enabled = True
.recomddj.Enabled = True
.Toolbar1.Buttons(1).Enabled = False
.recorddj.Enabled = False
End With
End If
End With
End Sub
Private Sub monthgzcc_Click()
frmygzcc.Show
End Sub
Private Sub monthgztj_Click()
frmygztj.Show
End Sub
Private Sub otherdj_Click()
frmqtdj.Show 1
End Sub
Private Sub recomdcc_Click()
frmjkcc.Show
End Sub
Private Sub recomddj_Click()
frmjkdj.Show 1
End Sub
Private Sub recorddj_Click()
frmbmb.Show
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1
frmbmb.Show
Case 2
frmcjsz.Show 1
Case 3
frmgzfp.Show
Case 5
frmrgzdj.Show
Case 6
frmqtdj.Show 1
Case 7
frmjkdj.Show 1
Case 9
frmygztj.Show
Case 10
frmngztj.Show
Case 12
frmyhmm.Show 1
frmyhmm.Text2.Text = ""
Call frmuser
Call frmgzyesno
Case 13
Call exit_Click
End Select
End Sub
Private Sub usersz_Click()
frmyhsz.Show
End Sub
Private Sub workerwh_Click()
frmgrwh.Show 1
End Sub
Private Sub workewcc_Click()
frmgzqkcc.Show
End Sub
Private Sub workfp_Click()
frmgzfp.Show
End Sub
Private Sub workfpcc_Click()
frmgzfpcc.Show
End Sub
Private Sub workzccc_Click()
frmgzqkcc.Show
With frmgzqkcc
If .TabStrip1.SelectedItem = "工作正常查询" Then
.Frame1.Visible = True
.Frame2.Visible = True
.Frame4.Visible = False
.Frame6.Visible = False
Else
.Frame1.Visible = False
.Frame2.Visible = False
.Frame4.Visible = True
.Frame6.Visible = True
End If
End With
End Sub
Private Sub yeargzcc_Click()
frmngzcc.Show
End Sub
Private Sub yeargztj_Click()
frmngztj.Show
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?