【VB开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了VB开源代码-frmchargerate.frm的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
VERSION 5.00
Begin VB.Form frmchargerate
BorderStyle = 3 'Fixed Dialog
Caption = "医疗费用比例调整"
ClientHeight = 3315
ClientLeft = 45
ClientTop = 330
ClientWidth = 5595
Icon = "frmchargerate.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3315
ScaleWidth = 5595
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.PictureBox Picture1
Height = 2595
Left = 240
ScaleHeight = 2535
ScaleWidth = 4935
TabIndex = 0
Top = 450
Width = 4995
Begin VB.TextBox Text1
BackColor = &H00C0FFFF&
Height = 345
Index = 3
Left = 1320
TabIndex = 8
Top = 2190
Width = 1485
End
Begin VB.TextBox Text1
BackColor = &H00C0FFFF&
Height = 345
Index = 2
Left = 1320
TabIndex = 7
Top = 1680
Width = 1485
End
Begin VB.TextBox Text1
BackColor = &H00C0FFFF&
Height = 345
Index = 1
Left = 1320
TabIndex = 6
Top = 1140
Width = 1485
End
Begin VB.ComboBox Combo1
BackColor = &H00C0FFFF&
Height = 300
Left = 1320
TabIndex = 5
Top = 120
Width = 1515
End
Begin VB.TextBox Text1
BackColor = &H00C0FFFF&
Height = 345
Index = 0
Left = 1320
TabIndex = 4
Top = 630
Width = 1485
End
Begin VB.CommandButton Command1
Caption = "确定(&O)"
Height = 465
Index = 0
Left = 3450
TabIndex = 3
Top = 900
Width = 1005
End
Begin VB.CommandButton Command1
Caption = "取消(&C)"
Height = 465
Index = 1
Left = 3450
TabIndex = 2
Top = 1440
Width = 1005
End
Begin
VB.CommandButton Command1
Caption = "退出(&E)"
Height = 465
Index = 2
Left = 3480
TabIndex = 1
Top = 1980
Width = 1005
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "人员类别"
BeginProperty Font
Name = "楷体_GB2312"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Index = 0
Left = 210
TabIndex = 13
Top = 180
Width = 780
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "校内门诊(%)"
BeginProperty Font
Name = "楷体_GB2312"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Index = 1
Left = 210
TabIndex = 12
Top = 690
Width = 1095
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "校外门诊(%)"
BeginProperty Font
Name = "楷体_GB2312"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Index = 2
Left = 210
TabIndex = 11
Top = 1230
Width = 1095
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "因公受伤(%)"
BeginProperty Font
Name = "楷体_GB2312"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Index = 3
Left = 210
TabIndex = 10
Top = 1740
Width = 1095
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "校外住院(%)"
BeginProperty Font
Name = "楷体_GB2312"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Index = 4
Left = 180
TabIndex = 9
Top = 2250
Width = 1095
End
End
End
Attribute VB_Name = "frmchargerate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Change()
'***********当改变combo1按钮时自动加载该类人员的医疗费比例*************
Set rsrate = New ADODB.Recordset
rsrate.open "select * from leibie where 人员名称='" & Combo1.Text & "'", cn, adOpenStatic, adLockPessimistic
For i = 0 To 3
Text1(i).Text = rsrate.Fields(i + 2).Value
Next i
Text1(0).SetFocus
End Sub
Private Sub Combo1_Click()
'***********当按下combo1按钮时自动加载该类人员的医疗费比例*************
Set rsrate = New ADODB.Recordset
rsrate.open "select * from leibie where 人员名称='" & Combo1.Text & "'", cn, adOpenStatic, adLockPessi
mistic
For i = 0 To 3
Text1(i).Text = Trim(str(rsrate.Fields(i + 2).Value * 100))
Next i
Text1(0).SetFocus
End Sub
Private Sub Command1_Click(Index As Integer)
'On Error GoTo err
Select Case Index
Case 0 '确定按钮
'检查数据是否为空
If Text1(0).Text = "" Then
MsgBox "请输入校内门诊比例!", vbOKOnly + vbExclamation, "注意了:)"
Exit Sub
End If
If Text1(1).Text = "" Then
MsgBox "请输入校外门诊比例!", vbOKOnly + vbExclamation, "注意了:)"
Exit Sub
End If
If Text1(2).Text = "" Then
MsgBox "请输入工伤门诊比例!", vbOKOnly + vbExclamation, "注意了:)"
Exit Sub
End If
If Text1(3).Text = "" Then
MsgBox "请输入校外住院比例!", vbOKOnly + vbExclamation, "注意了:)"
Exit Sub
End If
'********更新记录
For i = 0 To 3
rsrate.Fields(i + 2).Value = Val(Text1(i).Text) / 100
Next i
rsrate.Update
MsgBox "已成功更新一记