?? wh_duoguanlito.frm
字號:
VERSION 5.00
Begin VB.Form wh_duoguanlito
BorderStyle = 1 'Fixed Single
Caption = "鐵東區婦幼保健院信息管理系統"
ClientHeight = 3060
ClientLeft = 45
ClientTop = 330
ClientWidth = 3690
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3060
ScaleWidth = 3690
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "刪除"
Height = 375
Left = 1800
TabIndex = 8
Top = 2520
Width = 975
End
Begin VB.CommandButton Command1
Caption = "修改"
Height = 375
Left = 480
TabIndex = 7
Top = 2520
Width = 975
End
Begin VB.Frame Frame1
Caption = "收費項目添加(大項)管理"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2295
Left = 120
TabIndex = 0
Top = 120
Width = 3375
Begin VB.TextBox v_xiangmu
Height = 375
Left = 1200
TabIndex = 3
Top = 960
Width = 1800
End
Begin VB.TextBox v_jiage
Height = 375
Left = 1200
TabIndex = 2
Text = "0"
Top = 1560
Width = 1800
End
Begin VB.ComboBox v_type
Height = 300
ItemData = "wh_duoguanlito.frx":0000
Left = 1200
List = "wh_duoguanlito.frx":000D
TabIndex = 1
Text = "婦保"
Top = 360
Width = 1800
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "價 格"
Height = 180
Left = 240
TabIndex = 6
Top = 1680
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "項目名稱"
Height = 180
Left = 240
TabIndex = 5
Top = 1080
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "類 型"
Height = 180
Left = 240
TabIndex = 4
Top = 480
Width = 720
End
End
End
Attribute VB_Name = "wh_duoguanlito"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
b1 = MsgBox("您確實修改嗎?", vbOKCancel, "系統提示!")
If b1 = 1 Then
If Not IsNumeric(v_jiage.Text) Then
b1 = MsgBox("警告,單價不能為空或非數字!", vbQuestion, "系統提示!")
v_danjia.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(v_type.Text) + "' where id=" + CStr(Trim(wh_duoguanli.v_id))
rs1.Open sql1, db
b1 = MsgBox("恭喜,數據修改成功!", vbInformation, "系統提示!")
Unload Me
End If
End Sub
Private Sub Command2_Click()
b1 = MsgBox("您確實刪除嗎?", vbOKCancel, "系統提示!")
If b1 = 1 Then
Dim rs1 As New ADODB.Recordset
Dim sql1 As String
sql1 = "delete 收費明細 where id=" + CStr(Trim(wh_duoguanli.v_id))
rs1.Open sql1, db
Dim rs As New ADODB.Recordset
Dim sql As String
sql = "delete 配比表 where 大項='" + CStr(Trim(wh_duoguanli.v_xm)) + "'"
rs.Open sql, db
b1 = MsgBox("恭喜,數據刪除成功!", vbInformation, "系統提示!")
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_duoguanli.v_id))
rs.Open sql, db
If Not rs.EOF Then
v_type.Text = Trim(rs("類型"))
v_xiangmu.Text = Trim(rs("項目"))
v_jiage.Text = rs("價格")
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -