?? add_position.frm
字號:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Add_position
BorderStyle = 1 'Fixed Single
Caption = "商品庫位添加"
ClientHeight = 3780
ClientLeft = 45
ClientTop = 330
ClientWidth = 5580
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3780
ScaleWidth = 5580
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 3135
Left = 0
TabIndex = 3
Top = 0
Width = 5535
Begin VB.TextBox Text3
Enabled = 0 'False
Height = 300
Left = 3720
TabIndex = 26
Top = 1680
Width = 1695
End
Begin VB.TextBox Text2
Enabled = 0 'False
Height = 300
Left = 3720
TabIndex = 25
Text = "0"
Top = 1200
Width = 1695
End
Begin VB.TextBox Text1
Height = 300
Index = 0
Left = 960
TabIndex = 13
Top = 240
Visible = 0 'False
Width = 1695
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 300
Index = 1
Left = 960
TabIndex = 12
Top = 240
Width = 1695
End
Begin VB.TextBox Text1
Height = 300
Index = 2
Left = 960
TabIndex = 11
Top = 720
Width = 1695
End
Begin VB.TextBox T_quantity
Height = 300
Index = 3
Left = 960
TabIndex = 10
Top = 1200
Width = 1695
End
Begin VB.TextBox T_cost
Height = 300
Index = 4
Left = 960
TabIndex = 9
Top = 1680
Width = 1695
End
Begin VB.TextBox T_money
Height = 300
Index = 5
Left = 960
TabIndex = 8
Top = 2160
Width = 1695
End
Begin VB.TextBox T_upperlimmit
Height = 300
Index = 6
Left = 3720
TabIndex = 7
Top = 240
Width = 1695
End
Begin VB.TextBox T_lowerlimmit
Height = 300
Index = 7
Left = 3720
TabIndex = 6
Top = 720
Width = 1695
End
Begin VB.TextBox Text1
Height = 300
Index = 9
Left = 960
TabIndex = 5
Top = 2640
Width = 4455
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 300
Left = 3720
TabIndex = 4
Top = 2160
Width = 1695
_ExtentX = 2990
_ExtentY = 529
_Version = 393216
Format = 78184449
CurrentDate = 38602
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "倉庫編號"
Height = 180
Index = 0
Left = 120
TabIndex = 24
Top = 285
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "庫位名稱"
Height = 180
Index = 1
Left = 120
TabIndex = 23
Top = 765
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "庫存數量"
Height = 180
Index = 2
Left = 120
TabIndex = 22
Top = 1245
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "庫存成本"
Height = 180
Index = 3
Left = 120
TabIndex = 21
Top = 1740
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "庫存金額"
Height = 180
Index = 4
Left = 120
TabIndex = 20
Top = 2220
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "庫存上限"
Height = 180
Index = 5
Left = 2880
TabIndex = 19
Top = 285
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "庫存下限"
Height = 180
Index = 6
Left = 2880
TabIndex = 18
Top = 765
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "存物類別"
Height = 180
Index = 7
Left = 2880
TabIndex = 17
Top = 1260
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "存物名稱"
Height = 180
Index = 8
Left = 2880
TabIndex = 16
Top = 1755
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "存物有效"
Height = 180
Index = 9
Left = 2880
TabIndex = 15
Top = 2235
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "備注"
Height = 180
Index = 10
Left = 480
TabIndex = 14
Top = 2700
Width = 360
End
End
Begin VB.Frame Frame2
Height = 615
Left = 0
TabIndex = 0
Top = 3120
Width = 5535
Begin VB.CommandButton c_save
Caption = "保存(&S)"
Default = -1 'True
Height = 350
Left = 3240
TabIndex = 2
Top = 190
Width = 900
End
Begin VB.CommandButton c_cancel
Caption = "退出(&C)"
Height = 350
Left = 4320
TabIndex = 1
Top = 190
Width = 900
End
End
End
Attribute VB_Name = "Add_position"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************
'* 模 塊 名 稱 :庫存資料管理用戶操作界面
'* 功 能 描 述 :庫存資料管理用戶操作界面
'* 程序員姓名 : 黃朝和
'* 最后修改人 : 黃朝和
'* 最后修改時間:2005/09/09
'**************************************
Option Explicit
Private m_positionDAO As positionDAO ' 數據庫操作類
Private m_recordset As ADODB.Recordset ' 數據操作數據集對象
Public f As String
Private Sub c_cancel_Click()
Unload Me
End Sub
Private Sub c_save_Click()
Call Check
If f = "0" Then
Exit Sub
Else
Call Newposition
End If
Unload Me
End Sub
Private Sub Form_Load()
SetToCenter Me
Text2.Tag = "0"
Text2.text = "商品"
Text3.text = Trim(StockStorec.p_goodsname)
Text3.Tag = Trim(StockStorec.p_goodsid)
Set m_positionDAO = New positionDAO
Set m_recordset = New ADODB.Recordset
End Sub
'**************************************
'* 功 能 描 述 :新增庫位數據處理函數
'* 輸 入 參 數 :無
'* 輸 出 能 數 :無
'**************************************
Private Sub Newposition()
Dim ret As Boolean
Call Check
ret = m_positionDAO.Newposition(m_recordset, Trim(StockStorec.store.Tag), _
Trim(Text1(2).text), Trim(T_quantity(3).text), Trim(T_cost(4).text), _
Trim(T_money(5).text), Trim(T_upperlimmit(6).text), Trim(T_lowerlimmit(7).text), _
Trim(Text3.Tag), Trim(Text2.Tag), DTPicker1.value, _
Trim(Text1(9).text))
End Sub
'**************************************
'* 功 能 描 述 :檢驗數據的合法性
'* 輸 入 參 數 :無
'* 輸 出 能 數 :無
'**************************************
Private Sub Check()
f = "1"
If Trim(Text1(2).text) = "" Then
MainForm.g_msgText = "庫位名稱不能為空!"
HMsgBox MainForm.g_msgText, 0, 1
Text1(2).SetFocus
f = "0"
Exit Sub
End If
End Sub
Private Sub T_quantity_KeyPress(Index As Integer, KeyAscii As Integer)
InputFieldLimit T_quantity(3), 4, KeyAscii
End Sub
Private Sub T_lowerlimmit_KeyPress(Index As Integer, KeyAscii As Integer)
InputFieldLimit T_lowerlimmit(7), 6, KeyAscii
End Sub
Private Sub T_upperlimmit_KeyPress(Index As Integer, KeyAscii As Integer)
InputFieldLimit T_upperlimmit(6), 6, KeyAscii
End Sub
Private Sub T_money_KeyPress(Index As Integer, KeyAscii As Integer)
InputFieldLimit T_money(5), 6, KeyAscii
End Sub
Private Sub T_cost_KeyPress(Index As Integer, KeyAscii As Integer)
InputFieldLimit T_cost(4), 6, KeyAscii
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -