?? form4.frm
字號:
VERSION 5.00
Begin VB.Form Form4
BackColor = &H80000010&
BorderStyle = 1 'Fixed Single
Caption = "擬定\修改銷售價格"
ClientHeight = 3045
ClientLeft = 45
ClientTop = 450
ClientWidth = 5760
LinkTopic = "Form4"
MaxButton = 0 'False
ScaleHeight = 3045
ScaleWidth = 5760
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
BackColor = &H80000010&
Caption = "藥品信息"
Height = 1335
Left = 240
TabIndex = 7
Top = 120
Width = 5415
Begin VB.Label Label11
BackStyle = 0 'Transparent
Caption = "Label11"
ForeColor = &H0000FFFF&
Height = 255
Left = 3600
TabIndex = 15
Top = 840
Width = 855
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "Label10"
ForeColor = &H0000FFFF&
Height = 255
Left = 960
TabIndex = 14
Top = 840
Width = 1095
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "保質期"
ForeColor = &H0000FFFF&
Height = 255
Left = 2640
TabIndex = 13
Top = 840
Width = 735
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "出廠日期"
ForeColor = &H0000FFFF&
Height = 255
Left = 120
TabIndex = 12
Top = 840
Width = 855
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "Label7"
ForeColor = &H0000FFFF&
Height = 255
Left = 3600
TabIndex = 11
Top = 360
Width = 1455
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "生產廠家"
ForeColor = &H0000FFFF&
Height = 255
Left = 2640
TabIndex = 10
Top = 360
Width = 855
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "藥品名稱"
ForeColor = &H0000FFFF&
Height = 255
Left = 120
TabIndex = 9
Top = 360
Width = 735
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 375
Left = 960
TabIndex = 8
Top = 360
Width = 1455
End
End
Begin VB.CommandButton Command2
BackColor = &H0080C0FF&
Caption = "確定"
Height = 375
Left = 3120
Style = 1 'Graphical
TabIndex = 5
Top = 2520
Width = 855
End
Begin VB.CommandButton Command1
BackColor = &H0080C0FF&
Caption = "取消"
Height = 375
Left = 3960
Style = 1 'Graphical
TabIndex = 4
Top = 2520
Width = 855
End
Begin VB.TextBox Text1
Height = 270
Left = 2400
TabIndex = 3
Top = 2040
Width = 1455
End
Begin VB.ComboBox Combo1
Height = 300
Left = 2400
TabIndex = 1
Top = 1560
Width = 1455
End
Begin VB.Image Image2
Height = 240
Left = 600
Picture = "Form4.frx":0000
Stretch = -1 'True
Top = 2040
Width = 240
End
Begin VB.Image Image1
Height = 225
Left = 600
Picture = "Form4.frx":030A
Stretch = -1 'True
Top = 1560
Width = 240
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "Label5"
ForeColor = &H00FF0000&
Height = 615
Left = 4080
TabIndex = 6
Top = 1560
Width = 1455
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "設 定 定 價"
ForeColor = &H00C000C0&
Height = 255
Left = 960
TabIndex = 2
Top = 2040
Width = 1095
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "設定銷售單位"
ForeColor = &H00C000C0&
Height = 375
Left = 960
TabIndex = 0
Top = 1560
Width = 1215
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim xpk%
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
If Combo1.Text = "" Then
MsgBox "請輸入或選擇銷售單位!", vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If Text1.Text = "" Then
MsgBox "請為該藥品設置銷售價格!", vbOKOnly + vbInformation, "提示"
Exit Sub
End If
If Not IsNumeric(Text1) Then
MsgBox "非法輸入請重新輸入!", vbOKOnly + vbInformation, "提示"
Text1 = ""
Text1.SetFocus
Exit Sub
End If
Call adoopen
sql = "select * from xiaosdingjia"
Call rs(sql)
If adors.EOF Then
xpk = 1
Call adoclose
Else
Call adoclose
Call adoopen
sql = "select max(xpk) as xpk from xiaosdingjia"
Call rs(sql)
xpk = Val(adors.Fields("xpk")) + 1
Call adoclose
End If
Call adoopen
sql = "select * from xiaosdingjia where pk='" & change(7) & "'"
Call rs(sql)
If Not adors.EOF Then
adors.Fields("ddanwei") = Combo1.Text
adors.Fields("dingjia") = Text1
adors.Update
Call adoclose
MsgBox "修改成功!", vbOKOnly + vbInformation, "提示"
Else
Call adoclose
Call adoopen
sql = "insert into xiaosdingjia values('" & change(7) & "','" & Combo1.Text & "','" & Text1 & "','" & Val(xpk) & "')"
Call rs(sql)
Call adoclose
MsgBox "設置成功!", vbOKOnly + vbInformation, "提示"
End If
Form1.Combo3.Clear
sql = "select yname from yaopinjbxx,xiaosdingjia,namezidian where yaopinjbxx.pk=xiaosdingjia.pk and yaopinjbxx.yno=namezidian.yno"
Call comadd(sql, "yname", Form1.Combo3)
Unload Me
End Sub
Private Sub Form_Load()
Move MDIForm1.Left + (MDIForm1.Width - Me.Width) / 2, MDIForm1.Top + 3000
Label2.Caption = change(0)
Label7.Caption = change(2)
Label10.Caption = change(3)
Label11.Caption = change(4)
sql = "select dname from danweizidian"
Call comadd(sql, "dname", Combo1)
Call adoopen
sql = "select * from xiaosdingjia where pk='" & change(7) & "'"
Call rs(sql)
If Not adors.EOF Then
Label5.Caption = "已設置定價,可以在此處修改"
Else
Label5.Caption = "該藥品還未設置定價!"
End If
Call adoclose
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -