main_rsgl_pygl_lr.frm
上传用户:wd52qq
上传日期:2022-07-24
资源大小:5366k
文件大小:12k
- 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_pygl_lr
- BorderStyle = 3 'Fixed Dialog
- Caption = "Form1"
- ClientHeight = 4080
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 7290
- Icon = "main_rsgl_pygl_lr.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4080
- ScaleWidth = 7290
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton Command2
- Caption = "取消"
- Height = 390
- Left = 3825
- TabIndex = 20
- Top = 3525
- Width = 1770
- End
- Begin VB.CommandButton Command1
- Caption = "确定"
- Height = 390
- Left = 1935
- TabIndex = 19
- Top = 3525
- Width = 1770
- End
- Begin VB.Frame Frame1
- Height = 3405
- Left = 15
- TabIndex = 0
- Top = -60
- Width = 7275
- Begin VB.TextBox Text1
- Height = 330
- Index = 6
- Left = 4755
- TabIndex = 22
- Top = 1740
- Width = 2400
- End
- Begin VB.TextBox Text1
- Height = 330
- Index = 5
- Left = 1140
- TabIndex = 21
- Top = 1740
- Width = 2535
- End
- Begin VB.TextBox Text1
- Height = 330
- Index = 0
- Left = 1140
- Locked = -1 'True
- TabIndex = 8
- Top = 225
- Width = 2535
- End
- Begin VB.TextBox Text1
- Enabled = 0 'False
- Height = 330
- Index = 1
- Left = 4755
- Locked = -1 'True
- TabIndex = 7
- Top = 255
- Width = 2400
- End
- Begin VB.TextBox Text1
- Enabled = 0 'False
- Height = 330
- Index = 2
- Left = 4755
- Locked = -1 'True
- TabIndex = 5
- Top = 630
- Width = 2400
- End
- Begin VB.TextBox Text1
- Height = 330
- Index = 3
- Left = 1140
- TabIndex = 3
- Top = 1365
- Width = 2535
- End
- Begin VB.TextBox Text1
- Height = 330
- Index = 4
- Left = 4755
- TabIndex = 2
- Top = 1365
- Width = 2400
- End
- Begin VB.TextBox Text1
- Height = 1110
- Index = 7
- Left = 1140
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 1
- Top = 2130
- Width = 6015
- End
- Begin MSComCtl2.DTPicker DTP1
- Height = 330
- Left = 1140
- TabIndex = 4
- Top = 1005
- Width = 2535
- _ExtentX = 4471
- _ExtentY = 582
- _Version = 393216
- Format = 48168961
- CurrentDate = 38698
- End
- Begin MSDataListLib.DataCombo DataCombo1
- Bindings = "main_rsgl_pygl_lr.frx":000C
- Height = 330
- Left = 1140
- TabIndex = 6
- Top = 615
- Width = 2535
- _ExtentX = 4471
- _ExtentY = 582
- _Version = 393216
- ListField = "聘用类型"
- Text = ""
- End
- Begin MSComCtl2.DTPicker DTP2
- Height = 300
- Left = 4755
- TabIndex = 17
- Top = 1005
- Width = 2400
- _ExtentX = 4233
- _ExtentY = 529
- _Version = 393216
- Format = 48168961
- CurrentDate = 38698
- End
- Begin VB.Label Label11
- BackStyle = 0 'Transparent
- Caption = "试用期工资:"
- Height = 255
- Left = 3690
- TabIndex = 24
- Top = 1800
- Width = 1125
- End
- Begin VB.Label Label10
- BackStyle = 0 'Transparent
- Caption = "聘用期工资:"
- Height = 195
- Left = 75
- TabIndex = 23
- Top = 1800
- Width = 1110
- End
- Begin VB.Label Label9
- BackStyle = 0 'Transparent
- Caption = "备注:"
- Height = 255
- Left = 570
- TabIndex = 18
- Top = 2145
- Width = 555
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "聘用编号:"
- Height = 255
- Left = 195
- TabIndex = 16
- Top = 315
- Width = 915
- End
- Begin VB.Label Label2
- BackStyle = 0 'Transparent
- Caption = "员工编号:"
- Height = 255
- Left = 3840
- TabIndex = 15
- Top = 330
- Width = 1005
- End
- Begin VB.Label Label3
- BackStyle = 0 'Transparent
- Caption = "聘用类型:"
- Height = 255
- Left = 195
- TabIndex = 14
- Top = 705
- Width = 1005
- End
- Begin VB.Label Label4
- BackStyle = 0 'Transparent
- Caption = "员工姓名:"
- Height = 255
- Left = 3840
- TabIndex = 13
- Top = 705
- Width = 915
- End
- Begin VB.Label Label5
- BackStyle = 0 'Transparent
- Caption = "聘用日期:"
- Height = 255
- Left = 195
- TabIndex = 12
- Top = 1080
- Width = 1005
- End
- Begin VB.Label Label6
- BackStyle = 0 'Transparent
- Caption = "结束日期:"
- Height = 255
- Left = 3855
- TabIndex = 11
- Top = 1095
- Width = 1005
- End
- Begin VB.Label Label7
- BackStyle = 0 'Transparent
- Caption = "聘用期限:"
- Height = 255
- Left = 195
- TabIndex = 10
- Top = 1425
- Width = 915
- End
- Begin VB.Label Label8
- BackStyle = 0 'Transparent
- Caption = "试用期:"
- Height = 255
- Left = 4020
- TabIndex = 9
- Top = 1440
- Width = 735
- 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_pygl_lr"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Form_Activate()
- DataCombo1.SetFocus
- End Sub
- Private Sub Form_Load()
- Text1(0) = Year(Date) & Month(Date) & HTygbh
- If blnAddPY = True Then
- Me.Caption = "聘用信息添加"
- DTP1.Value = Date
- DTP2.Value = DateAdd("yyyy", 1, Date)
- Else
- Me.Caption = "聘用信息修改"
- With main_rsgl_pygl.Adodc1.Recordset
- If .RecordCount > 0 Then
- Text1(0) = .Fields("聘用编号")
- Text1(1) = .Fields("员工编号")
- Text1(2) = .Fields("员工姓名")
- DataCombo1 = .Fields("聘用类型")
- DTP1.Value = .Fields("聘用开始日期")
- DTP2.Value = .Fields("聘用结束日期")
- Text1(3) = .Fields("聘用期限")
- Text1(5) = .Fields("聘用期工资")
- Text1(4) = .Fields("试用期")
- Text1(6) = .Fields("试用期工资")
- Text1(7) = .Fields("备注")
- End If
- End With
- End If
- End Sub
- Private Sub Text1_KeyDown(index As Integer, KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn And index >= 4 And index < 7 Then Text1(index + 1).SetFocus
- If KeyCode = vbKeyReturn And index = 7 Then Command1.SetFocus
- End Sub
- Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then DTP1.SetFocus
- End Sub
- Private Sub DTP1_Change()
- Text1(3) = DateDiff("yyyy", DTP1.Value, DTP2.Value)
- End Sub
- Private Sub DTP2_Change()
- Text1(3) = DateDiff("yyyy", DTP1.Value, DTP2.Value)
- End Sub
- Private Sub DTP1_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then DTP2.SetFocus
- End Sub
- Private Sub DTP2_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then Text1(4).SetFocus
- End Sub
- Private Sub Command1_Click()
- If blnAddPY = True Then
- Cnn.Execute ("insert into 聘用表(员工编号,员工姓名,聘用编号,聘用类型,聘用开始日期," _
- & "聘用结束日期,聘用期限,聘用期工资,试用期,试用期工资,备注,状态)values('" + Text1(1) + "','" + _
- Text1(2) + "','" + Text1(0) + "','" + DataCombo1 + "','" + str(DTP1.Value) + "','" + _
- str(DTP2.Value) + "','" + Text1(3) + "'," + Text1(5) + ",'" + Text1(4) + "'," + Text1(6) + _
- ",'" + Text1(7) + "','生效')")
- Else
- Cnn.Execute ("update 聘用表 set 聘用编号='" + Text1(0) + "',聘用类型='" + DataCombo1 + _
- "',聘用开始日期='" + str(DTP1.Value) + "',聘用结束日期='" + str(DTP2.Value) + "',聘用期限='" + _
- Text1(3) + "',聘用期工资=" + Text1(5) + ",试用期='" + Text1(4) + "',试用期工资=" + Text1(6) + _
- ",备注='" + Text1(7) + "'where 员工编号='" + Text1(1) + "'")
- End If
- main_rsgl_pygl.Adodc1.Refresh
- Unload Me
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub