?? frmchargerate.frm
字號:
VERSION 5.00
Begin VB.Form frmchargerate
BorderStyle = 3 'Fixed Dialog
Caption = "醫(yī)療費(fèi)用比例調(diào)整"
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 = "校內(nèi)門診(%)"
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()
'***********當(dāng)改變combo1按鈕時(shí)自動(dòng)加載該類人員的醫(yī)療費(fèi)比例*************
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()
'***********當(dāng)按下combo1按鈕時(shí)自動(dòng)加載該類人員的醫(yī)療費(fèi)比例*************
Set rsrate = New ADODB.Recordset
rsrate.open "select * from leibie where 人員名稱='" & Combo1.Text & "'", cn, adOpenStatic, adLockPessimistic
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 '確定按鈕
'檢查數(shù)據(jù)是否為空
If Text1(0).Text = "" Then
MsgBox "請輸入校內(nèi)門診比例!", 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 "已成功更新一記錄", vbOKOnly, "完成"
Case 1 '取消按鈕
Call Combo1_Click
Case 2 '退出按鈕
Unload Me
End Select
Exit Sub
'err:
' MsgBox err.Description, vbOKOnly + vbCritical, "錯(cuò)誤"
End Sub
Private Sub Form_Load()
'***************加載人員名稱到combo1中*******************
Call condatabase
Set rsleibie = New ADODB.Recordset
rsleibie.open "select * from leibie", cn, adOpenStatic, adLockPessimistic
Do Until rsleibie.EOF
Combo1.AddItem rsleibie.Fields("人員名稱").Value
rsleibie.MoveNext
Loop
Command1(1).Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
mainform.StatusBar1.Panels(1).Text = "狀態(tài): 無"
End Sub
Private Sub Text1_Change(Index As Integer)
Command1(1).Enabled = True
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -