📄 main_rsxx.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form main_rsxx
BackColor = &H00D0E8EE&
BorderStyle = 1 'Fixed Single
Caption = "人事档案信息管理"
ClientHeight = 4560
ClientLeft = 45
ClientTop = 330
ClientWidth = 10245
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4560
ScaleWidth = 10245
StartUpPosition = 1 '所有者中心
Begin VB.ComboBox Combo1
Height = 300
Left = 120
TabIndex = 10
Text = "Combo1"
Top = 855
Width = 2970
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = -30
Top = 3240
Visible = 0 'False
Width = 2295
_ExtentX = 4048
_ExtentY = 582
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 = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RSDAGLXT"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RSDAGLXT"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 人事档案信息表"
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 VB.CommandButton CmdExit
BackColor = &H00FFC0C0&
Caption = "&E 退出"
Height = 390
Left = 8160
Style = 1 'Graphical
TabIndex = 7
Top = 4080
Width = 1950
End
Begin VB.CommandButton CmdPrint
BackColor = &H00FFC0C0&
Caption = "&P 打印"
Height = 390
Left = 6150
Style = 1 'Graphical
TabIndex = 6
Top = 4080
Width = 1950
End
Begin VB.CommandButton CmdDelete
BackColor = &H00FFC0C0&
Caption = "&D 删除"
Height = 390
Left = 4110
Style = 1 'Graphical
TabIndex = 5
Top = 4080
Width = 1950
End
Begin VB.CommandButton CmdModify
BackColor = &H00FFC0C0&
Caption = "&M 修改"
Height = 390
Left = 2115
Style = 1 'Graphical
TabIndex = 4
Top = 4080
Width = 1950
End
Begin VB.CommandButton CmdAdd
BackColor = &H00FFC0C0&
Caption = "&A 增加"
Height = 390
Left = 105
Style = 1 'Graphical
TabIndex = 3
Top = 4095
Width = 1950
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "main_rsxx.frx":0000
Height = 2610
Left = 45
TabIndex = 2
Top = 1380
Width = 10155
_ExtentX = 17912
_ExtentY = 4604
_Version = 393216
BackColor = 16777215
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Frame Frame1
BackColor = &H00D0E8EE&
Height = 690
Left = 30
TabIndex = 0
Top = 615
Width = 10185
Begin VB.CommandButton CmdFind
BackColor = &H00FFC0C0&
Caption = "查询"
Height = 390
Left = 8280
Style = 1 'Graphical
TabIndex = 8
Top = 165
Width = 1755
End
Begin VB.TextBox Text1
Height = 300
Left = 3180
TabIndex = 1
Text = " 请输入要查询的内容"
Top = 240
Width = 4980
End
End
Begin VB.Label Label10
Appearance = 0 'Flat
BackColor = &H00FFC0C0&
BorderStyle = 1 'Fixed Single
Caption = " 人事档案信息管理"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C000C0&
Height = 375
Left = 2775
TabIndex = 9
Top = 135
Width = 4935
End
End
Attribute VB_Name = "main_rsxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdPrint_Click()
DataGrid1.Col = 0
DataEnvironment1.rsCommand1.Open "select * from 人事档案信息表 where 档案编号='" + DataGrid1.Text + "'"
DRP_Rsdaxx.Show
End Sub
Private Sub Form_Load()
Combo1.AddItem ("档案编号")
Combo1.AddItem ("工号")
Combo1.AddItem ("姓名")
Combo1.AddItem ("性别")
Combo1.AddItem ("身份证号")
Combo1.AddItem ("部门名称")
Combo1.AddItem ("用工性质")
Combo1.AddItem ("员工状态")
Combo1.ListIndex = 0
End Sub
Private Sub Text1_GotFocus()
Text1.SelStart = 0 '设置选定的起始位置
Text1.SelLength = Len(Text1.Text) '设置选定的长度。
End Sub
Private Sub CmdAdd_Click()
'生成档案编号
Dim dabh As Long
Dim rs1 As New ADODB.Recordset
rs1.Open "select * from 人事档案信息表 order by 档案编号", Cnn, adOpenKeyset, adLockOptimistic
If rs1.RecordCount > 0 Then
If rs1.EOF = False Then rs1.MoveLast
dabh = Val(Right(rs1.Fields("档案编号"), 5)) + 1
main_rsxx_lr.Txt1(0).Text = "C-" & Format(dabh, "00000")
Else
main_rsxx_lr.Txt1(0).Text = "C-00001"
End If
'生成工号
main_rsxx_lr.Txt1(1).Text = Right(main_rsxx_lr.Txt1(0), 5)
rs1.Close
'调用main_rsxx_lr窗体
Load main_rsxx_lr
main_rsxx_lr.Show
main_rsxx_lr.Caption = "人事档案信息录入窗口"
main_rsxx_lr.Label10.Caption = "人事档案信息录入"
End Sub
Private Sub CmdFind_Click()
Adodc1.RecordSource = "select * from 人事档案信息表 where (人事档案信息表." & Combo1.Text & " like + '" + Text1.Text + "'+'%')"
Adodc1.Refresh
End Sub
Private Sub CmdModify_Click()
' On Error GoTo picview
Dim i As Integer
For i = 0 To 3
'对应列
DataGrid1.Col = i
main_rsxx_lr.Txt1(i) = DataGrid1.Text
Next i
DataGrid1.Col = 4
main_rsxx_lr.Cbo1 = DataGrid1.Text
DataGrid1.Col = 5
main_rsxx_lr.DTP1.Value = DataGrid1.Text
DataGrid1.Col = 6
main_rsxx_lr.Txt1(4) = DataGrid1.Text
DataGrid1.Col = 7
main_rsxx_lr.Lblxplj.Caption = DataGrid1.Text
On Error Resume Next
main_rsxx_lr.PicPhoto.Picture = LoadPicture(DataGrid1.Text)
main_rsxx_lr.Image1.Picture = LoadPicture(DataGrid1.Text)
DataGrid1.Col = 8
main_rsxx_lr.Txt1(5) = DataGrid1.Text
DataGrid1.Col = 9
main_rsxx_lr.Txt1(6) = DataGrid1.Text
DataGrid1.Col = 10
main_rsxx_lr.DTP2.Value = DataGrid1.Text
DataGrid1.Col = 11
main_rsxx_lr.Txt1(7) = DataGrid1.Text
DataGrid1.Col = 12
main_rsxx_lr.Txt1(8) = DataGrid1.Text
DataGrid1.Col = 13
main_rsxx_lr.DataCombo1 = DataGrid1.Text
DataGrid1.Col = 14
main_rsxx_lr.Cbo2 = DataGrid1.Text
DataGrid1.Col = 15
main_rsxx_lr.Cbo3 = DataGrid1.Text
DataGrid1.Col = 16
main_rsxx_lr.Txt1(9) = DataGrid1.Text
DataGrid1.Col = 17
main_rsxx_lr.Txt1(10) = DataGrid1.Text
DataGrid1.Col = 18
main_rsxx_lr.Cbo4 = DataGrid1.Text
DataGrid1.Col = 19
main_rsxx_lr.Txt1(11) = DataGrid1.Text
DataGrid1.Col = 20
main_rsxx_lr.Cbo5 = DataGrid1.Text
DataGrid1.Col = 21
main_rsxx_lr.Txt1(12) = DataGrid1.Text
DataGrid1.Col = 22
main_rsxx_lr.Cbo6 = DataGrid1.Text
DataGrid1.Col = 23
main_rsxx_lr.Cbo7 = DataGrid1.Text
Load main_rsxx_lr
main_rsxx_lr.Show
main_rsxx_lr.Caption = "人事档案信息修改窗口"
main_rsxx_lr.Label10.Caption = "人事档案信息修改"
' Exit Sub
'picview:
' MsgBox Err.Description, , "提示窗口"
End Sub
Private Sub CmdDelete_Click()
Dim a As String
If Adodc1.Recordset.RecordCount > 0 Then
a = MsgBox("您确实要删除这条数据吗?", vbYesNo)
If a = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Refresh
End If
Else
MsgBox ("没有要删除的数据!")
End If
End Sub
Private Sub CmdExit_Click()
Call CmdEnd(Me)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -