📄 gzgl.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form gzgl
BorderStyle = 1 'Fixed Single
Caption = "工资管理"
ClientHeight = 5715
ClientLeft = 45
ClientTop = 435
ClientWidth = 6525
LinkTopic = "Form2"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5715
ScaleWidth = 6525
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 480
Top = 5160
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=qygzgl"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=qygzgl"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "员工工资表"
Caption = ""
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 VB.CommandButton Command2
Caption = "退出"
Height = 495
Left = 4800
TabIndex = 22
Top = 5040
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 495
Left = 2880
TabIndex = 21
Top = 5040
Width = 1455
End
Begin VB.Frame Frame1
Height = 4815
Left = 120
TabIndex = 0
Top = 120
Width = 6375
Begin VB.Frame Frame5
Height = 615
Left = 120
TabIndex = 17
Top = 3960
Width = 5775
Begin MSComCtl2.DTPicker DTPicker1
Height = 255
Left = 3960
TabIndex = 32
Top = 240
Width = 1335
_ExtentX = 2355
_ExtentY = 450
_Version = 393216
Format = 25231361
CurrentDate = 38851
End
Begin VB.TextBox Text9
Height = 270
Left = 1080
TabIndex = 20
Top = 240
Width = 1215
End
Begin VB.Label Label13
Caption = "计发时间:"
Height = 255
Left = 2760
TabIndex = 19
Top = 240
Width = 1095
End
Begin VB.Label Label12
Caption = "实际工资:"
Height = 255
Left = 120
TabIndex = 18
Top = 240
Width = 1215
End
End
Begin VB.Frame Frame4
Height = 615
Left = 120
TabIndex = 12
Top = 3120
Width = 5895
Begin VB.TextBox Text8
Height = 270
Left = 3960
TabIndex = 16
Top = 360
Width = 1335
End
Begin VB.TextBox Text7
Height = 270
Left = 960
TabIndex = 15
Top = 240
Width = 1335
End
Begin VB.Label Label11
Caption = "医疗保险:"
Height = 255
Left = 2880
TabIndex = 14
Top = 240
Width = 975
End
Begin VB.Label Label10
Caption = "养老金:"
Height = 255
Left = 120
TabIndex = 13
Top = 240
Width = 1215
End
End
Begin VB.Frame Frame3
Height = 1575
Left = 120
TabIndex = 5
Top = 1320
Width = 5895
Begin VB.TextBox Text1
Height = 270
Left = 960
TabIndex = 28
Top = 240
Width = 1335
End
Begin VB.TextBox Text2
Height = 270
Left = 960
TabIndex = 27
Top = 720
Width = 1335
End
Begin VB.TextBox Text3
Height = 270
Left = 960
TabIndex = 26
Top = 1200
Width = 1335
End
Begin VB.TextBox Text4
Height = 270
Left = 4080
TabIndex = 25
Top = 240
Width = 1335
End
Begin VB.TextBox Text5
Height = 270
Left = 4080
TabIndex = 24
Top = 720
Width = 1335
End
Begin VB.TextBox Text6
Height = 270
Left = 4080
TabIndex = 23
Top = 1200
Width = 1335
End
Begin VB.Label Label9
Caption = "其它:"
Height = 255
Left = 3120
TabIndex = 11
Top = 1200
Width = 615
End
Begin VB.Label Label8
Caption = "房贴:"
Height = 255
Left = 3120
TabIndex = 10
Top = 720
Width = 855
End
Begin VB.Label Label7
Caption = "加班费:"
Height = 255
Left = 3120
TabIndex = 9
Top = 240
Width = 855
End
Begin VB.Label Label6
Caption = "奖金:"
Height = 255
Left = 120
TabIndex = 8
Top = 1200
Width = 615
End
Begin VB.Label Label5
Caption = "补贴:"
Height = 255
Left = 120
TabIndex = 7
Top = 720
Width = 615
End
Begin VB.Label Label4
Caption = "底薪:"
Height = 255
Left = 120
TabIndex = 6
Top = 240
Width = 615
End
End
Begin VB.Frame Frame2
Height = 975
Left = 120
TabIndex = 1
Top = 240
Width = 5895
Begin VB.TextBox Text12
Height = 270
Left = 4200
TabIndex = 31
Top = 600
Width = 1335
End
Begin VB.TextBox Text11
Height = 270
Left = 2160
TabIndex = 30
Top = 600
Width = 1215
End
Begin VB.TextBox Text10
Height = 270
Left = 240
TabIndex = 29
Top = 600
Width = 1215
End
Begin VB.Label Label3
Caption = "所在部门"
Height = 255
Left = 4440
TabIndex = 4
Top = 240
Width = 735
End
Begin VB.Label Label2
Caption = "员工姓名"
Height = 255
Left = 2280
TabIndex = 3
Top = 240
Width = 735
End
Begin VB.Label Label1
Caption = "员工编号"
Height = 255
Left = 480
TabIndex = 2
Top = 240
Width = 855
End
End
End
End
Attribute VB_Name = "gzgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public conn As New ADODB.Connection
'conn.ConnectionString = "DSN=qygzgl"
'conn.Open
Public rs As New ADODB.Recordset
Private Sub Command1_Click()
'Dim conn As New ADODB.Connection
'conn.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=qygzgl"
'rs.CursorLocation = adUseClient
'If rs.State = adStateClosed Then
'rs.Open "员工工资表", conn, adOpenKeyset, adLockPessimistic, adCmdTable
'End If
If Text10.Text <> "" And Text11 <> "" And Text12 <> "" Then
Adodc1.Recordset.AddNew
Call add
'Adodc1.Recordset.Update
Text10.Text = Empty
Text11.Text = Empty
Text12.Text = Empty
Text1.Text = Empty
Text2.Text = Empty
Text3.Text = Empty
Text4.Text = Empty
Text5.Text = Empty
Text6.Text = Empty
Text7.Text = Empty
Text8.Text = Empty
Text9.Text = Empty
Text10.SetFocus
'DTPicker1.value = Datatime
Else
If Text10 = "" Then
MsgBox ("员工编号不能为空!")
Text10.SetFocus
Else
If Text11 = "" Then
MsgBox ("员工姓名不能为空!")
Text11.SetFocus
Else
If Text12 = "" Then
MsgBox ("所在部门不能为空!")
Else
MsgBox "数据已被保存", , "保存成功"
End If
End If
End If
End If
'Exit Sub
End Sub
Private Sub add()
'Dim rst As New ADODB.Recordset
Adodc1.Recordset.Fields(0).value = Text10.Text
Adodc1.Recordset.Fields(1).value = Text11.Text
Adodc1.Recordset.Fields(2).value = Text12.Text
Adodc1.Recordset.Fields(3).value = Text1.Text
Adodc1.Recordset.Fields(5).value = Text2.Text
Adodc1.Recordset.Fields(7).value = Text3.Text
Adodc1.Recordset.Fields(4).value = Text4.Text
Adodc1.Recordset.Fields(6).value = Text5.Text
Adodc1.Recordset.Fields(12).value = Text6.Text
Adodc1.Recordset.Fields(8).value = Text7.Text
Adodc1.Recordset.Fields(9).value = Text8.Text
Adodc1.Recordset.Fields(10).value = Text9.Text
Adodc1.Recordset.Fields(11).value = DTPicker1.value
End Sub
Private Sub change()
Text9.Text = Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) - Val(Text7.Text) - Val(Text8.Text)
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
'Private Sub Form_Load()
'Dim conn As New ADODB.Connection
'conn.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=qygzgl"
'rs.CursorLocation = adUseClient
'If rs.State = adStateClosed Then
'rs.Open "员工工资表", conn, adOpenKeyset, adLockPessimistic, adCmdTable
'End If
'Set DataCombo1.RowSource = rs
'DataCombo1.BoundColumn = "员工编号"
'DataCombo1.ListField = "员工编号"
'End Sub
'Private Sub DataCombo1_Change()
'Dim conn As New ADODB.Connection
'conn.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=qygzgl"
'rst.CursorLocation = adUseClient
'If rst.State = adStateOpen Then
' rst.Close
'End If
'rst.Open "select * from 员工工资表 where 员工编号='" & DataCombo1.Text & "' ", conn, adOpenKeyset, adLockOptimistic, adCmdText
' Label22.Caption = rst.Fields(1).value
' Label33.Caption = rst.Fields(2).value
'End Sub
Private Sub Text1_Change()
Call change
End Sub
Private Sub Text2_Change()
Call change
End Sub
Private Sub Text4_Change()
Call change
End Sub
Private Sub Text5_Change()
Call change
End Sub
Private Sub Text6_Change()
Call change
End Sub
Private Sub Text7_Change()
Call change
End Sub
Private Sub Text8_Change()
Call change
End Sub
Private Sub Text9_Change()
Call change
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -