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

📄 frmcustomerpriceinsert.frm

📁 很好! 很实用! 免费!
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmCustomerPriceInsert 
   Caption         =   "新增客户价格"
   ClientHeight    =   6945
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9855
   LinkTopic       =   "Form1"
   ScaleHeight     =   6945
   ScaleWidth      =   9855
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Height          =   495
      Left            =   4950
      TabIndex        =   3
      Top             =   6300
      Width           =   1575
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   495
      Left            =   6690
      TabIndex        =   2
      Top             =   6300
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Caption         =   "客户价格"
      Height          =   6015
      Left            =   30
      TabIndex        =   0
      Top             =   90
      Width           =   9735
      Begin ClassSystem.InputNumber txtSchedule 
         Height          =   315
         Left            =   2040
         TabIndex        =   13
         Top             =   3150
         Width           =   2625
         _ExtentX        =   4630
         _ExtentY        =   556
         BorderStyle     =   1
      End
      Begin ClassSystem.InputNumber txtPrice2 
         Height          =   375
         Left            =   6330
         TabIndex        =   11
         Top             =   2640
         Width           =   2865
         _ExtentX        =   5054
         _ExtentY        =   661
         BorderStyle     =   1
      End
      Begin ClassSystem.InputNumber txtPrice1 
         Height          =   345
         Left            =   2040
         TabIndex        =   9
         Top             =   2670
         Width           =   2625
         _ExtentX        =   4630
         _ExtentY        =   609
         BorderStyle     =   1
      End
      Begin ClassSystem.GCombo cbCommodity 
         Height          =   315
         Left            =   6330
         TabIndex        =   7
         Top             =   2070
         Width           =   2895
         _ExtentX        =   5106
         _ExtentY        =   556
         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
         FontSize        =   8.25
         FontName        =   "MS Sans Serif"
         ListIndex       =   -1
         Text            =   ""
      End
      Begin ClassSystem.GCombo cbCustomer 
         Height          =   315
         Left            =   2010
         TabIndex        =   6
         Top             =   2100
         Width           =   2685
         _ExtentX        =   4736
         _ExtentY        =   556
         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
         FontSize        =   8.25
         FontName        =   "MS Sans Serif"
         ListIndex       =   -1
         Text            =   ""
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "采购提前期"
         Height          =   195
         Left            =   870
         TabIndex        =   12
         Top             =   3210
         Width           =   900
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "批量进价/售价"
         Height          =   195
         Left            =   4980
         TabIndex        =   10
         Top             =   2700
         Width           =   1155
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "批量进价/售价"
         Height          =   195
         Left            =   660
         TabIndex        =   8
         Top             =   2700
         Width           =   1155
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "商品名称"
         Height          =   195
         Left            =   5250
         TabIndex        =   5
         Top             =   2100
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "客户名称"
         Height          =   195
         Left            =   1110
         TabIndex        =   4
         Top             =   2100
         Width           =   720
      End
   End
   Begin VB.CommandButton cmdApply 
      Caption         =   "应用"
      Height          =   495
      Left            =   8250
      TabIndex        =   1
      Top             =   6300
      Width           =   1455
   End
End
Attribute VB_Name = "frmCustomerPriceInsert"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Function Saved() As Boolean
    Saved = True
    
    If cbCommodity.ListIndex = -1 Then Saved = False
End Function
Private Sub cmdApply_Click()
    If Not Saved Then Exit Sub
    Call SaveData
    cbCommodity.RemoveItem cbCommodity.ListIndex
End Sub
Private Sub SaveData()
    
Dim objPrice As New clsCustomerPrice
    With objPrice
        .m_ID = newGUID
        .m_CommodityID = cbCommodity.Item("ID", cbCommodity.ListIndex)
        .m_CustomerID = cbCustomer.Item("ID", cbCustomer.ListIndex)
        .m_Price1 = txtPrice1.Text
        .m_Price2 = txtPrice2.Text
        .m_Schedule = txtSchedule.Text
        If .Insert() Then
            Call frmCustomerPrice.RefreshData
        End If
    End With
End Sub
Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
   If Not Saved Then Exit Sub
   Call SaveData
   Unload Me
End Sub

Private Sub Form_Load()
Dim objCustomer As New clsCustomer
Dim objCommodity As New clsCommodity
    If frmCustomerPrice.sCustID = "" Then
        cbCustomer.RelativeList objCustomer.GetList("ID,Name", , "No"), "Name"
    Else
        cbCustomer.AddItem frmCustomerPrice.sCustName
        cbCustomer.Item("ID", cbCustomer.NewIndex) = frmCustomerPrice.sCustID
        cbCustomer.Enabled = False
    End If
    cbCustomer.ListIndex = 0
    
    Me.cbCommodity.RelativeList objCommodity.GetList("ID,Code,Item", , "Code"), "Code,Item"
    cbCommodity.ListIndex = 0
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -