?? main_zlxmgl_update.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form Main_Zlxmgl_Update
BackColor = &H00E3D9E6&
ClientHeight = 4665
ClientLeft = 60
ClientTop = 60
ClientWidth = 6795
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 4665
ScaleWidth = 6795
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
BackColor = &H00FFC0C0&
Caption = "修改項目"
BeginProperty Font
Name = "隸書"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C000C0&
Height = 3750
Left = 210
TabIndex = 2
Top = 210
Width = 6390
Begin VB.TextBox Text1
BackColor = &H00FFFFFF&
Height = 285
Index = 0
Left = 1455
TabIndex = 10
Top = 615
Width = 3270
End
Begin VB.TextBox Text1
Height = 285
Index = 1
Left = 1455
TabIndex = 9
Top = 1050
Width = 4650
End
Begin VB.TextBox Text1
Height = 285
Index = 2
Left = 1440
TabIndex = 7
Top = 1470
Width = 1710
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1455
TabIndex = 6
Top = 3195
Width = 2370
End
Begin VB.TextBox Text1
Height = 285
Index = 3
Left = 1455
TabIndex = 5
Top = 1890
Width = 4650
End
Begin VB.TextBox Text1
BackColor = &H00FFFFFF&
Height = 285
Index = 4
Left = 1455
TabIndex = 4
Top = 2775
Width = 2370
End
Begin VB.ComboBox Cbolb
Height = 300
Left = 3750
TabIndex = 3
Top = 1470
Width = 2355
End
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "Main_Zlxmgl_Update.frx":0000
Height = 330
Left = 1455
TabIndex = 8
Top = 2295
Width = 4650
_ExtentX = 8202
_ExtentY = 582
_Version = 393216
ListField = "科室名稱"
Text = ""
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "收費項目名稱"
ForeColor = &H00FF0000&
Height = 330
Left = 240
TabIndex = 17
Top = 1080
Width = 1245
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "收費項目編號 "
ForeColor = &H00FF0000&
Height = 330
Left = 240
TabIndex = 16
Top = 645
Width = 1245
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "執行科室"
ForeColor = &H00FF0000&
Height = 330
Left = 240
TabIndex = 15
Top = 2370
Width = 765
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "自費類型 "
ForeColor = &H00FF0000&
Height = 330
Left = 240
TabIndex = 14
Top = 3270
Width = 765
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "拼音碼 類別"
ForeColor = &H00FF0000&
Height = 330
Left = 240
TabIndex = 13
Top = 1530
Width = 5340
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "收費金額 "
ForeColor = &H00FF0000&
Height = 330
Left = 240
TabIndex = 12
Top = 1935
Width = 870
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "核算科目"
ForeColor = &H00FF0000&
Height = 330
Left = 240
TabIndex = 11
Top = 2805
Width = 765
End
End
Begin VB.CommandButton CmdCancel
Caption = "(&C)取消"
Height = 375
Left = 3435
TabIndex = 0
Top = 4110
Width = 1830
End
Begin VB.CommandButton CmdSave
Caption = "(&M)修改"
Height = 375
Left = 1620
TabIndex = 1
Top = 4110
Width = 1830
End
Begin MSAdodcLib.Adodc Adodc1
Height = 345
Left = -960
Top = 2295
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 609
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
End
Attribute VB_Name = "Main_Zlxmgl_Update"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i As Integer
Dim sql As String
Private Sub Form_Activate()
Text1(1).SetFocus
End Sub
Private Sub Form_Load()
Combo1.AddItem ("自費")
Combo1.AddItem ("公費")
Combo1.ListIndex = 0
CbolbList Cbolb
For i = 0 To 2
'對應列
Main_Zlxmgl.MSHFlexGrid1.Col = i
Text1(i) = Main_Zlxmgl.MSHFlexGrid1.Text
Next i
Main_Zlxmgl.MSHFlexGrid1.Col = 3
Cbolb.Text = Main_Zlxmgl.MSHFlexGrid1.Text
Main_Zlxmgl.MSHFlexGrid1.Col = 4
Text1(3).Text = Main_Zlxmgl.MSHFlexGrid1.Text
Main_Zlxmgl.MSHFlexGrid1.Col = 5
DataCombo1.Text = Main_Zlxmgl.MSHFlexGrid1.Text
Main_Zlxmgl.MSHFlexGrid1.Col = 6
Text1(4).Text = Main_Zlxmgl.MSHFlexGrid1.Text
Main_Zlxmgl.MSHFlexGrid1.Col = 7
Combo1.Text = Main_Zlxmgl.MSHFlexGrid1.Text
End Sub
Private Sub Text1_GotFocus(Index As Integer)
GotFocusBC Text1(Index)
End Sub
Private Sub Text1_LostFocus(Index As Integer)
LostFocusBC Text1(Index)
End Sub
Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If Index < 3 And KeyCode = vbKeyReturn Then Text1(Index + 1).SetFocus
If Index = 3 And KeyCode = vbKeyReturn Then DataCombo1.SetFocus
If Index = 4 And KeyCode = vbKeyReturn Then Combo1.SetFocus
End Sub
Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text1(4).SetFocus
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then CmdSave.SetFocus
End Sub
Private Sub CmdSave_Click()
If Text1(0).Text = "" Then
MsgBox "系統不允許收費項目名稱為空!"
Exit Sub
End If
Dim rs As New ADODB.Recordset
rs.Open "select * from 診療項目信息表 where 收費項目編號='" + Text1(0).Text + "'", cnn, adOpenKeyset, adLockOptimistic
If rs.RecordCount > 0 Then
For i = 0 To 2
rs.Fields(i) = Text1(i).Text
Next i
rs.Fields("收費金額") = Val(Text1(3).Text)
rs.Fields("執行科室") = DataCombo1.Text
rs.Fields("核算科目") = Text1(4).Text
rs.Fields("自費類型") = Combo1.Text
rs.Update
End If
rs.Close
Main_Zlxmgl.Adodc1.Refresh
Unload Me
EnaT Main_Zlxmgl
End Sub
Private Sub CmdCancel_Click()
EnaT Main_Zlxmgl
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -