📄 frmstoreedit.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form FrmStoreEdit
Caption = "编辑办公用品库存信息"
ClientHeight = 4365
ClientLeft = 60
ClientTop = 345
ClientWidth = 5145
LinkTopic = "Form1"
ScaleHeight = 4365
ScaleWidth = 5145
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox txtMin
Height = 330
Left = 1680
TabIndex = 11
Text = "0"
Top = 2377
Width = 1455
End
Begin VB.CommandButton Cmd_Cancel
Caption = "取 消"
Height = 495
Left = 3240
TabIndex = 10
Top = 3600
Width = 1215
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 495
Left = 1080
TabIndex = 9
Top = 3600
Width = 1215
End
Begin VB.TextBox txtMemo
Height = 330
Left = 1680
TabIndex = 7
Top = 2932
Width = 3015
End
Begin VB.TextBox txtAmount
Height = 330
Left = 1680
TabIndex = 5
Text = "0"
Top = 1824
Width = 1455
End
Begin VB.TextBox txtStyle
Height = 330
Left = 1680
TabIndex = 3
Top = 1271
Width = 3015
End
Begin VB.TextBox txtName
Height = 330
Left = 1680
TabIndex = 1
Top = 718
Width = 3015
End
Begin MSDataListLib.DataCombo dco_Type
Height = 315
Left = 3240
TabIndex = 13
Top = 180
Width = 1455
_ExtentX = 2566
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin MSAdodcLib.Adodc Ado_Type
Height = 375
Left = 0
Top = 3360
Visible = 0 'False
Width = 1935
_ExtentX = 3413
_ExtentY = 661
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 = "Ado_Type"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataListLib.DataCombo dco_UType
Height = 315
Left = 1680
TabIndex = 14
Top = 180
Width = 1455
_ExtentX = 2566
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin MSAdodcLib.Adodc Ado_UType
Height = 375
Left = 3120
Top = 3360
Visible = 0 'False
Width = 1935
_ExtentX = 3413
_ExtentY = 661
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 = "Ado_UType"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "库存下限数量"
Height = 195
Left = 360
TabIndex = 12
Top = 2448
Width = 1080
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "备 注"
Height = 195
Left = 360
TabIndex = 8
Top = 3000
Width = 630
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "当前库存数量"
Height = 195
Left = 360
TabIndex = 6
Top = 1896
Width = 1080
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "办公用品型号"
Height = 195
Left = 360
TabIndex = 4
Top = 1344
Width = 1080
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "办公用品名称"
Height = 195
Left = 360
TabIndex = 2
Top = 792
Width = 1080
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "办公用品分类"
Height = 195
Left = 360
TabIndex = 0
Top = 240
Width = 1080
End
End
Attribute VB_Name = "FrmStoreEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriOId As Long
Public Modify As Boolean
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
If Len(Trim(dco_UType.Text)) = 0 Then
MsgBox "请选择一级分类名称"
dco_UType.SetFocus
Exit Sub
End If
If Len(Trim(dco_Type.Text)) = 0 Then
MsgBox "请选择二级分类名称"
dco_Type.SetFocus
Exit Sub
End If
If Len(Trim(txtName)) = 0 Then
MsgBox "请输入办公用品名称"
txtName.SetFocus
Exit Sub
End If
If Len(Trim(txtStyle)) = 0 Then
MsgBox "请输入办公用品型号"
txtStyle.SetFocus
Exit Sub
End If
With MyStore
.OName = Trim(txtName)
.TypeId = dco_Type.BoundText()
.OStyle = Trim(txtStyle)
.OAmount = Val(txtAmount)
.OMin = Val(txtMin)
.Memos = Trim(txtMemo)
If Modify = False Then
.Insert
MsgBox "添加成功"
Else
.Update (OriOId)
MsgBox "保存成功"
End If
End With
Unload Me
End Sub
Private Sub dco_UType_Click(Area As Integer)
Refresh_Type
End Sub
Private Sub Form_Load()
'装入分类信息
Ado_UType.ConnectionString = Conn
Ado_UType.RecordSource = "Select * From Types Where UpperId=0 Order By TypeId"
Ado_UType.Refresh
Set dco_UType.RowSource = Ado_UType
dco_UType.ListField = "TypeName"
dco_UType.BoundColumn = "TypeId"
Ado_Type.ConnectionString = Conn
Ado_Type.RecordSource = "Select * From Types Where UpperId>0 Order By TypeId"
Ado_Type.Refresh
Set dco_Type.RowSource = Ado_Type
dco_Type.ListField = "TypeName"
dco_Type.BoundColumn = "TypeId"
End Sub
Private Sub Refresh_Type()
If Len(Trim(dco_UType.Text)) > 0 Then
Ado_Type.ConnectionString = Conn
Ado_Type.RecordSource = "Select * From Types Where UpperId=" + Trim(dco_UType.BoundText()) + " Order By TypeId"
Ado_Type.Refresh
Set dco_Type.RowSource = Ado_Type
dco_Type.ListField = "TypeName"
dco_Type.BoundColumn = "TypeId"
dco_Type.Text = ""
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -