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

📄 frmrights.frm

📁 针对农资系统的商品进销存管理系统软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmRights 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "操作员管理"
   ClientHeight    =   5670
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8160
   Icon            =   "frmRights.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5670
   ScaleWidth      =   8160
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Height          =   4575
      Left            =   120
      TabIndex        =   10
      Top             =   600
      Width           =   7935
      Begin VB.ComboBox cobOperator 
         Height          =   300
         Left            =   960
         Style           =   2  'Dropdown List
         TabIndex        =   13
         Top             =   240
         Width           =   2535
      End
      Begin VB.CommandButton cmdAddPower 
         Caption         =   "<"
         BeginProperty Font 
            Name            =   "黑体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   435
         Left            =   3720
         TabIndex        =   1
         Top             =   1560
         Width           =   495
      End
      Begin VB.CommandButton cmdDelPower 
         Caption         =   ">"
         BeginProperty Font 
            Name            =   "黑体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   435
         Left            =   3720
         TabIndex        =   2
         Top             =   2880
         Width           =   495
      End
      Begin MSComctlLib.TreeView TreeLeft 
         Height          =   3855
         Left            =   120
         TabIndex        =   0
         Top             =   600
         Width           =   3375
         _ExtentX        =   5953
         _ExtentY        =   6800
         _Version        =   393217
         HideSelection   =   0   'False
         Indentation     =   529
         LineStyle       =   1
         Style           =   7
         ImageList       =   "ImageList1"
         Appearance      =   1
      End
      Begin MSComctlLib.TreeView TreeRight 
         Height          =   3855
         Left            =   4440
         TabIndex        =   3
         Top             =   600
         Width           =   3375
         _ExtentX        =   5953
         _ExtentY        =   6800
         _Version        =   393217
         HideSelection   =   0   'False
         Indentation     =   529
         LabelEdit       =   1
         LineStyle       =   1
         Style           =   7
         ImageList       =   "ImageList1"
         Appearance      =   1
      End
      Begin VB.Label lblName 
         Caption         =   "操作员"
         Height          =   255
         Left            =   240
         TabIndex        =   12
         Top             =   300
         Width           =   615
      End
      Begin VB.Label lblFunction 
         Caption         =   "可选权限列表:"
         Height          =   255
         Left            =   4560
         TabIndex        =   11
         Top             =   300
         Width           =   1695
      End
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   7320
      Top             =   0
      _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         =   "frmRights.frx":0442
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmRights.frx":0894
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmRights.frx":0CE6
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin VB.PictureBox picButtons 
      Align           =   2  'Align Bottom
      Appearance      =   0  'Flat
      BackColor       =   &H80000004&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   0
      ScaleHeight     =   375
      ScaleWidth      =   8160
      TabIndex        =   7
      Top             =   5295
      Width           =   8160
      Begin VB.CommandButton cmdAdd 
         Caption         =   "增加(&A)"
         Height          =   315
         Left            =   480
         TabIndex        =   4
         Top             =   0
         Width           =   1095
      End
      Begin VB.CommandButton cmdDel 
         Caption         =   "删除(&D)"
         Height          =   315
         Left            =   2160
         TabIndex        =   5
         Top             =   0
         Width           =   1095
      End
      Begin VB.CommandButton cmdExit 
         Caption         =   "退出(&X)"
         Height          =   315
         Left            =   5640
         TabIndex        =   6
         Top             =   0
         Width           =   1095
      End
   End
   Begin VB.Label lblTitle 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "操 作 员 管 理"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   26.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   525
      Index           =   0
      Left            =   2355
      TabIndex        =   8
      Top             =   0
      Width           =   3735
   End
   Begin VB.Label lblTitle 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "操 作 员 管 理"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   26.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   525
      Index           =   1
      Left            =   2385
      TabIndex        =   9
      Top             =   30
      Width           =   3735
   End
End
Attribute VB_Name = "frmRights"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim m_sOldOperator As String

'////////////////////////////////////////////////
'//
Private Sub ChangeMode()
    cmdAddPower.Enabled = TreeRight.Nodes.Count > 1 And cobOperator.Text <> ""
    cmdDelPower.Enabled = TreeLeft.Nodes.Count > 1 And cobOperator.Text <> ""
    
    cmdAdd.Enabled = True
    cmdDel.Enabled = cobOperator.Text <> ""
End Sub

'////////////////////////////////////////////////
'//
Private Sub cmdAdd_Click()
    Dim sNameOperator As String
    Dim nAffected As Integer, i As Integer
    sNameOperator = "新操作员"
    For i = 0 To cobOperator.ListCount - 1
        If cobOperator.List(i) = sNameOperator Then
            Exit For
        End If
    Next
    
    If i >= cobOperator.ListCount Then      '新操作员不存在
        m_gDBCnn.Execute "Insert Into Operator (FDepartCode, FOperatorName) Values ('" & m_gsDepartCode & "','" & sNameOperator & "')", nAffected
        If nAffected = 1 Then
            cobOperator.AddItem sNameOperator
            cobOperator.ListIndex = cobOperator.ListCount - 1
        End If
    Else
        cobOperator.ListIndex = i

⌨️ 快捷键说明

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