⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add_position.frm

📁 即时通讯
💻 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 + -