?? 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 + -