📄 人事档案.frm
字号:
Top = 1440
Width = 1215
End
Begin VB.Label Label2
BackColor = &H80000000&
BackStyle = 0 'Transparent
Caption = "部 门 :"
ForeColor = &H00FFFFFF&
Height = 255
Left = 4440
TabIndex = 2
Top = 1440
Width = 975
End
Begin VB.Label Label1
BackColor = &H80000000&
BackStyle = 0 'Transparent
Caption = "职工编号:"
ForeColor = &H00FFFFFF&
Height = 255
Left = 360
TabIndex = 1
Top = 1440
Width = 1095
End
Begin VB.Menu mnufile
Caption = "文件(&F)"
Begin VB.Menu mnuopen
Caption = "打开数据库(&O)"
Enabled = 0 'False
Shortcut = ^O
End
Begin VB.Menu mnuclose
Caption = "关闭数据库(&E)"
Shortcut = ^E
End
Begin VB.Menu mnubl
Caption = "-"
End
Begin VB.Menu mnuquit
Caption = "返回(&Q)"
Shortcut = ^Q
End
End
Begin VB.Menu mnuedit
Caption = "编辑(&E)"
Begin VB.Menu mnunew
Caption = "添加记录(&N)"
Shortcut = ^N
End
Begin VB.Menu mnudel
Caption = "删除记录(&D)"
Shortcut = ^D
End
Begin VB.Menu mnumodify
Caption = "修改记录(&M)"
Shortcut = ^M
End
Begin VB.Menu mnublk
Caption = "-"
End
Begin VB.Menu mnureport
Caption = "清空数据库(&B)"
Shortcut = ^B
End
End
Begin VB.Menu mnulook
Caption = "查询(&S)"
Begin VB.Menu mnucommon
Caption = "普通查询(&P)"
Begin VB.Menu mnuenable
Caption = "启动查询器"
End
Begin VB.Menu mnudisble
Caption = "关闭查询器"
End
End
End
Begin VB.Menu munsetup
Caption = "预警(&A)"
Begin VB.Menu mnualert
Caption = " 合同到期预警(&A)"
Shortcut = ^S
End
End
Begin VB.Menu mnuhel
Caption = "帮助(&H)"
Begin VB.Menu mnuhelp
Caption = "帮助主题(&H)"
Shortcut = ^H
End
Begin VB.Menu mnur
Caption = "用户注册(&R)"
Shortcut = ^R
End
Begin VB.Menu menblk
Caption = "-"
End
Begin VB.Menu mnuabout
Caption = "关于(&A)"
Shortcut = ^A
End
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Private Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked As Long, ByVal hBitmapChecked As Long) As Long
Const myflag = &H800&
Dim add, alert As Integer
Private Sub aa()
Command13.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command12.Enabled = True
Command10.Enabled = False
Text1.Locked = False
Combo6.Locked = False
Combo7.Locked = False
Text4.Locked = False
Text5.Locked = False
Text6.Locked = False
Text7.Locked = False
Text8.Locked = False
Text9.Locked = False
Text10.Locked = False
Text11.Locked = False
Combo8.Locked = False
Text13.Locked = False
Text14.Locked = False
Text15.Locked = False
Text16.Locked = False
Text2.Locked = False
Text17.Locked = True
Option1.Enabled = True
Option2.Enabled = True
Image4.Enabled = True
Image5.Enabled = True
Combo1.Locked = False
Combo2.Locked = False
Combo3.Locked = False
Combo4.Locked = False
Image1.Enabled = True
mnunew.Enabled = False
mnudel.Enabled = False
mnumodify.Enabled = False
mnualert.Enabled = False
Command10.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
End Sub
Private Sub Combo6_Click()
Select Case Combo6.Text
Case "生产部"
Combo7.Clear
Combo7.AddItem "经理"
Combo7.AddItem "主管"
Combo7.AddItem "职员"
Combo7.Text = Combo7.List(0)
Case "财务部"
Combo7.Clear
Combo7.AddItem "经理"
Combo7.AddItem "主管"
Combo7.AddItem "出纳"
Combo7.AddItem "会计"
Combo7.Text = Combo7.List(0)
Case "营业部"
Combo7.Clear
Combo7.AddItem "经理"
Combo7.AddItem "主管"
Combo7.AddItem "外勤"
Combo7.AddItem "职员"
Combo7.Text = Combo7.List(0)
Case "工程部"
Combo7.Clear
Combo7.AddItem "经理"
Combo7.AddItem "主管"
Combo7.AddItem "技术员"
Combo7.Text = Combo7.List(0)
Case "人事部"
Combo7.Clear
Combo7.AddItem "经理"
Combo7.AddItem "主管"
Combo7.AddItem "文秘"
Combo7.AddItem "职员"
Combo7.Text = Combo7.List(0)
Case "总务部"
Combo7.Clear
Combo7.AddItem "经理"
Combo7.AddItem "主管"
Combo7.AddItem "职员"
Combo7.Text = Combo7.List(0)
Case "保安部"
Combo7.Clear
Combo7.AddItem "经理"
Combo7.AddItem "主管"
Combo7.AddItem "班长"
Combo7.AddItem "保安"
Combo7.Text = Combo7.List(0)
Case "工会"
Combo7.Clear
Combo7.AddItem "主席"
Combo7.AddItem "职员"
Combo7.Text = Combo7.List(0)
Case "总经理室"
Combo7.Clear
Combo7.AddItem "总经理"
Combo7.AddItem "秘书"
Combo7.Text = Combo7.List(0)
End Select
End Sub
Private Sub Command12_Click()
Dim oldmark
Dim a As String, b As String, c As String, d As String, e As Integer, f As Integer
Dim g As String, h As String
Dim o(1 To 20) As String
g = Combo6.Text
h = Combo7.Text
Image2.Picture = Image1.Picture
o(1) = Text4.Text
o(2) = Text5.Text
o(3) = Text6.Text
o(4) = Text7.Text
o(5) = Text8.Text
o(6) = Text9.Text
o(7) = Text10.Text
o(8) = Text11.Text
o(9) = Combo8.Text
o(10) = Text13.Text
o(11) = Text14.Text
o(12) = Text15.Text
o(13) = Text16.Text
o(19) = Text2.Text
o(15) = Combo1.Text
o(16) = Combo2.Text
o(17) = Combo3.Text
o(18) = Combo4.Text
If Option1.Value = True Then
o(14) = "男"
Else
o(14) = "女"
End If
If Combo6.Text = "" Or Combo7.Text = "" Then
Text1.SetFocus
Exit Sub
End If
If add = 1 Then
Data1.Recordset.CancelUpdate
End If
a = "0"
b = "0"
c = "0"
d = "0"
e = 100
f = "0"
If g = "生产部" Then
a = "SC"
End If
If g = "财务部" Then
a = "CW"
End If
If g = "营业部" Then
a = "YY"
End If
If g = "工程部" Then
a = "GC"
End If
If g = "人事部" Then
a = "RS"
End If
If g = "总务部" Then
a = "ZW"
End If
If g = "保安部" Then
a = "BA"
End If
If g = "工会" Then
a = "GH"
End If
If g = "总经理室" Then
a = "JL"
End If
If Data1.Recordset.RecordCount = 0 Then
Else
oldmark = Data1.Recordset.Bookmark
End If
If h = "经理" Then
c = "职务 like '" & h & "' and 部门 like '" & g & "'"
Data1.Recordset.FindPrevious c
If Data1.Recordset.NoMatch Then
f = 1
Else
MsgBox "此职工编号以存在", vbOKOnly, "提示信息"
Data1.Recordset.Bookmark = oldmark
Combo7.SetFocus
If add = 1 Then
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command12.Enabled = True
Data1.Recordset.AddNew
Data3.Recordset.AddNew
Combo6.Text = g
Combo7.Text = h
Text4.Text = o(1)
Text5.Text = o(2)
Text6.Text = o(3)
Text7.Text = o(4)
Text8.Text = o(5)
Text9.Text = o(6)
Text10.Text = o(7)
Text11.Text = o(8)
Combo8.Text = o(9)
Text13.Text = o(10)
Text14.Text = o(11)
Text15.Text = o(12)
Text16.Text = o(13)
Combo1.Text = o(15)
Combo2.Text = o(16)
Combo3.Text = o(17)
Combo4.Text = o(18)
Text2.Text = o(19)
Image1.Picture = Image2.Picture
If o(14) = "男" Then
Option1.Value = True
Image4.Picture = Image6.Picture
Image5.Picture = Image7.Picture
Else
Option2.Value = True
Image5.Picture = Image6.Picture
Image4.Picture = Image7.Picture
End If
Command10.Enabled = False
Text1.Locked = False
Combo6.Locked = False
Combo7.Locked = False
Text4.Locked = False
Text5.Locked = False
Text6.Locked = False
Text7.Locked = False
Text8.Locked = False
Text9.Locked = False
Text10.Locked = False
Text11.Locked = False
Combo8.Locked = False
Text13.Locked = False
Text14.Locked = False
Text15.Locked = False
Text16.Locked = False
Text2.Locked = False
Text17.Locked = True
Option1.Enabled = True
Option2.Enabled = True
Image4.Enabled = True
Image5.Enabled = True
Combo1.Locked = False
Combo2.Locked = False
Combo3.Locked = False
Combo4.Locked = False
Image1.Enabled = True
Text1.SetFocus
mnunew.Enabled = False
mnudel.Enabled = False
mnumodify.Enabled = False
mnualert.Enabled = False
Command10.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Label27.Caption = "<添加记录>"
Label25.Caption = "记录总数共<" & Data1.Recordset.RecordCount + 1 & ">条"
Label26.Caption = "第<" & Data1.Recordset.RecordCount + 1 & ">条记录"
End If
If add = 0 Then
Data1.Recordset.Edit
Combo6.Text = g
Combo7.Text = h
Text1.Text = d
Text4.Text = o(1)
Text5.Text = o(2)
Text6.Text = o(3)
Text7.Text = o(4)
Text8.Text = o(5)
Text9.Text = o(6)
Text10.Text = o(7)
Text11.Text = o(8)
Combo8.Text = o(9)
Text13.Text = o(10)
Text14.Text = o(11)
Text15.Text = o(12)
Text16.Text = o(13)
Text2.Text = o(19)
Combo1.Text = o(15)
Combo2.Text = o(16)
Combo3.Text = o(17)
Combo4.Text = o(18)
Image1.Picture = Image2.Picture
If o(14) = "男" Then
Option1.Value = True
Image4.Picture = Image6.Picture
Image5.Picture = Image7.Picture
Else
Option2.Value = True
Image5.Picture = Image6.Picture
Image4.Picture = Image7.Picture
End If
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command10.Enabled = False
Command12.Enabled = True
Text1.Locked = False
Combo6.Locked = False
Combo7.Locked = False
Text4.Locked = False
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -