main_rsgl_rsdaxx_lr.frm
上传用户:ake0106
上传日期:2022-07-23
资源大小:4052k
文件大小:42k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.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_rsdaxx_lr
- BorderStyle = 3 'Fixed Dialog
- ClientHeight = 6960
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 9195
- Icon = "main_rsgl_rsdaxx_lr.frx":0000
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6960
- ScaleWidth = 9195
- ShowInTaskbar = 0 'False
- StartUpPosition = 1 '所有者中心
- Begin VB.CommandButton cmdPrint
- Caption = "打印"
- Height = 420
- Left = 3720
- TabIndex = 69
- Top = 6420
- Width = 1710
- End
- Begin VB.Frame Frame3
- Caption = "Frame3"
- Height = 2880
- Left = -2865
- TabIndex = 68
- Top = 3270
- Visible = 0 'False
- Width = 3030
- Begin MSAdodcLib.Adodc Adodc2
- Height = 330
- Left = 150
- Top = 180
- Visible = 0 'False
- Width = 2595
- _ExtentX = 4577
- _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
- Begin MSAdodcLib.Adodc Adodc3
- Height = 330
- Left = 120
- Top = 495
- Visible = 0 'False
- Width = 2595
- _ExtentX = 4577
- _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
- Begin MSAdodcLib.Adodc Adodc4
- Height = 330
- Left = 180
- Top = 825
- Visible = 0 'False
- Width = 2595
- _ExtentX = 4577
- _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
- Begin MSAdodcLib.Adodc Adodc5
- Height = 330
- Left = 195
- Top = 1185
- Visible = 0 'False
- Width = 2595
- _ExtentX = 4577
- _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
- Begin MSAdodcLib.Adodc Adodc6
- Height = 330
- Left = 135
- Top = 1560
- Visible = 0 'False
- Width = 2595
- _ExtentX = 4577
- _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
- Begin MSAdodcLib.Adodc Adodc7
- Height = 330
- Left = 120
- Top = 1875
- Visible = 0 'False
- Width = 2595
- _ExtentX = 4577
- _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
- Begin VB.CommandButton CmdEnd
- BackColor = &H00FFC0C0&
- Caption = "取消"
- Height = 420
- Left = 5565
- TabIndex = 0
- Top = 6420
- Width = 1710
- End
- Begin VB.CommandButton CmdSave
- BackColor = &H00FFC0C0&
- Caption = "保存"
- Height = 420
- Left = 1860
- TabIndex = 1
- Top = 6420
- Width = 1710
- End
- Begin VB.Frame Frame1
- Caption = "单位相关信息"
- Height = 2760
- Left = 45
- TabIndex = 42
- Top = 3555
- Width = 9075
- Begin VB.TextBox Txt1
- Height = 300
- Index = 16
- Left = 4890
- TabIndex = 64
- Top = 2355
- Width = 4065
- End
- Begin VB.TextBox Txt1
- Height = 1005
- Index = 15
- Left = 975
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 59
- Top = 1305
- Width = 7995
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 14
- Left = 6555
- TabIndex = 58
- Top = 945
- Width = 2415
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 13
- Left = 975
- TabIndex = 55
- Top = 960
- Width = 1860
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 12
- Left = 6555
- TabIndex = 53
- Top = 600
- Width = 2415
- End
- Begin VB.CommandButton cmdDept
- Caption = "…"
- Height = 300
- Left = 5085
- TabIndex = 45
- Top = 225
- Width = 315
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 11
- Left = 975
- TabIndex = 44
- Top = 225
- Width = 4125
- End
- Begin MSDataListLib.DataCombo DataCombo4
- Bindings = "main_rsgl_rsdaxx_lr.frx":000C
- Height = 330
- Left = 6555
- TabIndex = 47
- Top = 225
- Width = 2415
- _ExtentX = 4260
- _ExtentY = 582
- _Version = 393216
- ListField = "工种"
- Text = ""
- End
- Begin MSDataListLib.DataCombo DataCombo5
- Bindings = "main_rsgl_rsdaxx_lr.frx":0021
- Height = 330
- Left = 975
- TabIndex = 49
- Top = 570
- Width = 1860
- _ExtentX = 3281
- _ExtentY = 582
- _Version = 393216
- ListField = "职务名称"
- Text = ""
- End
- Begin MSDataListLib.DataCombo DataCombo6
- Bindings = "main_rsgl_rsdaxx_lr.frx":0036
- Height = 330
- Left = 3735
- TabIndex = 51
- Top = 570
- Width = 1695
- _ExtentX = 2990
- _ExtentY = 582
- _Version = 393216
- ListField = "职称名称"
- Text = ""
- End
- Begin MSComCtl2.DTPicker DTP4
- Height = 300
- Left = 3735
- TabIndex = 61
- Top = 960
- Width = 1695
- _ExtentX = 2990
- _ExtentY = 529
- _Version = 393216
- Format = 48300033
- CurrentDate = 38696
- End
- Begin MSComCtl2.DTPicker DTP5
- Height = 300
- Left = 990
- TabIndex = 67
- Top = 2370
- Width = 3015
- _ExtentX = 5318
- _ExtentY = 529
- _Version = 393216
- Format = 48300033
- CurrentDate = 38696
- End
- Begin VB.Label Label31
- Caption = "登记人:"
- Height = 165
- Left = 4125
- TabIndex = 63
- Top = 2415
- Width = 750
- End
- Begin VB.Label Label30
- Caption = "登记日期:"
- Height = 225
- Left = 105
- TabIndex = 62
- Top = 2415
- Width = 1005
- End
- Begin VB.Label Label29
- Caption = "简历:"
- Height = 165
- Left = 405
- TabIndex = 60
- Top = 1410
- Width = 600
- End
- Begin VB.Label Label28
- Caption = "本单位工龄:"
- Height = 165
- Left = 5505
- TabIndex = 57
- Top = 1035
- Width = 1080
- End
- Begin VB.Label Label27
- Caption = "调入时间:"
- Height = 225
- Left = 2880
- TabIndex = 56
- Top = 1020
- Width = 1260
- End
- Begin VB.Label Label26
- Caption = "其他工资:"
- Height = 165
- Left = 60
- TabIndex = 54
- Top = 1035
- Width = 930
- End
- Begin VB.Label Label25
- Caption = "基本工资:"
- Height = 165
- Left = 5640
- TabIndex = 52
- Top = 645
- Width = 900
- End
- Begin VB.Label Label24
- Caption = "职称:"
- Height = 165
- Left = 3195
- TabIndex = 50
- Top = 630
- Width = 555
- End
- Begin VB.Label Label23
- Caption = "职务:"
- Height = 165
- Left = 435
- TabIndex = 48
- Top = 645
- Width = 555
- End
- Begin VB.Label Label22
- Caption = "工种:"
- Height = 165
- Left = 5985
- TabIndex = 46
- Top = 300
- Width = 555
- End
- Begin VB.Label Label21
- Caption = "部门:"
- Height = 165
- Left = 420
- TabIndex = 43
- Top = 285
- Width = 555
- End
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = -210
- Top = 720
- _ExtentX = 847
- _ExtentY = 847
- _Version = 393216
- End
- Begin VB.Frame Frame2
- Caption = "基本信息"
- Height = 3465
- Left = 75
- TabIndex = 2
- Top = 75
- Width = 9075
- Begin VB.TextBox Txt1
- Height = 300
- Index = 17
- Left = 3750
- TabIndex = 71
- Top = 930
- Width = 615
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 10
- Left = 7170
- TabIndex = 39
- Top = 3060
- Width = 1785
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 9
- Left = 1140
- TabIndex = 37
- Top = 3045
- Width = 2115
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 8
- Left = 4470
- TabIndex = 32
- Top = 2715
- Width = 1710
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 7
- Left = 1140
- TabIndex = 31
- Top = 2715
- Width = 2115
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 6
- Left = 1140
- TabIndex = 27
- Top = 2370
- Width = 6195
- End
- Begin VB.CommandButton cmdPhotoAdd
- Caption = "选择照片"
- Height = 315
- Left = 7440
- TabIndex = 26
- Top = 2100
- Width = 1440
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 5
- Left = 3750
- TabIndex = 25
- Top = 2025
- Width = 3585
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 4
- Left = 1140
- TabIndex = 24
- Top = 2025
- Width = 1695
- End
- Begin VB.ComboBox Combo2
- Height = 300
- Left = 1140
- TabIndex = 19
- Top = 1305
- Width = 1695
- End
- Begin MSDataListLib.DataCombo DataCombo1
- Bindings = "main_rsgl_rsdaxx_lr.frx":004B
- Height = 330
- Left = 5025
- TabIndex = 16
- Top = 930
- Width = 1350
- _ExtentX = 2381
- _ExtentY = 582
- _Version = 393216
- ListField = "民族"
- Text = ""
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 3
- Left = 3750
- TabIndex = 14
- Top = 1665
- Width = 2640
- End
- Begin MSComCtl2.DTPicker DTP1
- Height = 330
- Left = 1140
- TabIndex = 13
- Top = 930
- Width = 1680
- _ExtentX = 2963
- _ExtentY = 582
- _Version = 393216
- Format = 48300033
- CurrentDate = 38696
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 2
- Left = 3750
- TabIndex = 12
- Top = 585
- Width = 2640
- End
- Begin VB.ComboBox Combo1
- Height = 300
- Left = 1140
- TabIndex = 10
- Top = 585
- Width = 1695
- End
- Begin VB.PictureBox PicPhoto
- Height = 1800
- Left = 7350
- ScaleHeight = 1740
- ScaleWidth = 1530
- TabIndex = 5
- Top = 225
- Width = 1590
- End
- Begin VB.TextBox Txt1
- Height = 300
- Index = 1
- Left = 3750
- TabIndex = 4
- Top = 240
- Width = 2640
- End
- Begin VB.TextBox Txt1
- Enabled = 0 'False
- Height = 300
- Index = 0
- Left = 1140
- TabIndex = 3
- Top = 240
- Width = 1680
- End
- Begin MSDataListLib.DataCombo DataCombo2
- Bindings = "main_rsgl_rsdaxx_lr.frx":0060
- Height = 330
- Left = 3750
- TabIndex = 20
- Top = 1305
- Width = 2640
- _ExtentX = 4657
- _ExtentY = 582
- _Version = 393216
- ListField = "政治面貌"
- Text = ""
- End
- Begin MSDataListLib.DataCombo DataCombo3
- Bindings = "main_rsgl_rsdaxx_lr.frx":0075
- Height = 330
- Left = 7155
- TabIndex = 34
- Top = 2715
- Width = 1785
- _ExtentX = 3149
- _ExtentY = 582
- _Version = 393216
- ListField = "文化程度"
- Text = ""
- End
- Begin MSComCtl2.DTPicker DTP2
- Height = 300
- Left = 1140
- TabIndex = 38
- Top = 1665
- Width = 1695
- _ExtentX = 2990
- _ExtentY = 529
- _Version = 393216
- Format = 48300033
- CurrentDate = 38696
- End
- Begin MSComCtl2.DTPicker DTP3
- Height = 300
- Left = 4500
- TabIndex = 66
- Top = 3075
- Width = 1695
- _ExtentX = 2990
- _ExtentY = 529
- _Version = 393216
- Format = 48300033
- CurrentDate = 38696
- End
- Begin VB.Label Label8
- Caption = "年龄:"
- Height = 195
- Left = 3165
- TabIndex = 70
- Top = 1005
- Width = 540
- End
- Begin VB.Label Label32
- Caption = "入党团时间:"
- Height = 225
- Left = 105
- TabIndex = 65
- Top = 1725
- Width = 1110
- End
- Begin VB.Label Label20
- Caption = "总工龄:"
- Height = 225
- Left = 6420
- TabIndex = 41
- Top = 3120
- Width = 795
- End
- Begin VB.Label Label19
- Caption = "参加工作时间:"
- Height = 225
- Left = 3300
- TabIndex = 40
- Top = 3135
- Width = 1260
- End
- Begin VB.Label Label18
- Caption = "特长:"
- Height = 225
- Left = 540
- TabIndex = 36
- Top = 3105
- Width = 570
- End
- Begin VB.Label Label17
- Caption = "文化程度:"
- Height = 225
- Left = 6255
- TabIndex = 35
- Top = 2775
- Width = 900
- End
- Begin VB.Label Label16
- Caption = "专业:"
- Height = 225
- Left = 3915
- TabIndex = 33
- Top = 2775
- Width = 555
- End
- Begin VB.Label Label15
- Caption = "毕业院校:"
- Height = 225
- Left = 165
- TabIndex = 30
- Top = 2775
- Width = 930
- End
- Begin VB.Label Label14
- Caption = "家庭地址:"
- Height = 225
- Left = 150
- TabIndex = 29
- Top = 2415
- Width = 930
- End
- Begin VB.Label Label13
- Caption = "手机号码:"
- Height = 225
- Left = 2865
- TabIndex = 28
- Top = 2100
- Width = 930
- End
- Begin VB.Label Label12
- Caption = "联系电话:"
- Height = 225
- Left = 135
- TabIndex = 23
- Top = 2085
- Width = 930
- End
- Begin VB.Label Label11
- Caption = "籍贯:"
- Height = 225
- Left = 3165
- TabIndex = 22
- Top = 1725
- Width = 540
- End
- Begin VB.Label Label10
- Caption = "政治面貌:"
- Height = 195
- Left = 2865
- TabIndex = 21
- Top = 1365
- Width = 915
- End
- Begin VB.Label Label9
- Caption = "婚姻状况:"
- Height = 225
- Left = 225
- TabIndex = 18
- Top = 1350
- Width = 930
- End
- Begin VB.Label Label7
- Caption = "民族:"
- Height = 195
- Left = 4470
- TabIndex = 17
- Top = 990
- Width = 570
- End
- Begin VB.Label Label6
- Caption = "出生年月:"
- Height = 195
- Left = 120
- TabIndex = 15
- Top = 990
- Width = 915
- End
- Begin VB.Label Label5
- Caption = "身份证号:"
- Height = 195
- Left = 2865
- TabIndex = 11
- Top = 630
- Width = 915
- End
- Begin VB.Label Label4
- Caption = "性别:"
- Height = 225
- Left = 420
- TabIndex = 9
- Top = 600
- Width = 570
- End
- Begin VB.Label Label3
- Caption = "照片:"
- Height = 195
- Left = 6630
- TabIndex = 8
- Top = 330
- Width = 585
- End
- Begin VB.Label Label2
- Caption = "姓名:"
- Height = 195
- Left = 3120
- TabIndex = 7
- Top = 300
- Width = 585
- End
- Begin VB.Label Label1
- Caption = "编号:"
- Height = 195
- Left = 405
- TabIndex = 6
- Top = 300
- Width = 585
- End
- End
- End
- Attribute VB_Name = "main_rsgl_rsdaxx_lr"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim i As Integer '定义整型变量
- Dim rs1 As New ADODB.Recordset '定义数据集对象
- Public photoFilename As String
- Dim mst As New ADODB.Stream
- Private Sub cmdDept_Click()
- deptMark = 2
- Load main_datatree
- main_datatree.Show 1
- End Sub
- Private Sub cmdPhotoAdd_Click()
- '添加职工相片
- With CommonDialog1
- .DialogTitle = "选择要加入的职工相片"
- .Filter = "jpg图片|*.jpg"
- .ShowOpen '打开对话框
- PicPhoto.Picture = LoadPicture(.FileName)
- photoFilename = .FileName
- End With
- End Sub
- Private Sub cmdPrint_Click()
- Dim A, B, D As Integer
- A = 350
- B = 500
- D = 400
- Printer.CurrentX = A + 600
- Printer.CurrentY = 200
- Printer.FontSize = 16
- Printer.Font.Name = "华文行楷"
- Printer.Print "员工卡片"
- If PicPhoto.Picture <> LoadPicture("") Then
- Printer.PaintPicture PicPhoto.Picture, PicPhoto.Left - 1500, PicPhoto.Top + 300
- End If
- Printer.Font.Name = "宋体"
- Printer.FontSize = 10
- Printer.CurrentX = A
- Printer.CurrentY = B + 200
- Printer.Print "编号:" & Txt1(0).text & " 姓名:" & Txt1(1)
- B = B + D
- Printer.CurrentX = A
- Printer.CurrentY = B + 200
- Printer.Print "性别:" & Combo1.text & " 身份证号:" & Txt1(2).text
- B = B + D
- Printer.CurrentX = A
- Printer.CurrentY = B + 200
- Printer.Print "部门:" & Txt1(11)
- B = B + D
- Printer.CurrentX = A
- Printer.CurrentY = B + 200
- Printer.Print "家庭住址:" & Txt1(6).text
- B = B + D
- Printer.CurrentX = A
- Printer.CurrentY = B + 200
- Printer.Print "联系电话:" & Txt1(4) & " 手机:" & Txt1(5)
- B = B + D
- Printer.CurrentX = A
- Printer.CurrentY = B + 200
- Printer.Print "职务:" & DataCombo5 & " 职称:" & DataCombo6 & " 基本工资:" & Txt1(12)
- B = B + D
- Printer.CurrentX = A
- Printer.CurrentY = B + 200
- Printer.Print "调入时间:" & DTP4 & " 登记日期:" & DTP5 & " 登记人:" & Txt1(16)
- Printer.EndDoc
- End Sub
- Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then Txt1(2).SetFocus
- End Sub
- Private Sub Combo2_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then DataCombo2.SetFocus
- End Sub
- Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then Combo2.SetFocus
- End Sub
- Private Sub DataCombo2_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then DTP2.SetFocus
- End Sub
- Private Sub DataCombo3_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then Txt1(9).SetFocus
- End Sub
- Private Sub DataCombo4_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then DataCombo5.SetFocus
- End Sub
- Private Sub DataCombo5_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then DataCombo6.SetFocus
- End Sub
- Private Sub DataCombo6_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then Txt1(12).SetFocus
- End Sub
- Private Sub DTP1_Change()
- Txt1(17) = DateDiff("yyyy", DTP1.Value, Date)
- End Sub
- Private Sub DTP1_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then DataCombo1.SetFocus
- End Sub
- Private Sub DTP2_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then Txt1(3).SetFocus
- End Sub
- Private Sub DTP3_Change()
- Txt1(10) = Val(Left(Date, 4)) - Val(Left(DTP3, 4))
- End Sub
- Private Sub DTP3_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then Txt1(10).SetFocus
- End Sub
- Private Sub DTP4_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then Txt1(14).SetFocus
- End Sub
- Private Sub DTP5_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then Txt1(16).SetFocus
- End Sub
- Private Sub Form_Load()
- Combo1.AddItem ("男")
- Combo1.AddItem ("女")
- Combo1.ListIndex = 0
- Combo2.AddItem ("未婚")
- Combo2.AddItem ("已婚")
- Combo2.AddItem ("再婚")
- Combo2.ListIndex = 0
- If blnAddRS = True Then
- Me.Caption = "人事信息添加"
- rs1.Open "select * from 人事表 order by 编号", Cnn, adOpenKeyset, adLockOptimistic
- If rs1.RecordCount > 0 Then
- rs1.MoveLast
- Txt1(0) = Format(Val(rs1.Fields("编号")) + 1, "00000")
- Else
- Txt1(0) = "00001"
- End If
- rs1.Close
- Txt1(16) = czy
- Else
- Me.Caption = "人事信息修改"
- With main_rsgl_rsdaxx.Adodc1.Recordset
- If .RecordCount > 0 Then
- Txt1(0) = .Fields("编号")
- Txt1(1) = .Fields("姓名")
- Combo1.text = .Fields("性别")
- Txt1(2) = .Fields("身份证号")
- DTP1.Value = .Fields("出生年月")
- Txt1(17) = .Fields("年龄")
- DataCombo1 = .Fields("民族")
- Combo2 = .Fields("婚姻状况")
- DataCombo2 = .Fields("政治面貌")
- DTP2.Value = .Fields("入党团时间")
- Txt1(3) = .Fields("籍贯")
- Txt1(4) = .Fields("联系电话")
- Txt1(5) = .Fields("手机号码")
- Txt1(6) = .Fields("家庭地址")
- Txt1(7) = .Fields("毕业院校")
- Txt1(8) = .Fields("专业")
- DataCombo3 = .Fields("文化程度")
- Txt1(9) = .Fields("特长")
- DTP3.Value = .Fields("参加工作时间")
- Txt1(10) = .Fields("总工龄")
- Set PicPhoto.DataSource = main_rsgl_rsdaxx.Adodc1
- PicPhoto.DataField = "照片"
- If .Fields("照片") Is Nothing Then
- PicPhoto.Picture = LoadPicture()
- End If
- Txt1(11) = .Fields("部门")
- DataCombo4 = .Fields("工种")
- DataCombo5 = .Fields("职务")
- DataCombo6 = .Fields("职称")
- Txt1(12) = .Fields("基本工资")
- Txt1(13) = .Fields("其它工资")
- DTP4.Value = .Fields("调入时间")
- Txt1(14) = .Fields("本单位工龄")
- If .Fields("简历") <> "" Then Txt1(15) = .Fields("简历")
- DTP5.Value = .Fields("登记日期")
- Txt1(16) = .Fields("登记人")
- End If
- End With
- End If
- End Sub
- Private Sub Form_Activate()
- Txt1(1).SetFocus
- If deptMark = 1 Then DataCombo4.SetFocus
- End Sub
- Private Sub PicPhoto_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then DTP2.SetFocus
- End Sub
- Private Sub Txt1_GotFocus(index As Integer)
- Txt1(index).BackColor = &HFFFF00
- Txt1(index).SelStart = 0
- Txt1(index).SelLength = Len(Txt1(index))
- End Sub
- Private Sub Txt1_LostFocus(index As Integer)
- Txt1(index).BackColor = &H80000005
- End Sub
- Private Sub Txt1_KeyDown(index As Integer, KeyCode As Integer, Shift As Integer)
- '回车获得焦点
- If KeyCode = vbKeyReturn And index > 2 And index < 8 Then Txt1(index + 1).SetFocus
- If KeyCode = vbKeyReturn And index = 1 Then Combo1.SetFocus
- If KeyCode = vbKeyReturn And index = 2 Then DTP1.SetFocus
- If KeyCode = vbKeyReturn And index = 8 Then DataCombo3.SetFocus
- If KeyCode = vbKeyReturn And index = 9 Then DTP3.SetFocus
- If KeyCode = vbKeyReturn And index = 10 Then Txt1(11).SetFocus
- If KeyCode = vbKeyReturn And index = 11 Then cmdDept.SetFocus
- If KeyCode = vbKeyReturn And index = 12 Then Txt1(13).SetFocus
- If KeyCode = vbKeyReturn And index = 13 Then DTP4.SetFocus
- If KeyCode = vbKeyReturn And index = 14 Then Txt1(15).SetFocus
- If KeyCode = vbKeyReturn And index = 15 Then DTP5.SetFocus
- If KeyCode = vbKeyReturn And index = 16 Then CmdSave.SetFocus
- End Sub
- Private Sub cmdSave_Click()
- Dim A As Long
- If blnAddRS = False Then
- A = MsgBox("您确实要修改这条数据吗?", vbYesNo)
- If A = vbYes Then
- rs1.Open "select * from 人事表 where 编号='" + Txt1(0).text + "'", Cnn, adOpenKeyset, adLockOptimistic
- If rs1.RecordCount > 0 Then
- rs1.Fields("编号") = Txt1(0)
- rs1.Fields("姓名") = Txt1(1)
- rs1.Fields("性别") = Combo1.text
- rs1.Fields("身份证号") = Txt1(2)
- rs1.Fields("出生年月") = DTP1.Value
- rs1.Fields("年龄") = Txt1(17)
- rs1.Fields("民族") = DataCombo1
- rs1.Fields("婚姻状况") = Combo2
- rs1.Fields("政治面貌") = DataCombo2
- rs1.Fields("入党团时间") = DTP2.Value
- rs1.Fields("籍贯") = Txt1(3)
- rs1.Fields("联系电话") = Txt1(4)
- rs1.Fields("手机号码") = Txt1(5)
- rs1.Fields("家庭地址") = Txt1(6)
- rs1.Fields("毕业院校") = Txt1(7)
- rs1.Fields("专业") = Txt1(8)
- rs1.Fields("文化程度") = DataCombo3
- rs1.Fields("特长") = Txt1(9)
- rs1.Fields("参加工作时间") = DTP3.Value
- rs1.Fields("总工龄") = Val(Txt1(10))
- mst.Type = adTypeBinary
- mst.Open
- If photoFilename <> "" Then mst.LoadFromFile photoFilename
- rs1.Fields("照片") = mst.Read
- rs1.Fields("部门") = Txt1(11)
- rs1.Fields("工种") = DataCombo4
- rs1.Fields("职务") = DataCombo5
- rs1.Fields("职称") = DataCombo6
- rs1.Fields("基本工资") = Val(Txt1(12))
- rs1.Fields("其它工资") = Val(Txt1(13))
- rs1.Fields("调入时间") = DTP4.Value
- rs1.Fields("本单位工龄") = Val(Txt1(14))
- rs1.Fields("简历") = Txt1(15)
- rs1.Fields("登记日期") = DTP5.Value
- rs1.Fields("登记人") = Txt1(16)
- rs1.Update
- main_rsgl_rsdaxx.Adodc1.Refresh
- End If
- rs1.Close
- mst.Close
- End If
- Else
- If Txt1(1).text = "" Then
- MsgBox "姓名不允许为空!"
- Exit Sub
- End If
- rs1.Open "select * from 人事表", Cnn, adOpenKeyset, adLockOptimistic
- '新增人员
- rs1.AddNew
- rs1.Fields("编号") = Txt1(0)
- rs1.Fields("姓名") = Txt1(1)
- rs1.Fields("性别") = Combo1.text
- rs1.Fields("身份证号") = Txt1(2)
- rs1.Fields("出生年月") = DTP1.Value
- rs1.Fields("年龄") = Txt1(17)
- rs1.Fields("民族") = DataCombo1
- rs1.Fields("婚姻状况") = Combo2
- rs1.Fields("政治面貌") = DataCombo2
- rs1.Fields("入党团时间") = DTP2.Value
- rs1.Fields("籍贯") = Txt1(3)
- rs1.Fields("联系电话") = Txt1(4)
- rs1.Fields("手机号码") = Txt1(5)
- rs1.Fields("家庭地址") = Txt1(6)
- rs1.Fields("毕业院校") = Txt1(7)
- rs1.Fields("专业") = Txt1(8)
- rs1.Fields("文化程度") = DataCombo3
- rs1.Fields("特长") = Txt1(9)
- rs1.Fields("参加工作时间") = DTP3.Value
- rs1.Fields("总工龄") = Val(Txt1(10))
- mst.Type = adTypeBinary
- mst.Open
- If photoFilename <> "" Then mst.LoadFromFile photoFilename
- rs1.Fields("照片") = mst.Read
- rs1.Fields("部门") = Txt1(11)
- rs1.Fields("工种") = DataCombo4
- rs1.Fields("职务") = DataCombo5
- rs1.Fields("职称") = DataCombo6
- rs1.Fields("基本工资") = Val(Txt1(12))
- rs1.Fields("其它工资") = Val(Txt1(13))
- rs1.Fields("调入时间") = DTP4.Value
- rs1.Fields("本单位工龄") = Val(Txt1(14))
- rs1.Fields("简历") = Txt1(15)
- rs1.Fields("登记日期") = DTP5.Value
- rs1.Fields("登记人") = Txt1(16)
- rs1.Update
- main_rsgl_rsdaxx.Adodc1.Refresh
- rs1.Close
- mst.Close
- End If
- Unload Me
- End Sub
- Private Sub CmdEnd_Click()
- Unload Me
- End Sub