📄 main_tjcx_sfcx.frm
字号:
Height = 390
Left = 4980
Style = 1 'Graphical
TabIndex = 0
Top = 4275
Width = 1755
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Index = 0
Left = -990
Top = 2145
Visible = 0 'False
Width = 1710
_ExtentX = 3016
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=MZJJSFXT"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=MZJJSFXT"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 门诊收费信息表"
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 VB.Frame Frame1
Height = 870
Left = 30
TabIndex = 9
Top = 15
Width = 8475
Begin VB.CheckBox Check1
Height = 300
Index = 1
Left = 60
TabIndex = 14
Top = 480
Width = 270
End
Begin VB.CheckBox Check1
Height = 300
Index = 0
Left = 60
TabIndex = 13
Top = 135
Value = 1 'Checked
Width = 270
End
Begin VB.TextBox Text1
BackColor = &H00FFFFC0&
Height = 300
Left = 3210
TabIndex = 12
Top = 150
Width = 5115
End
Begin VB.ComboBox Combo2
BackColor = &H00FFFFC0&
Height = 300
Left = 2355
TabIndex = 11
Top = 150
Width = 840
End
Begin VB.ComboBox Combo1
BackColor = &H00FFFFC0&
Height = 300
Left = 435
TabIndex = 10
Top = 150
Width = 1920
End
Begin MSComCtl2.DTPicker DTP1
Height = 300
Left = 1065
TabIndex = 15
Top = 495
Width = 3315
_ExtentX = 5847
_ExtentY = 529
_Version = 393216
CalendarBackColor= 16777215
Format = 19791873
CurrentDate = 38049
End
Begin MSComCtl2.DTPicker DTP2
Height = 300
Left = 5025
TabIndex = 16
Top = 495
Width = 3315
_ExtentX = 5847
_ExtentY = 529
_Version = 393216
CalendarBackColor= 16777215
Format = 19791873
CurrentDate = 38049
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "日期: 至"
Height = 195
Left = 405
TabIndex = 17
Top = 555
Width = 5910
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Index = 1
Left = -15
Top = 2460
Visible = 0 'False
Width = 1710
_ExtentX = 3016
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=MZJJSFXT"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=MZJJSFXT"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 门诊收费信息表"
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 Adodc1
Height = 330
Index = 2
Left = -15
Top = 2535
Visible = 0 'False
Width = 1710
_ExtentX = 3016
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=MZJJSFXT"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=MZJJSFXT"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 门诊收费信息表"
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 VB.Label LblRecordCount
BackStyle = 0 'Transparent
ForeColor = &H000000FF&
Height = 225
Left = 900
TabIndex = 8
Top = 4365
Width = 2265
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "记录数:"
Height = 195
Left = 90
TabIndex = 7
Top = 4380
Width = 825
End
End
Attribute VB_Name = "main_Tjcx_sfcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Combo1.AddItem ("病案类型")
Combo1.AddItem ("病案号")
Combo1.AddItem ("患者姓名")
Combo1.AddItem ("费用类型")
Combo1.AddItem ("就诊科室")
Combo1.AddItem ("医生")
Combo1.AddItem ("收据号")
Combo1.ListIndex = 1
Combo2.AddItem ("like")
Combo2.AddItem ("=")
Combo2.ListIndex = 0
CmdFind_Click
End Sub
Private Sub SSTab1_Click(PreviousTab As Integer)
CmdFind_Click
End Sub
Private Sub CmdFind_Click()
Index = SSTab1.Tab
If Check1(0).Value = 1 And Check1(1).Value = 0 Then
Select Case Combo2.Text
Case Is = "like"
Select Case Index
Case 0
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " like + '" + Text1.Text + "'+'%'and 退费标志=1"
Adodc1(Index).Refresh
Case 1
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " like + '" + Text1.Text + "'+'%'and 类别='西药费'or 类别='中药费'and 退费标志=1"
Adodc1(Index).Refresh
Case 2
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " like + '" + Text1.Text + "'+'%'and 类别<> '西药费'and 类别<>'中药费'and 退费标志=1"
Adodc1(Index).Refresh
End Select
Case Is = "="
Select Case Index
Case 0
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " = '" + Text1.Text + "'and 退费标志=1"
Adodc1(Index).Refresh
Case 1
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " = '" + Text1.Text + "'and 类别='西药费'or 类别='中药费'and 退费标志=1"
Adodc1(Index).Refresh
Case 2
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " = '" + Text1.Text + "'and 类别<>'西药费'and 类别<>'中药费'and 退费标志=1"
Adodc1(Index).Refresh
End Select
End Select
End If
If Check1(0).Value = 0 And Check1(1).Value = 1 Then
Select Case Index
Case 0
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'and 退费标志=1"
Adodc1(Index).Refresh
Case 1
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'and 类别='西药费'or 类别='中药费'and 退费标志=1"
Adodc1(Index).Refresh
Case 2
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'and 类别<>'西药费'and 类别='中药费'and 退费标志=1"
Adodc1(Index).Refresh
End Select
End If
If Check1(0).Value = 1 And Check1(1).Value = 1 Then
Select Case Combo2.Text
Case Is = "like"
Select Case Index
Case 0
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " like'%'+ '" + Text1.Text + "'+'%'and 日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'and 退费标志=1"
Adodc1(Index).Refresh
Case 1
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " like'%'+ '" + Text1.Text + "'+'%'and 日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'and 类别='西药费'or 类别='中药费'and 退费标志=1"
Adodc1(Index).Refresh
Case 2
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " like'%'+ '" + Text1.Text + "'+'%'and 日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'and 类别<>'西药费'and 类别='中药费'and 退费标志=1"
Adodc1(Index).Refresh
End Select
Case Is = "="
Select Case Index
Case 0
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " = '" + Text1.Text + "'and 日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'and 退费标志=1"
Adodc1(Index).Refresh
Case 1
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " = '" + Text1.Text + "'and 日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'and 类别='西药费'or 类别='中药费'and 退费标志=1"
Adodc1(Index).Refresh
Case 2
Adodc1(Index).RecordSource = "select * from 门诊收费信息表 where 门诊收费信息表." & Combo1.Text & " = '" + Text1.Text + "'and 日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'and 类别<>'西药费'and 类别='中药费'and 退费标志=1"
Adodc1(Index).Refresh
End Select
End Select
End If
LblRecordCount.Caption = Adodc1(Index).Recordset.RecordCount
End Sub
Private Sub Cmdend_Click()
EnaT Frm_Main
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -