jczlclientcommon.cls

来自「制造业产供销与往来系统源码,包括进销存及全部控件!」· CLS 代码 · 共 95 行

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

Public Sub gPublic(vPublicCommon As PublicCommon, vPublicShowCommon As SmsPublicShowCommon)

   Set gDbCommon = vPublicCommon.DbCommon
   Set gPublicFunction = vPublicCommon.PublicFunction
   Set gPublicCommon = vPublicCommon
   Set gPublicShowCommon = vPublicShowCommon
   
   If gJcZlCommon Is Nothing Then
      Set gJcZlCommon = New JcZlCommon
   End If
   
   gJcZlCommon.gPublic gPublicCommon

End Sub

Private Sub Class_Terminate()

Set gDbCommon = Nothing
Set gPublicFunction = Nothing
Set gPublicCommon = Nothing
Set gPublicShowCommon = Nothing

End Sub

Public Function ShowForm(mFormName As String, vCode As String, Optional vModalFlg As Integer = 1) As Object
   Dim mForm As Form
On Error GoTo Errorhandle

   For Each mForm In Forms
      If UCase(mForm.Name) = UCase(mFormName) Then
         Exit For
      End If
   Next
   
   If mForm Is Nothing Then
      Select Case UCase(mFormName)
         Case "FRMCWQJ"
               Set mForm = New frmCwQJ
         Case "FRMCWSM"
               Set mForm = New frmCwSm
         Case "FRMCWBZ"
               Set mForm = New frmCwbz
         Case "FRMCWZH"
               Set mForm = New frmCwZh
         Case "FRMHWBFRC"
               Set mForm = New frmHwBfRc
         Case "FRMHWBM"
               Set mForm = New frmHwBm
         Case "FRMHWCK"
               Set mForm = New frmHwCk
         Case "FRMHWDBRC"
               Set mForm = New frmHwDbRc
         Case "FRMHWDW"
               Set mForm = New frmHwdw
         Case "FRMHWFL"
               Set mForm = New frmHwFl
         Case "FRMHWIORC"
               Set mForm = New frmHwIoRc
         Case "FRMHWPDRC"
               Set mForm = New frmHwPdRc
         Case "FRMPSBM"
               Set mForm = New frmPsbm
         End Select
   End If
   
   If Not mForm Is Nothing Then
      If vCode <> "" Then
         mForm.code vCode
      End If
      mForm.Show vModalFlg
   End If

Exit Function
Errorhandle:
   Set mForm = Nothing
   MsgBox Err.Description
End Function


⌨️ 快捷键说明

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