📄 main_rsgl_khgl_lr.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"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form main_rsgl_khgl_lr
BorderStyle = 3 'Fixed Dialog
Caption = "Form1"
ClientHeight = 3375
ClientLeft = 45
ClientTop = 330
ClientWidth = 7290
Icon = "main_rsgl_khgl_lr.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3375
ScaleWidth = 7290
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "取消"
Height = 390
Left = 3840
TabIndex = 19
Top = 2880
Width = 1770
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 390
Left = 1950
TabIndex = 18
Top = 2880
Width = 1770
End
Begin VB.Frame Frame1
Height = 2835
Left = 15
TabIndex = 0
Top = -60
Width = 7275
Begin VB.ComboBox Combo1
Height = 300
Left = 4755
TabIndex = 20
Top = 975
Width = 2400
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 330
Index = 0
Left = 990
TabIndex = 8
Top = 225
Width = 2730
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 330
Index = 1
Left = 4755
TabIndex = 7
Top = 240
Width = 2400
End
Begin VB.TextBox Text1
Height = 330
Index = 2
Left = 4740
TabIndex = 5
Top = 615
Width = 2400
End
Begin VB.TextBox Text1
Height = 330
Index = 3
Left = 975
TabIndex = 3
Top = 1320
Width = 2775
End
Begin VB.TextBox Text1
Height = 330
Index = 4
Left = 4755
TabIndex = 2
Top = 1320
Width = 2400
End
Begin VB.TextBox Text1
Height = 1050
Index = 5
Left = 975
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 1695
Width = 6165
End
Begin MSComCtl2.DTPicker DTP1
Height = 330
Left = 990
TabIndex = 4
Top = 600
Width = 2730
_ExtentX = 4815
_ExtentY = 582
_Version = 393216
Format = 48103425
CurrentDate = 38698
End
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "main_rsgl_khgl_lr.frx":000C
Height = 330
Left = 990
TabIndex = 6
Top = 945
Width = 2730
_ExtentX = 4815
_ExtentY = 582
_Version = 393216
ListField = "考核项目"
BoundColumn = "编号"
Text = ""
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "考核意见:"
Height = 255
Left = 90
TabIndex = 17
Top = 1830
Width = 945
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "员工编号:"
Height = 255
Left = 75
TabIndex = 16
Top = 315
Width = 1005
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "员工姓名:"
Height = 255
Left = 3840
TabIndex = 15
Top = 315
Width = 1005
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "考核项目:"
Height = 255
Left = 90
TabIndex = 14
Top = 1035
Width = 1005
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "考核期间:"
Height = 255
Left = 3840
TabIndex = 13
Top = 690
Width = 975
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "考核日期:"
Height = 255
Left = 60
TabIndex = 12
Top = 675
Width = 1005
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "考核等级:"
Height = 255
Left = 3840
TabIndex = 11
Top = 1035
Width = 1005
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "考核分数:"
Height = 255
Left = 60
TabIndex = 10
Top = 1395
Width = 900
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "考核人员:"
Height = 255
Left = 3840
TabIndex = 9
Top = 1380
Width = 1215
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 0
Top = 0
Visible = 0 'False
Width = 2040
_ExtentX = 3598
_ExtentY = 582
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=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
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
End
Attribute VB_Name = "main_rsgl_khgl_lr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text1(3).SetFocus
End Sub
Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Combo1.SetFocus
End Sub
Private Sub DTP1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text1(2).SetFocus
End Sub
Private Sub Form_Activate()
DTP1.SetFocus
End Sub
Private Sub Form_Load()
Combo1.AddItem "优秀"
Combo1.AddItem "良好"
Combo1.AddItem "差"
If blnAddKH = True Then
Me.Caption = "考核信息添加"
Else
Me.Caption = "考核信息修改"
With main_rsgl_khgl.Adodc1.Recordset
If .RecordCount > 0 Then
Text1(0) = .Fields("员工编号")
Text1(1) = .Fields("员工姓名")
DTP1.Value = .Fields("考核日期")
Text1(2) = .Fields("考核期间")
DataCombo1 = .Fields("考核项目")
Combo1 = .Fields("考核等级")
Text1(3) = .Fields("考核分数")
Text1(4) = .Fields("考核人员")
Text1(5) = .Fields("考核意见")
End If
End With
End If
End Sub
Private Sub Command1_Click()
If IsNumeric(Text1(3)) = False Then
Text1(3) = Val(Text1(3))
End If
If blnAddKH = True Then
Cnn.Execute ("insert into 考核表(员工编号,员工姓名,考核日期,考核期间,考核项目,考核等级,考核分数,考核人员,考核意见)" _
& "values('" + Text1(0) + "','" + Text1(1) + "','" + str(DTP1.Value) + "','" + Text1(2) + "','" + _
DataCombo1 + "','" + Combo1 + "'," + Text1(3) + ",'" + Text1(4) + "','" + Text1(5) + "')")
Else
Cnn.Execute ("update 考核表 set 考核日期='" + str(DTP1.Value) + "',考核期间='" + Text1(2) + "',考核项目='" + _
DataCombo1 + "',考核等级='" + Combo1 + "',考核分数=" + Text1(3) + ",考核人员='" + Text1(4) + _
"',考核意见='" + Text1(5) + "'where 员工编号='" + Text1(0) + "'and 考核项目='" + DataCombo1 + "'")
End If
main_rsgl_khgl.Adodc1.Refresh
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Text1_KeyDown(index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn And index = 2 Then DataCombo1.SetFocus
If KeyCode = vbKeyReturn And index = 3 Then Text1(4).SetFocus
If KeyCode = vbKeyReturn And index = 4 Then Text1(5).SetFocus
If KeyCode = vbKeyReturn And index = 5 Then Command1.SetFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -