📄 huanzhe.frm
字号:
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 10320
TabIndex = 13
Top = 1440
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "查 询"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6480
TabIndex = 10
Top = 1440
Width = 1095
End
Begin MSComCtl2.DTPicker v_sj
Height = 375
Left = 4680
TabIndex = 9
Top = 1440
Width = 1575
_ExtentX = 2778
_ExtentY = 661
_Version = 393216
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Format = 64552961
CurrentDate = 39632
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 4200
Top = 5040
Visible = 0 'False
Width = 1215
_ExtentX = 2143
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
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
Begin VB.Label t_car
Caption = "0"
Height = 135
Left = 600
TabIndex = 27
Top = 120
Visible = 0 'False
Width = 255
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "发票姓名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 7800
TabIndex = 26
Top = 960
Width = 840
End
Begin VB.Label id
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 120
TabIndex = 25
Top = 120
Visible = 0 'False
Width = 90
End
Begin VB.Label count1
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 9600
TabIndex = 24
Top = 8040
Width = 90
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "患者姓名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 22
Top = 360
Width = 840
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "性别"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 3720
TabIndex = 21
Top = 360
Width = 420
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "年龄"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 5880
TabIndex = 20
Top = 360
Width = 420
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "联系电话"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 7800
TabIndex = 19
Top = 360
Width = 840
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "地址"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 18
Top = 960
Width = 420
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "主要病史"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 360
TabIndex = 17
Top = 8760
Visible = 0 'False
Width = 840
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "主要症状"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 5880
TabIndex = 16
Top = 8760
Visible = 0 'False
Width = 840
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "卡 号"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 15
Top = 1560
Width = 735
End
End
Attribute VB_Name = "huanzhe"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sql As String
If Check1.Value = 1 Then
sql = "select * from 患者信息 where 姓名 like '%" & Trim(v_name.Text) & "%' and 性别 like '%" & Trim(v_sex.Text) & "%' and 年龄 like '%" & Trim(v_old.Text) & "%' and 电话 like '%" & Trim(v_tel.Text) & "%' and 地址 like '%" & Trim(v_address.Text) & "%' and 卡号 like '%" & Trim(v_car.Text) & "%' and 时间='" & Trim(v_sj.Value) & "' order by -id"
End If
If Check1.Value = 0 Then
sql = "select * from 患者信息 where 姓名 like '%" & Trim(v_name.Text) & "%' and 性别 like '%" & Trim(v_sex.Text) & "%' and 年龄 like '%" & Trim(v_old.Text) & "%' and 电话 like '%" & Trim(v_tel.Text) & "%' and 地址 like '%" & Trim(v_address.Text) & "%' and 卡号 like '%" & Trim(v_car.Text) & "%' order by -id"
End If
Dim rs As New ADODB.Recordset
rs.Open sql, db
count1.Caption = rs.RecordCount
Adodc1.CommandType = adCmdText
Adodc1.ConnectionString = db
Adodc1.RecordSource = sql
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
b1 = MsgBox("您确实修改吗?", vbOKCancel, "系统提示!")
If b1 = 1 Then
Dim rs As New ADODB.Recordset
sql = "update 患者信息 set 姓名='" & Trim(v_name.Text) & "',性别='" & Trim(v_sex.Text) & "' ,年龄='" & Trim(v_old.Text) & "' ,电话='" & Trim(v_tel.Text) & "',地址='" & Trim(v_address.Text) & "',卡号='" & Trim(v_car.Text) & "' ,时间='" & Trim(v_sj.Value) & "' ,发票姓名='" & Trim(f_name.Text) & "' where id=" & Trim(id.Caption)
rs.Open sql, db
Dim rs1 As New ADODB.Recordset
sql1 = "update 检查结果 set 姓名='" & Trim(v_name.Text) & "' where 卡号='" & Trim(t_car.Caption) & "'"
rs1.Open sql1, db
b1 = MsgBox("提示,修改成功!", vbQuestion, "系统提示!")
End If
End Sub
Private Sub Command4_Click()
b1 = MsgBox("您确实删除吗?", vbOKCancel, "系统提示!")
If b1 = 1 Then
Dim rs As New ADODB.Recordset
sql = "delete 患者信息 where id=" & Trim(id.Caption)
rs.Open sql, db
Set rs = Nothing
Dim rs1 As New ADODB.Recordset
sql1 = "delete 检查结果 where 卡号='" & Trim(v_car.Text) & "'"
rs1.Open sql1, db
Set rs = Nothing
b1 = MsgBox("提示,删除成功!", vbQuestion, "系统提示!")
End If
End Sub
Private Sub DataGrid1_Click()
On Error Resume Next
id.Caption = CStr(Adodc1.Recordset.Fields("id"))
v_name.Text = CStr(Adodc1.Recordset.Fields("姓名"))
v_sex.Text = CStr(Adodc1.Recordset.Fields("性别"))
v_old.Text = CStr(Adodc1.Recordset.Fields("年龄"))
v_tel.Text = CStr(Adodc1.Recordset.Fields("电话"))
v_address.Text = CStr(Adodc1.Recordset.Fields("地址"))
'v_bs.Text = CStr(Adodc1.Recordset.Fields("主要病史"))
'v_zz.Text = CStr(Adodc1.Recordset.Fields("主要症状"))
v_car.Text = CStr(Adodc1.Recordset.Fields("卡号"))
t_car.Caption = CStr(Adodc1.Recordset.Fields("卡号"))
v_sj.Value = CStr(Adodc1.Recordset.Fields("时间"))
f_name.Text = CStr(Adodc1.Recordset.Fields("发票姓名"))
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -