frmwarehouseinsert.frm
来自「很好! 很实用! 免费!」· FRM 代码 · 共 124 行
FRM
124 行
VERSION 5.00
Begin VB.Form frmWarehouseInsert
Caption = "添加仓库"
ClientHeight = 6945
ClientLeft = 60
ClientTop = 345
ClientWidth = 9930
LinkTopic = "Form1"
ScaleHeight = 6945
ScaleWidth = 9930
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdOK
Caption = "确定"
Height = 375
Left = 5880
TabIndex = 4
Top = 6240
Width = 1095
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消"
Height = 375
Left = 7080
TabIndex = 3
Top = 6240
Width = 1095
End
Begin VB.CommandButton cmdApply
Caption = "应用"
Height = 375
Left = 8310
TabIndex = 2
Top = 6240
Width = 1095
End
Begin VB.TextBox txtNo
Height = 375
Left = 2400
MaxLength = 10
TabIndex = 1
Top = 3000
Width = 1455
End
Begin VB.TextBox txtName
Height = 375
Left = 5760
MaxLength = 20
TabIndex = 0
Top = 3000
Width = 2295
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "仓库编号"
Height = 195
Left = 1560
TabIndex = 6
Top = 3000
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "仓库名称"
Height = 195
Left = 4920
TabIndex = 5
Top = 3000
Width = 720
End
End
Attribute VB_Name = "frmWarehouseInsert"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdApply_Click()
'新加仓库
Dim objWarehouse As New clsWarehouse
With objWarehouse
.m_ID = newGUID()
.m_Name = Me.txtName.Text
.m_No = Me.txtNo.Text
If Not .Insert() Then
MsgBox "插入失败,请检查数据合法性!", vbInformation, "新增仓库"
Else
frmWarehouse.RefreshData
End If
End With
End Sub
Private Sub cmdCancel_Click()
Unload Me
frmWarehouse.RefreshData
End Sub
Private Sub cmdOK_Click()
'新加仓库
Dim objWarehouse As New clsWarehouse
With objWarehouse
.m_ID = newGUID()
.m_Name = Me.txtName.Text
.m_No = Me.txtNo.Text
If Not .Insert() Then
MsgBox "插入失败,请检查数据合法性!", vbInformation, "新增仓库"
Else
Unload Me
frmWarehouse.RefreshData
End If
End With
End Sub
Private Sub Form_Load()
'center the form
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?