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

📄 frmusu_helpjsfs.frm

📁 一个用VB写的财务软件源码
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmUSU_HelpJsfs 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "输入参照 - 结算方式"
   ClientHeight    =   6810
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5685
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6810
   ScaleWidth      =   5685
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      Height          =   345
      Left            =   3278
      TabIndex        =   2
      Top             =   6360
      Width           =   1065
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定(&O)"
      Default         =   -1  'True
      Height          =   345
      Left            =   1358
      TabIndex        =   1
      Top             =   6360
      Width           =   1065
   End
   Begin MSComctlLib.TreeView tVw 
      Height          =   6225
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   5685
      _ExtentX        =   10028
      _ExtentY        =   10980
      _Version        =   393217
      HideSelection   =   0   'False
      LabelEdit       =   1
      Style           =   7
      ImageList       =   "ilsTvw"
      Appearance      =   1
   End
   Begin MSComctlLib.ImageList ilsTvw 
      Left            =   360
      Top             =   6120
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_HelpJsfs.frx":0000
            Key             =   "Collapse"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_HelpJsfs.frx":0454
            Key             =   "Expand"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_HelpJsfs.frx":08A8
            Key             =   "Root"
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frmUSU_HelpJsfs"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Const sTABLECG = "tZW_Jsfs"
Const sFIELD_CODECG = "cCode"
Const sFIELD_NAMECG = "cName"
Const sFIELD_DEGREECG = "iGrade"
Const sFIELD_ENDCG = "bEnd"

Const sTitle = "结算方式"
Const sITEM = "结算"

Dim CUsual As clsContentsSet


Public OK As Boolean

Private m_sCode As String
Private m_sName As String

Public Property Get usCode() As String
    usCode = m_sCode
End Property

Public Property Get usName() As String
    usName = m_sName
End Property





Private Sub form_load()
    Dim rSt As ADODB.Recordset
    Dim aryLen() As Integer
    Dim i As Long
    
    Set rSt = New ADODB.Recordset
    With rSt
        .CursorLocation = adUseClient
        .Open "SELECT * FROM tUSU_dmjs WHERE Type='" & _
                sITEM & "' ORDER BY JC", _
            glo.cnnMain, adOpenStatic, adLockReadOnly
        ReDim aryLen(.RecordCount)
        i = 0
        Do Until .EOF
            aryLen(i) = .Fields("WS").Value
            .MoveNext
            i = i + 1
        Loop
        .Close
    End With
            
    Set CUsual = New clsContentsSet
    With CUsual
        .TypeOfContents = ctLevel
        .DBConnection = glo.cnnMain
        .TableCG = sTABLECG & glo.sOperateYear
        .FieldCodeCG = sFIELD_CODECG
        .FieldNameCG = sFIELD_NAMECG
        .FieldLevelCG = sFIELD_DEGREECG
        .FieldEndCG = sFIELD_ENDCG
        .OtherFieldCount = 0
        .TreeView = tVw
        .RootKey = "R"
        .RootText = sTitle
        .NodeKeyPrefixCG = "K"
        .ImageRootUnSelected = "Root"
        .ImageNodeUnSelectedCG = "Collapse"
        .ImageNodeSelectedCG = "Expand"
        .LevelsCG = UBound(aryLen)
        .LevelLenCG = aryLen()
        .LoadTvwCategory
    End With
    
    Call tVw_NodeClick(tVw.Nodes(CUsual.RootKey))

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    If UnloadMode = vbFormControlMenu Then
        Cancel = 1
        Call cmdCancel_Click
    End If
End Sub

Private Sub cmdOK_Click()
    With tVw.SelectedItem
        m_sCode = Mid$(.Key, 2)
        m_sName = Mid$(.text, InStr(1, .text, "=") + 1)
    End With
    OK = True
    Me.Hide
End Sub

Private Sub cmdCancel_Click()
    OK = False
    Me.Hide
End Sub





Private Sub tVw_DblClick()
    If tVw.SelectedItem.Key Like CUsual.NodeKeyPrefixCG & "*" Then
        Call cmdOK_Click
    End If
End Sub

Private Sub tVw_NodeClick(ByVal Node As MSComctlLib.Node)
    cmdOK.Enabled = (Node.Key Like CUsual.NodeKeyPrefixCG & "*")
End Sub

⌨️ 快捷键说明

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