?? frmwarehouseinsert.frm
字號:
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -