?? frm_dajf.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_dajf
Caption = "檔案解封"
ClientHeight = 720
ClientLeft = 60
ClientTop = 345
ClientWidth = 5535
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 720
ScaleWidth = 5535
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height = 375
Left = 2520
TabIndex = 6
Text = "Text2"
Top = 2040
Width = 1215
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 480
Top = 2040
Width = 1935
_ExtentX = 3413
_ExtentY = 661
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=ZYGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ZYGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_kfzz"
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 = 700
Left = 0
TabIndex = 0
Top = 0
Width = 5535
Begin VB.CommandButton Command2
Caption = "取消"
Height = 350
Left = 4440
TabIndex = 5
Top = 240
Width = 975
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 350
Left = 3360
TabIndex = 4
Top = 240
Width = 975
End
Begin VB.TextBox Text1
Height = 300
Left = 1800
TabIndex = 3
Top = 240
Width = 1455
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frm_dajf.frx":0000
Left = 120
List = "frm_dajf.frx":0010
Style = 2 'Dropdown List
TabIndex = 1
Top = 240
Width = 1335
End
Begin VB.Label Label1
Caption = "="
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1560
TabIndex = 2
Top = 300
Width = 255
End
End
End
Attribute VB_Name = "frm_dajf"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click() '檔案解封
Call main
If Combo1.Text = "" Or Text1.Text = "" Then
MsgBox "輸入或選擇的內容不能為空值", 64, "醫院住院管理系統"
Else
If Text2.Text = "administrator" Then '如果是系統管理員,就解封所有封存者的信息
Adodc1.RecordSource = "select * from Table_kfzz where " + Combo1 + "='" + Text1.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Set adoRs = adoCon.Execute("UPDATE Table_kfzz SET 是否封存= 0,封存者=' ' where " + Combo1 + "='" + Text1.Text + "'")
MsgBox "病歷檔案解封成功!!", 64, "醫院住院管理系統"
Else
MsgBox "沒有此操作員的封存信息", 64, "醫院住院管理系統"
End If
Else '如果是以封存者的身份登錄,就解封該病人的檔案信息
Adodc1.RecordSource = "select * from Table_kfzz where " + Combo1 + "='" + Text1.Text + "' and 封存者='" + Text2.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Set adoRs = adoCon.Execute("UPDATE Table_kfzz SET 是否封存= 0,封存者=' ' where " + Combo1 + "='" + Text1.Text + "'")
MsgBox "病歷檔案解封成功!!", 64, "醫院住院管理系統"
Else
MsgBox "沒有此操作員的封存信息", 64, "醫院住院管理系統"
End If
End If
End If
adoCon.Close
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Call main
If KeyCode = 13 Then
If Combo1.Text = "" Or Text1.Text = "" Then
MsgBox "輸入或選擇的內容不能為空值", 64, "醫院住院管理系統"
Else
If Text2.Text = "administrator" Then
Adodc1.RecordSource = "select * from Table_kfzz where " + Combo1 + "='" + Text1.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Set adoRs = adoCon.Execute("UPDATE Table_kfzz SET 是否封存= 0,封存者=' ' where " + Combo1 + "='" + Text1.Text + "'")
MsgBox "病歷檔案解封成功!!", 64, "醫院住院管理系統"
Else
MsgBox "沒有此操作員的封存信息", 64, "醫院住院管理系統"
End If
Else
Adodc1.RecordSource = "select * from Table_kfzz where " + Combo1 + "='" + Text1.Text + "' and 封存者='" + Text2.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Set adoRs = adoCon.Execute("UPDATE Table_kfzz SET 是否封存= 0,封存者=' ' where " + Combo1 + "='" + Text1.Text + "'")
MsgBox "病歷檔案解封成功!!", 64, "醫院住院管理系統"
Else
MsgBox "沒有此操作員的封存信息", 64, "醫院住院管理系統"
End If
End If
End If
Else
End If
adoCon.Close
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -