?? frm_sfgl.frm
字號:
Begin VB.Frame Frame1
Caption = "除藥費以外的收費列表"
Height = 4575
Left = 0
TabIndex = 0
Top = 120
Width = 4095
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "frm_sfgl.frx":003F
Height = 4095
Left = 120
TabIndex = 1
Top = 360
Width = 3855
_ExtentX = 6800
_ExtentY = 7223
_Version = 393216
AllowUpdate = 0 'False
BackColor = 12648384
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 7
BeginProperty Column00
DataField = "id"
Caption = "id"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "掛號單號"
Caption = "掛號單號"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "名稱"
Caption = "名稱"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "數量"
Caption = "數量"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "單位"
Caption = "單位"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "單價"
Caption = "單價"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "總金額"
Caption = "總金額"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
Object.Visible = 0 'False
ColumnWidth = 2085.166
EndProperty
BeginProperty Column01
ColumnWidth = 2085.166
EndProperty
BeginProperty Column02
ColumnWidth = 2085.166
EndProperty
BeginProperty Column03
ColumnWidth = 1094.74
EndProperty
BeginProperty Column04
ColumnWidth = 2085.166
EndProperty
BeginProperty Column05
ColumnWidth = 2085.166
EndProperty
BeginProperty Column06
ColumnWidth = 2085.166
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc4
Height = 375
Left = 480
Top = 1920
Width = 2535
_ExtentX = 4471
_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_qtsfb"
Caption = "Adodc4"
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.TextBox Text17
Height = 270
Left = 2160
TabIndex = 48
Text = "Text17"
Top = 1440
Width = 975
End
End
End
Attribute VB_Name = "frm_sfgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim temp1
Private Sub Command1_Click()
If Adodc4.Recordset.EOF = False Then
c = MsgBox("您確認要刪除信息嗎?", 17, "醫院住院管理系統")
If c = vbOK Then
Text15.Text = Val(Text15.Text) - Val(Adodc4.Recordset.Fields("總金額"))
Adodc4.Recordset.Delete
Adodc4.Refresh
Else
End If
Else
MsgBox "當前數據庫中已經沒有可刪除的記錄", 64, "醫院住院管理系統"
End If
End Sub
Private Sub Command2_Click()
Call main
If Text6.Text = "" Or Text7.Text = "" Then
MsgBox "產生費用和已交費用不能為空值", 64, "醫院住院管理系統"
Else
If Val(Text6.Text) <> Val(Text7.Text) Then
MsgBox "輸入的已交費用金額不正確", 64, "醫院住院管理系統"
Else
Set adoRs = adoCon.Execute("UPDATE Table_zyxx SET 是否結賬= 1 where 住院號='" + Text10.Text + "'")
Set adoRs = adoCon.Execute("insert into Table_sfb values(" & Text16 & ",'" & Text2 & "','" & Combo1 & "','" & Text10 & "','" & Text13 & "','" & Text3 & "','" & Text4 & "','" & Text5 & "','" & Text12 & "','" & Text9 & "','" & Text15 & "','" & Text6 & "','" & Text7 & "','" & Text8 & "','" & DT1.Value & "')")
MsgBox "數據保存成功!!", 48, "醫院住院管理系統"
End If
End If
adoCon.Close
End Sub
Private Sub Command3_Click()
Adodc1.RecordSource = "select * from Table_zyxx where 掛號單號='" + Text16.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Text2.Text = Adodc1.Recordset.Fields("姓名")
Combo1.Text = Adodc1.Recordset.Fields("性別")
Text10.Text = Adodc1.Recordset.Fields("住院號")
Text3.Text = Adodc1.Recordset.Fields("聯系地址")
Text4.Text = Adodc1.Recordset.Fields("主要診斷")
Text5.Text = Adodc1.Recordset.Fields("付款方式")
Text8.Text = Adodc1.Recordset.Fields("入院時間")
Text13.Text = Adodc1.Recordset.Fields("收入科室")
Text9.Text = Adodc1.Recordset.Fields("主治醫師")
Text1.Locked = False
Command1.Enabled = True
Command2.Enabled = True
temp1 = Text16.Text
Adodc3.RecordSource = "select * from Table_cfb_mxb where 掛號單號='" + Text16.Text + "'"
Adodc3.Refresh
If Adodc3.Recordset.RecordCount > 0 Then
Adodc3.RecordSource = "select sum(總金額) from Table_cfb_mxb where 掛號單號='" + Text16.Text + "' "
Adodc3.Refresh
Text12.Text = DataGrid2.Columns.Item(0).Text
Else
End If
Else
MsgBox "沒有此人的信息", 48, "醫院住院管理系統"
End If
End Sub
Private Sub DataGrid3_KeyDown(KeyCode As Integer, Shift As Integer)
Call main
If KeyCode = 13 Then
If Adodc2.Recordset.RecordCount > 0 Then
Adodc4.RecordSource = "select * from Table_qtsfb order by id"
Adodc4.Refresh
If Adodc4.Recordset.RecordCount > 0 Then
Adodc4.Recordset.MoveLast
Text17.Text = Val(Adodc4.Recordset.Fields("id")) + 1
Else
Text17.Text = 1
End If
AA = Val(Adodc2.Recordset("To1LibSN")) * Val(Adodc2.Recordset.Fields("Fee"))
Set adoRs = adoCon.Execute("insert into Table_qtsfb values(" & Text17 & ",'" & temp1 & "','" & Adodc2.Recordset.Fields("Name") & "','" & Adodc2.Recordset.Fields("To1LibSN") & "','" & Adodc2.Recordset.Fields("Unit") & "','" & Adodc2.Recordset.Fields("Fee") & "','" & AA & "')")
DataGrid3.Visible = False
Adodc4.Refresh
Else
DataGrid3.Visible = False
End If
Else
End If
'統計出費用總金額
Adodc5.RecordSource = "select sum(總金額) from Table_qtsfb where 掛號單號='" + temp1 + "' "
Adodc5.Refresh
Text15.Text = DataGrid4.Columns.Item(0).Text
adoCon.Close
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_Change()
If Text1.Text = "" Then
DataGrid3.Visible = False
Else
DataGrid3.Visible = True
Command1.Enabled = True
Adodc2.RecordSource = "select * from Table_qtsf where Pinyin like '%" + Text1.Text + "%'"
Adodc2.Refresh
End If
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
If Text1.Text = "" Then
Exit Sub
Else
DataGrid3.SetFocus
End If
Else
End If
End Sub
Private Sub Text11_Change()
Text7.Text = Text11.Text
End Sub
Private Sub Text11_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text7.Text = Text11.Text
Command2.SetFocus
Else
End If
End Sub
Private Sub Text15_Change()
Text6.Text = Val(Text12.Text) + Val(Text15.Text)
End Sub
Private Sub Text16_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Adodc1.RecordSource = "select * from Table_zyxx where 掛號單號='" + Text16.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Text2.Text = Adodc1.Recordset.Fields("姓名")
Combo1.Text = Adodc1.Recordset.Fields("性別")
Text10.Text = Adodc1.Recordset.Fields("住院號")
Text3.Text = Adodc1.Recordset.Fields("聯系地址")
Text4.Text = Adodc1.Recordset.Fields("主要診斷")
Text5.Text = Adodc1.Recordset.Fields("付款方式")
Text8.Text = Adodc1.Recordset.Fields("入院時間")
Text13.Text = Adodc1.Recordset.Fields("收入科室")
Text9.Text = Adodc1.Recordset.Fields("主治醫師")
Text11.Enabled = True
Text1.Locked = False
Command1.Enabled = True
Command2.Enabled = True
temp1 = Text16.Text
Adodc3.RecordSource = "select * from Table_cfb_mxb where 掛號單號='" + Text16.Text + "'"
Adodc3.Refresh
If Adodc3.Recordset.RecordCount > 0 Then
Adodc3.RecordSource = "select sum(總金額) from Table_cfb_mxb where 掛號單號='" + Text16.Text + "' "
Adodc3.Refresh
Text12.Text = DataGrid2.Columns.Item(0).Text
Else
End If
Else
MsgBox "沒有此人的信息", 48, "醫院住院管理系統"
End If
Else
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
frm_sfgl_temp.Show
frm_sfgl_temp.DataGrid1.SetFocus
Else
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -