?? wh_dgl.frm
字號:
VERSION 5.00
Begin VB.Form wh_dgl
BorderStyle = 1 'Fixed Single
Caption = "齊英天肛腸外科"
ClientHeight = 3150
ClientLeft = 45
ClientTop = 330
ClientWidth = 4050
Icon = "wh_dgl.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3150
ScaleWidth = 4050
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "單項收費項目錄入"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2055
Left = 240
TabIndex = 2
Top = 240
Width = 3495
Begin VB.TextBox v_jiage
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 5
Text = "0"
Top = 960
Width = 1800
End
Begin VB.TextBox v_xiangmu
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 4
Top = 360
Width = 1800
End
Begin VB.ComboBox x_kb
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "wh_dgl.frx":0BC2
Left = 1200
List = "wh_dgl.frx":0BE1
TabIndex = 3
Top = 1560
Width = 1800
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 = 8
Top = 1560
Width = 735
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 = 240
TabIndex = 7
Top = 480
Width = 840
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 = 240
TabIndex = 6
Top = 1080
Width = 840
End
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 = 720
TabIndex = 1
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "刪 除"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2040
TabIndex = 0
Top = 2520
Width = 1095
End
End
Attribute VB_Name = "wh_dgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
b1 = MsgBox("您確實修改嗎?", vbOKCancel, "系統(tǒng)提示!")
If b1 = 1 Then
If Not IsNumeric(v_jiage.Text) Then
b1 = MsgBox("警告,單價不能為空或非數(shù)字!", vbQuestion, "系統(tǒng)提示!")
v_jiage.SetFocus
Exit Sub
End If
Dim rs1 As New ADODB.Recordset
Dim sql1 As String
sql1 = "update 單收費明細 set 項目='" + Trim(v_xiangmu.Text) + "',價格='" + Trim(v_jiage.Text) + "',科別='" + Trim(x_kb.Text) + "' where id=" + CStr(Trim(wh_danguanli.v_id2))
rs1.Open sql1, db
b1 = MsgBox("恭喜,數(shù)據(jù)修改成功!", vbInformation, "系統(tǒng)提示!")
Unload Me
End If
End Sub
Private Sub Command2_Click()
b1 = MsgBox("您確實刪除嗎?", vbOKCancel, "系統(tǒng)提示!")
If b1 = 1 Then
Dim rs As New ADODB.Recordset
Dim sql As String
sql = "delete 單收費明細 where id= " + CStr(Trim(wh_danguanli.v_id2))
rs.Open sql, db
b1 = MsgBox("恭喜,數(shù)據(jù)刪除成功!", vbInformation, "系統(tǒng)提示!")
Unload Me
End If
End Sub
Private Sub Form_Load()
Dim rs As New ADODB.Recordset
Dim sql As String
sql = "select * from 單收費明細 where id= " + CStr(Trim(wh_danguanli.v_id2))
rs.Open sql, db
If Not rs.EOF Then
v_xiangmu.Text = Trim(rs("項目"))
v_jiage.Text = Trim(rs("價格"))
x_kb.Text = Trim(rs("科別"))
End If
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -