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

📄

📁 VB开发的ERP系统
💻
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Pub_FrmSortChoice 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "选择工资类别"
   ClientHeight    =   3795
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3870
   Icon            =   "公用窗体_选择工资类别.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3795
   ScaleWidth      =   3870
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Cancel 
      Caption         =   "取消(&C)"
      Height          =   300
      Left            =   2670
      TabIndex        =   4
      Top             =   3390
      Width           =   1120
   End
   Begin VB.CommandButton Cmd_Ok 
      Caption         =   "确定(&O)"
      Height          =   300
      Left            =   1470
      TabIndex        =   3
      Top             =   3390
      Width           =   1120
   End
   Begin VB.CommandButton Cmd_All 
      Caption         =   "全选(&A)"
      Height          =   300
      Left            =   2670
      TabIndex        =   2
      Top             =   3030
      Width           =   1120
   End
   Begin VB.CommandButton Cmd_Qing 
      Caption         =   "全清(&L)"
      Height          =   300
      Left            =   1470
      TabIndex        =   1
      Top             =   3030
      Width           =   1120
   End
   Begin MSComctlLib.TreeView Tre_Sort 
      Height          =   2745
      Left            =   60
      TabIndex        =   0
      Top             =   120
      Width           =   3735
      _ExtentX        =   6588
      _ExtentY        =   4842
      _Version        =   393217
      Style           =   7
      Appearance      =   1
   End
End
Attribute VB_Name = "Pub_FrmSortChoice"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************
'*    模 块 名 称 :选择工资类别
'*    功 能 描 述 :在类别人员选择中用,选择哪些工资类别同时增人、删人、停发、修改。
'*    程序员姓名  :田建秀
'*    最后修改人  :田建秀
'*    最后修改时间:2002/01/04
'*    备        注:
'*******************************************************

Option Explicit
Option Base 1
Dim Rsc As New ADODB.Recordset
Dim Sql As String
Dim I As Integer
Dim Nodx As Node
Public SortId As String          '与类别人员选择窗体的imagecombo框中的sortid对应。
Public cSort As New Collection   '返回被选中的工资类别
Public OpeStatus As String  'ok 按确定退出  cancel 按取消退出

Private Sub Cmd_All_Click()
    With Tre_Sort
        For I = 1 To .Nodes.Count
            .Nodes(I).Checked = True
        Next
    End With
End Sub

Private Sub Cmd_Cancel_Click()
    OpeStatus = "cancel"
    Unload Me
End Sub

Private Sub Cmd_Ok_Click()
    With Tre_Sort
        For I = 1 To .Nodes.Count
            If Right(Trim(.Nodes(I).Key), Len(Trim(.Nodes(I).Key)) - 1) = SortId And .Nodes(I).Checked = False Then
                Call Xtxxts("工资类别'" & Trim(.Nodes(I).Text) & "'必须被选中!", 0, 1)
                Exit Sub
            End If
        Next
        For I = 1 To .Nodes.Count
            If .Nodes(I).Checked = True Then
                cSort.Add Right(Trim(.Nodes(I).Key), Len(Trim(.Nodes(I).Key)) - 1)
            End If
        Next

        OpeStatus = "ok"
        Unload Me
    End With
End Sub

Private Sub Cmd_Qing_Click()
    With Tre_Sort
        For I = 1 To .Nodes.Count
            .Nodes(I).Checked = False
        Next
    End With
End Sub

Private Sub Form_Load()
    For I = 1 To cSort.Count
        cSort.Remove (1)
    Next
    If Rsc.State = 1 Then Rsc.Close
    Sql = "select * from PM_Sort p,PM_OpeSort s where p.sortid=s.sortid and czybm='" & _
          Xtczybm & "' and SortHalt=0 order by p.sortid"
    Set Rsc = Cw_DataEnvi.DataConnect.Execute(Sql)
    With Tre_Sort
        .Checkboxes = True
        Do While Not Rsc.EOF
            Set Nodx = .Nodes.Add(, , "S" & Trim(Rsc!SortId), Trim(Rsc!SortName) & "(" & Trim(Rsc!SortId) & ")")
            Rsc.MoveNext
        Loop
        For I = 1 To .Nodes.Count
            If Right(Trim(.Nodes(I).Key), Len(Trim(.Nodes(I).Key)) - 1) = SortId Then
                .Nodes(I).Checked = True
            End If
        Next
    End With
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set Rsc = Nothing
End Sub

⌨️ 快捷键说明

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