cgshd.cls

来自「制造业产供销与往来系统源码」· CLS 代码 · 共 555 行 · 第 1/2 页

CLS
555
字号
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "CgShd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Dim m_CgShdh As CgShdh
Dim m_Hwbm As Hwbm
Dim m_HwCk As HwCk
Dim m_HwDw As HwDw
Dim m_CwSm As CwSm

Dim m_CgShd_CgShdhno As Double

Dim m_CgShd_CgPodDocno As String
Dim m_CgShd_CgPodno As Double

Dim m_CgShd_HwBmCode As String
Dim m_CgShd_HwBmMc As String
Dim m_CgShd_HwBmno As Double

Dim m_CgShd_HwCkMc As String
Dim m_CgShd_HwCkno As Double

Dim m_CgShd_HwDwCode As String
Dim m_CgShd_HwDwNo As Double
Dim m_CgShd_HwDwConv As Double

Dim m_CgShdQty As Double
Dim m_CgShdPrice As Double
Dim m_CgShdAmt As Double

Dim m_CgShdQAmt As Double
Dim m_CgShdTAmt As Double

Dim m_CgShd_CwBzConv As Double

Dim m_CgShd_CwSmCode As String
Dim m_CgShd_CwSmNo As Double
Dim m_CgShd_CwSmConv As Double

Dim m_CgShdIPrice As Double
Dim m_CgShdIAmt As Double

Dim m_CgShd_CgApNo As Double
Dim m_CgShdMioNo As Double

Dim m_CgShdBz As String

Dim m_CgShdNo As Double

Dim m_CgShdId As Integer
Dim m_CgShdKey As Double

Private Sub Class_Initialize()
   m_CgShdId = -1
End Sub

Public Property Get Name() As String
   Name = "CgShd"
End Property

Public Property Get CgShdId() As Integer
   CgShdId = m_CgShdId
End Property

Public Property Let CgShdId(vCgShdId As Integer)
   m_CgShdId = vCgShdId
End Property

Public Property Get CgShdKey() As Double
   CgShdKey = m_CgShdKey
End Property

Public Property Let CgShdKey(vCgShdKey As Double)
   m_CgShdKey = vCgShdKey
End Property

Public Property Get CgShdh() As CgShdh
   If m_CgShdh Is Nothing Then
      Set m_CgShdh = New CgShdh
      m_CgShdh.Requery "", m_CgShd_CgShdhno
   End If
   Set CgShdh = m_CgShdh
End Property

Public Property Set CgShdh(vCgShdh As CgShdh)
   Set m_CgShdh = vCgShdh
End Property

Public Property Get Hwbm() As Hwbm
   If m_Hwbm Is Nothing Then
      Set m_Hwbm = New Hwbm
      If m_CgShd_HwBmCode <> "" Then
         m_Hwbm.Requery m_CgShd_HwBmCode
      End If
   End If
   Set Hwbm = m_Hwbm
End Property

Public Property Get HwCk() As HwCk
   If m_HwCk Is Nothing Then
      Set m_HwCk = New HwCk
      If m_CgShd_HwCkMc <> "" Then
         m_HwCk.Requery m_CgShd_HwCkMc
      End If
   End If
   Set HwCk = m_HwCk
End Property

Public Property Get HwDw() As HwDw
   If m_HwDw Is Nothing Then
      Set m_HwDw = New HwDw
      If m_CgShd_HwDwCode <> "" Then
         m_HwDw.Requery m_CgShd_HwDwCode
      End If
   End If
   Set HwDw = m_HwDw
End Property

Public Property Get CwSm() As CwSm
   If m_CwSm Is Nothing Then
      Set m_CwSm = New CwSm
      If m_CgShd_CwSmCode <> "" Then
         m_CwSm.Requery m_CgShd_CwSmCode
      End If
   End If
   Set CwSm = m_CwSm
End Property

Public Property Get CgShd_CgShdhno() As Double
   CgShd_CgShdhno = m_CgShd_CgShdhno
End Property

Public Property Get CgShd_CgPodDocno() As String
   CgShd_CgPodDocno = m_CgShd_CgPodDocno
End Property

Public Property Get CgShd_CgPodno() As Double
   CgShd_CgPodno = m_CgShd_CgPodno
End Property

Public Property Get CgShd_HwBmCode() As String
   CgShd_HwBmCode = m_CgShd_HwBmCode
End Property

Public Property Get CgShd_HwBmMc() As String
   CgShd_HwBmMc = m_CgShd_HwBmMc
End Property

Public Property Get CgShd_HwBmno() As Double
   CgShd_HwBmno = m_CgShd_HwBmno
End Property

Public Property Get CgShd_HwCkMc() As String
   CgShd_HwCkMc = m_CgShd_HwCkMc
End Property

Public Property Get CgShd_HwCkno() As Double
   CgShd_HwCkno = m_CgShd_HwCkno
End Property

Public Property Get CgShd_HwDwCode() As String
   CgShd_HwDwCode = m_CgShd_HwDwCode
End Property

Public Property Get CgShd_HwDwno() As Double
   CgShd_HwDwno = m_CgShd_HwDwNo
End Property

Public Property Get CgShd_HwDwConv() As Double
   CgShd_HwDwConv = m_CgShd_HwDwConv
End Property

Public Property Get CgShdQty() As Double
   CgShdQty = m_CgShdQty
End Property

Public Property Get CgShdPrice() As Double
   CgShdPrice = m_CgShdPrice
End Property

Public Property Get CgShdAmt() As Double
   CgShdAmt = m_CgShdAmt
End Property

Public Property Get CgShdQAmt() As Double
   CgShdQAmt = m_CgShdQAmt
End Property

Public Property Get CgShdTAmt() As Double
   CgShdTAmt = m_CgShdTAmt
End Property

Public Property Get CgShd_CwSmCode() As String
   CgShd_CwSmCode = m_CgShd_CwSmCode
End Property

Public Property Get CgShd_CwSmno() As Double
   CgShd_CwSmno = m_CgShd_CwSmNo
End Property

Public Property Get CgShd_CwsmConv() As Double
   CgShd_CwsmConv = m_CgShd_CwSmConv
End Property

Public Property Get CgShdIPrice() As Double
   CgShdIPrice = m_CgShdIPrice
End Property

Public Property Get CgShdIAmt() As Double
   CgShdIAmt = m_CgShdIAmt
End Property

Public Property Get CgShdBz() As String
   CgShdBz = m_CgShdBz
End Property

Public Property Get CgShd_CgApNo() As Double
   CgShd_CgApNo = m_CgShd_CgApNo
End Property

Public Property Get CgShdMioNo() As Double
   CgShdMioNo = m_CgShdMioNo
End Property

Public Property Get CgShdNo() As Double
   CgShdNo = m_CgShdNo
End Property

Public Property Let CgShd_CgPodno(vCgShd_CgPodno As Double)
   If vCgShd_CgPodno = 0 Then
      m_CgShd_CgPodDocno = ""
      Exit Property
   End If

   Dim mPod As CgPod
   Set mPod = New CgPod
   If mPod.Requery(vCgShd_CgPodno) = -1 Then
      Set mPod = Nothing
      Err.Raise vbObjectError + 1, , "对应的采购单行不存在!"
      Exit Property
   End If
   m_CgShd_CgPodDocno = mPod.CgPodh.CgPodhDocno
   m_CgShd_HwBmno = mPod.CgPod_HwBmno
   m_CgShd_HwBmCode = mPod.CgPod_HwBmCode
   m_CgShd_HwBmMc = mPod.CgPod_HwBmMc
   Set mPod = Nothing
   m_CgShd_CgPodno = vCgShd_CgPodno
   
End Property

Public Property Let CgShd_HwBmCode(vCgShd_HwBmCode As String)
   If Trim(vCgShd_HwBmCode) = "" Then
      Err.Raise vbObjectError + 1, , "货物编码不能为空!"
      Exit Property
   End If
   If m_CgShd_HwBmCode <> vCgShd_HwBmCode Then
      If Hwbm.Requery(vCgShd_HwBmCode) = -1 Then
         Err.Raise vbObjectError + 1, , "录入的货物编码不存在!"
         Exit Property
      End If
      m_CgShd_HwBmno = Hwbm.HwBmNo
      m_CgShd_HwBmMc = Hwbm.HwBmMc
      m_CgShd_HwDwCode = Hwbm.HwBm_HwDwCode
      m_CgShd_HwDwNo = Hwbm.HwBm_HwDwNo
      m_CgShd_HwDwConv = 1
   End If
   m_CgShd_HwBmCode = vCgShd_HwBmCode

⌨️ 快捷键说明

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