?? wh_jmeditto.frm
字號:
VERSION 5.00
Begin VB.Form wh_jmeditto
BorderStyle = 1 'Fixed Single
Caption = "齊英天肛腸醫院綜合信息管理系統"
ClientHeight = 3135
ClientLeft = 45
ClientTop = 330
ClientWidth = 8025
Icon = "wh_jmeditto.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3135
ScaleWidth = 8025
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "刪 除"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3480
TabIndex = 13
Top = 2400
Width = 1095
End
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 = 2175
Left = 120
TabIndex = 7
Top = 120
Width = 7695
Begin VB.ComboBox v_type
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "wh_jmeditto.frx":0BC2
Left = 1200
List = "wh_jmeditto.frx":0BCF
TabIndex = 15
Top = 1680
Width = 1455
End
Begin VB.TextBox v_bm
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 = 0
Top = 360
Width = 1455
End
Begin VB.TextBox v_name
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4200
TabIndex = 1
Top = 360
Width = 3255
End
Begin VB.TextBox v_guige
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 = 2
Top = 960
Width = 1455
End
Begin VB.TextBox v_danwei
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4200
TabIndex = 3
Top = 960
Width = 1095
End
Begin VB.TextBox v_danjia
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6360
TabIndex = 4
Text = "0"
Top = 960
Width = 1095
End
Begin VB.Label Label6
Caption = "藥品類別"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 14
Top = 1680
Width = 735
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 = 12
Top = 480
Width = 840
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 = 3120
TabIndex = 11
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 = 10
Top = 1080
Width = 735
End
Begin VB.Label Label4
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 = 3120
TabIndex = 9
Top = 1080
Width = 840
End
Begin VB.Label Label5
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 = 5520
TabIndex = 8
Top = 1080
Width = 735
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 = 2040
TabIndex = 6
Top = 2400
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 = 4920
TabIndex = 5
Top = 2400
Width = 1095
End
End
Attribute VB_Name = "wh_jmeditto"
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_danjia.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_bm.Text) + "',藥品名稱='" + Trim(v_name.Text) + "',規格='" + Trim(v_guige.Text) + "',單位='" + Trim(v_danwei.Text) + "',單價='" + Trim(v_danjia.Text) + "',類別='" + Trim(v_type.Text) + "' where id=" + CStr(Trim(wh_jmedit.b_id))
rs1.Open sql1, db
b1 = MsgBox("恭喜,數據修改成功!", vbInformation, "系統提示!")
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_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_jmedit.b_id))
rs1.Open sql1, 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_jmedit.b_id))
rs.Open sql, db
If Not rs.EOF Then
v_bm = rs("編碼")
v_name = rs("藥品名稱")
v_guige = rs("規格")
v_danwei = rs("單位")
v_danjia = rs("單價")
v_type = rs("類別")
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -