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

📄 frmusu_customer.frm

📁 一个用VB写的财务软件源码
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmUSU_Customer 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "客户选择"
   ClientHeight    =   6285
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4545
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6285
   ScaleWidth      =   4545
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      Height          =   345
      Left            =   2674
      TabIndex        =   2
      Top             =   5880
      Width           =   1065
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   1980
      Top             =   2970
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   5
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_Customer.frx":0000
            Key             =   "UnSelected"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_Customer.frx":0454
            Key             =   "Selected"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_Customer.frx":08A8
            Key             =   "Expand"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_Customer.frx":0CFC
            Key             =   "Collapse"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_Customer.frx":1150
            Key             =   "Root"
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定(&O)"
      Default         =   -1  'True
      Height          =   345
      Left            =   806
      TabIndex        =   1
      Top             =   5880
      Width           =   1065
   End
   Begin MSComctlLib.TreeView tvwKh 
      Height          =   5750
      Left            =   45
      TabIndex        =   0
      Top             =   45
      Width           =   4470
      _ExtentX        =   7885
      _ExtentY        =   10134
      _Version        =   393217
      HideSelection   =   0   'False
      LabelEdit       =   1
      Style           =   7
      ImageList       =   "ImageList1"
      Appearance      =   1
   End
End
Attribute VB_Name = "frmUSU_Customer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Valid As Boolean     '“确定“或“取消“决定有效性

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

Private Sub cmdOk_Click()
    MousePointer = vbHourglass
    Valid = True
    If Left(tvwKh.SelectedItem.Key, 1) = "P" Then Me.Hide
    MousePointer = vbDefault
End Sub

Private Sub form_load()
    Dim rstCuscls As ADODB.Recordset
    Dim rstKhda As ADODB.Recordset

    Set rstCuscls = New ADODB.Recordset
    rstCuscls.CursorLocation = adUseClient
    If rstCuscls.State = adStateClosed Then rstCuscls.Open "select * from tZW_CustomerClass" & glo.sOperateYear & " order by cCCCode", _
                    glo.cnnMain, adOpenStatic, adLockOptimistic
    Set rstKhda = New ADODB.Recordset
    rstKhda.CursorLocation = adUseClient
    If rstKhda.State = adStateClosed Then rstKhda.Open "select * from tZW_Customer" & glo.sOperateYear & " order by cCusCode", _
                    glo.cnnMain, adOpenStatic, adLockOptimistic
    
    tvwKh.Nodes.Add , , "R", "客户", "Root"
    tvwKh.Nodes("R").Expanded = True
    LoadTvwMdl rstCuscls, tvwKh, "R", rstKhda, _
            "cCCCode", "cCCName", "cCusCode", "cCusName", "bCCend"
    
    rstCuscls.Close
    Set rstCuscls = Nothing
    rstKhda.Close
    Set rstKhda = Nothing
    
End Sub

Private Sub tvwKh_DblClick()
    Valid = True
    If Left(tvwKh.SelectedItem.Key, 1) = "P" Then Me.Hide
End Sub
Public Property Get CustomerName() As String
    CustomerName = Mid(tvwKh.SelectedItem, InStr(tvwKh.SelectedItem, "=") + 1)
End Property
Public Property Get CustomerCode() As String
    CustomerCode = Right(tvwKh.SelectedItem.Key, Len(tvwKh.SelectedItem.Key) - 1)
End Property

⌨️ 快捷键说明

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