- VERSION 5.00
- Begin VB.Form main_gzsz_gzgs_lr
- BorderStyle = 3 'Fixed Dialog
- Caption = "编辑工资项目"
- ClientHeight = 2505
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4680
- Icon = "main_gzsz_gzgs_lr.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2505
- ScaleWidth = 4680
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton Command2
- Caption = "取消"
- Height = 390
- Left = 2370
- TabIndex = 6
- Top = 1860
- Width = 1245
- End
- Begin VB.CommandButton Command1
- Caption = "确定"
- Height = 390
- Left = 1050
- TabIndex = 5
- Top = 1860
- Width = 1245
- End
- Begin VB.Frame Frame1
- Height = 45
- Left = -195
- TabIndex = 4
- Top = 1680
- Width = 5925
- End
- Begin VB.TextBox Text1
- Height = 300
- Left = 1440
- TabIndex = 3
- Text = "0"
- Top = 975
- Width = 2580
- End
- Begin VB.ComboBox Combo1
- Height = 300
- Left = 1440
- TabIndex = 1
- Text = "Combo1"
- Top = 390
- Width = 2580
- End
- Begin VB.Label Label2
- BackStyle = 0 'Transparent
- Caption = "初始值:"
- Height = 255
- Left = 450
- TabIndex = 2
- Top = 1005
- Width = 885
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "工资项目:"
- Height = 225
- Left = 450
- TabIndex = 0
- Top = 435
- Width = 900
- End
- End
- Attribute VB_Name = "main_gzsz_gzgs_lr"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim rs1 As New ADODB.Recordset
- Private Sub Command1_Click()
- Cnn.Execute ("update 工资公式表 set 初始值=" + Text1 + " where 项目名称='" + Combo1 + "'")
- main_gzsz_gzgs.Adodc1.Refresh
- Unload Me
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub
- Private Sub Form_Load()
- rs1.Open "select 项目名称 from 工资公式表 group by 项目名称", Cnn, adOpenKeyset, adLockOptimistic
- If rs1.RecordCount > 0 Then
- rs1.MoveFirst
- Do While rs1.EOF = False
- Combo1.AddItem rs1.Fields("项目名称")
- rs1.MoveNext
- Loop
- End If
- rs1.Close
- Combo1 = main_gzsz_gzgs.DataGrid1.Columns(1)
- Text1 = main_gzsz_gzgs.DataGrid1.Columns(2)
- End Sub