📄 frmsell.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form FrmSell
BorderStyle = 3 'Fixed Dialog
Caption = "图书销售"
ClientHeight = 6105
ClientLeft = 45
ClientTop = 330
ClientWidth = 7575
Icon = "FrmSell.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6105
ScaleWidth = 7575
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 6120
Top = 4800
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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
Begin VB.TextBox TxtMemo
Height = 1455
Left = 1320
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 3
Top = 4440
Width = 4455
End
Begin VB.TextBox TxtSJJinE
Height = 375
Left = 1320
TabIndex = 2
Top = 3960
Width = 4455
End
Begin VB.TextBox TxtJinE
Height = 375
Left = 1320
Locked = -1 'True
TabIndex = 21
Top = 3480
Width = 4455
End
Begin VB.TextBox TxtZheKou
Height = 375
Left = 1320
TabIndex = 1
Top = 3000
Width = 4455
End
Begin VB.TextBox TxtYouHui
Height = 375
Left = 1320
Locked = -1 'True
TabIndex = 20
Top = 2520
Width = 4455
End
Begin VB.TextBox TxtHYDengJi
Height = 375
Left = 1320
Locked = -1 'True
TabIndex = 19
Top = 2040
Width = 4455
End
Begin VB.TextBox TxtHYXingMing
Height = 375
Left = 1320
Locked = -1 'True
TabIndex = 18
Top = 1560
Width = 4455
End
Begin VB.TextBox TxtShuLiang
Height = 375
Left = 1320
TabIndex = 0
Top = 1080
Width = 4455
End
Begin VB.TextBox TxtDingJia
Height = 375
Left = 1320
Locked = -1 'True
TabIndex = 17
Top = 600
Width = 4455
End
Begin VB.CommandButton CmdCancel
Cancel = -1 'True
Caption = "取消(&C)"
Height = 375
Left = 6120
TabIndex = 5
Top = 960
Width = 1215
End
Begin VB.CommandButton CmdOK
Caption = "入帐(&D)"
Height = 375
Left = 6120
TabIndex = 4
Top = 240
Width = 1215
End
Begin VB.TextBox TxtShuMing
Height = 375
Left = 1320
Locked = -1 'True
TabIndex = 16
Top = 120
Width = 4455
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "数量*:"
Height = 180
Left = 570
TabIndex = 15
Top = 1200
Width = 630
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "定价:"
Height = 180
Left = 660
TabIndex = 14
Top = 720
Width = 540
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "原因或其他:"
Height = 180
Left = 120
TabIndex = 13
Top = 4560
Width = 1080
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "实收金额*:"
Height = 180
Left = 210
TabIndex = 12
Top = 4080
Width = 990
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "应收金额:"
Height = 180
Left = 300
TabIndex = 11
Top = 3600
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "实际优惠*:"
Height = 180
Left = 210
TabIndex = 10
Top = 3120
Width = 990
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "会员优惠:"
Height = 180
Left = 300
TabIndex = 9
Top = 2640
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "会员等级:"
Height = 180
Left = 300
TabIndex = 8
Top = 2160
Width = 900
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "会员姓名:"
Height = 180
Left = 300
TabIndex = 7
Top = 1680
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "书名:"
Height = 180
Left = 660
TabIndex = 6
Top = 240
Width = 540
End
End
Attribute VB_Name = "FrmSell"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Function GetHYDaZhe(bianHao As String) As String
On Error GoTo errEnd
If bianHao = "☆☆☆☆☆" Then
GetHYDaZhe = "1"
Exit Function
End If
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select [打折] from [会员政策] where [会员级别]=""" & bianHao & """"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
GetHYDaZhe = Adodc1.Recordset!打折
Else
MsgBox "会员政策数据丢失,请与经理联系!", vbOKOnly + vbExclamation, "检索错误"
GetHYDaZhe = "1"
End If
Exit Function
errEnd:
MsgBox "检索数据库出错!", vbOKOnly + vbExclamation, "检索错误"
GetDingJia = "未知"
End Function
Public Function GetKuCun(bianHao As String) As String
On Error GoTo errEnd
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select [库存量] from [Book] where [图书编号]=""" & bianHao & """"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
GetKuCun = Adodc1.Recordset!库存量
Else
MsgBox "图书资料数据丢失,请与经理联系!", vbOKOnly + vbExclamation, "检索错误"
GetKuCun = "0"
End If
Exit Function
errEnd:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -