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

📄 sys_accessctrl1.dfm

📁 一个MRPII系统源代码版本
💻 DFM
字号:
inherited Frm_Sys_AccessCtrl1: TFrm_Sys_AccessCtrl1
  Left = 71
  Top = 149
  Caption = '用户权限设置'
  ClientHeight = 406
  ClientWidth = 593
  OnDestroy = FormDestroy
  PixelsPerInch = 96
  TextHeight = 12
  inherited ControlBar: TControlBar
    Width = 593
    inherited ToolBar: TToolBar
      inherited TlBtn_New: TToolButton
        Visible = False
      end
      inherited TlBtn_Modify: TToolButton
        Visible = False
      end
      inherited TlBtn_Delete: TToolButton
        Visible = False
      end
    end
  end
  inherited Pnl_Title: TPanel
    Width = 593
    Caption = '用户权限设置'
    inherited Image2: TImage
      Width = 593
    end
  end
  inherited Pnl_Head: TPanel
    Width = 593
    Height = 35
    Visible = False
    inherited Image1: TImage
      Width = 593
      Height = 35
    end
  end
  inherited Pnl_Hint: TPanel
    Top = 380
    Width = 593
    inherited Image4: TImage
      Width = 593
    end
  end
  inherited Pnl_Body: TPanel
    Top = 133
    Width = 593
    Height = 247
    inherited Image3: TImage
      Left = 242
      Width = 207
      Height = 247
    end
    inherited DBGridEh: TDBGridEh
      Left = 242
      Width = 207
      Height = 247
      ReadOnly = False
      OnTitleClick = DBGridEhTitleClick
      Columns = <
        Item
          FieldName = 'EmployeeCode'
          PickList.Strings = ()
          Title.Caption = '用户代码'
          Visible = False
          KeyList.Strings = ()
        end
        Item
          FieldName = 'SysModuleCode'
          PickList.Strings = ()
          Title.Caption = '模块代码'
          Visible = False
          KeyList.Strings = ()
        end
        Item
          FieldName = 'SysmoduleB'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '模块标识'
          Width = 109
          KeyList.Strings = ()
        end
        Item
          FieldName = 'SysMenuID'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '菜单ID'
          Visible = False
          KeyList.Strings = ()
        end
        Item
          FieldName = 'SysMenuCode'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '菜单代码'
          Width = 57
          KeyList.Strings = ()
        end
        Item
          FieldName = 'SysMenuName'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '菜单名称'
          Width = 166
          KeyList.Strings = ()
        end
        Item
          FieldName = 'CANAccess'
          PickList.Strings = (
            '是'
            '否')
          ReadOnly = True
          Title.Alignment = taCenter
          Title.Caption = '权限'
          Title.Font.ChArset = GB2312_CHArSET
          Title.Font.Color = clRed
          Title.Font.Height = -12
          Title.Font.Name = '宋体'
          Title.Font.Style = []
          Width = 36
          KeyList.Strings = (
            '1'
            '0')
          Checkboxes = False
        end>
    end
    object Lstbx_Employee: TListBox
      Left = 0
      Top = 0
      Width = 121
      Height = 247
      Align = alLeft
      ItemHeight = 12
      TabOrder = 1
      OnClick = Lstbx_EmployeeClick
    end
    object Lstbx_Module: TListBox
      Left = 121
      Top = 0
      Width = 121
      Height = 247
      Align = alLeft
      ItemHeight = 12
      TabOrder = 2
      OnClick = Lstbx_ModuleClick
    end
    object Lstbx_Dept: TListBox
      Left = 449
      Top = 0
      Width = 144
      Height = 247
      Align = alRight
      ItemHeight = 12
      TabOrder = 3
      OnClick = Lstbx_DeptClick
    end
  end
  object Panel1: TPanel [5]
    Left = 0
    Top = 92
    Width = 593
    Height = 41
    Align = alTop
    BevelOuter = bvNone
    TabOrder = 5
    object Label1: TLabel
      Left = 16
      Top = 16
      Width = 60
      Height = 12
      Caption = '用户标识:'
    end
    object Label2: TLabel
      Left = 128
      Top = 16
      Width = 60
      Height = 12
      Caption = '模块标识:'
    end
    object Label3: TLabel
      Left = 248
      Top = 16
      Width = 60
      Height = 12
      Caption = '权限列表:'
    end
    object Label4: TLabel
      Left = 680
      Top = 16
      Width = 60
      Height = 12
      Caption = '部门标识:'
    end
  end
  inherited ActionList: TActionList
    Left = 344
    Top = 280
  end
  inherited AdoQry_Main: TAdoQuery
    ConnectionString = 
      'Provider=SQLOLEDB.1;Password=mdrcmrm;Persist Security Info=True;' +
      'User ID=mdrcmrm;Initial Catalog=mdrcmrm;Data Source=192.168.0.15' +
      '1;Use procedure for Prepare=1;Auto Translate=True;Packet Size=40' +
      '96;Workstation ID=XYB'
    CurSorType = ctStatic
    SQL.Strings = (
      '--创建临时表,'
      'select EmployeeCode='#39'cxp0'#39',SysMenuID,CANAccess=0'
      'into #TMpSysMenuAccessCtrl'
      'from SysMenu'
      '--有权限的记录'
      'select * '
      'into #tmp1'
      'from('
      '     select SysMenuAccessCtrl.EmployeeCode,'
      '            SysMenuAccessCtrl.SysMenuID,'
      '            SysMenuAccessCtrl.CANAccess'
      '     from  SysMenuAccessCtrl'
      '     where  SysMenuAccessCtrl.EmployeeCode='#39'cxp0'#39
      '             and SysMenuAccessCtrl.CANAccess<>0 '
      '--无权限的记录'
      'UNION'
      '     select #TMpSysMenuAccessCtrl.EmployeeCode,'
      '            #TMpSysMenuAccessCtrl.SysMenuID,'
      
        '            Isnull(0,#TMpSysMenuAccessCtrl.CANAccess) as CANACCE' +
        'SS'
      '     from #TMpSysMenuAccessCtrl'
      '     where #TMpSysMenuAccessCtrl.SysMenuID not in '
      
        '          (select SysMenuid from SysMenuAccessCtrl where employe' +
        'eCode='#39'cxp0'#39' '
      
        '                                                     and CANACCE' +
        'SS<>0) '
      '    )a'
      'select * from #tmp1'
      ''
      'select #tmp1.EmployeeCode,'
      '       Employee.EmployeeName,'
      
        '       #tmp1.EmployeeCode+'#39' '#39'+Employee.EmployeeName as EmployeeB' +
        ','
      '       #tmp1.SysMenuid,'
      '       SysMenu.SysMenuCode,'
      '       SysMenu.SysMenuName,'
      '       SysMenu.SysMenuCode+'#39' '#39'+SysMenu.SysMenuName as SysMenuB,'
      '       Sysmodule.SysModuleCode,'
      '       Sysmodule.SysmoduleName,'
      
        '       Sysmodule.SysModuleCode+'#39' '#39'+Sysmodule.SysmoduleName as sy' +
        'smoduleB,'
      '       #tmp1.canAccess'
      'from  #tmp1'
      'join Employee on #tmp1.EmployeeCode=Employee.EmployeeCode'
      'join SysMenu on #tmp1.SysMenuid =SysMenu.SysMenuid'
      'join Sysmodule on SysMenu.SysModuleCode=Sysmodule.SysModuleCode'
      'where Sysmodule.SysModuleCode='#39'Ap'#39
      'Order by Sysmodule.SysModuleCode,SysMenu.SysMenuCode'
      ''
      ''
      'drop table #tMpSysMenuAccessCtrl  drop table #tmp1 '
      ''
      ''
      ''
      ''
      ''
      '   ')
    Left = 344
    Top = 233
    object AdoQry_MainEmployeeCode: TStringField
      FieldName = 'EmployeeCode'
      Size = 30
    end
    object AdoQry_MainEmployeeName: TStringField
      FieldName = 'EmployeeName'
      Size = 60
    end
    object AdoQry_MainSysMenuID: TFloatField
      FieldName = 'SysMenuID'
      Origin = 'SysMenu'
    end
    object AdoQry_MainSysMenuCode: TStringField
      FieldName = 'SysMenuCode'
      Origin = 'SysMenu'
      Size = 14
    end
    object AdoQry_MainSysMenuName: TStringField
      FieldName = 'SysMenuName'
      Origin = 'SysMenu'
      Size = 40
    end
    object AdoQry_MainSysModuleCode: TStringField
      FieldName = 'SysModuleCode'
      Size = 4
    end
    object AdoQry_MainSysmoduleName: TStringField
      FieldName = 'SysmoduleName'
      Size = 40
    end
    object AdoQry_MainSysmoduleB: TStringField
      FieldName = 'SysmoduleB'
      ReadOnly = True
      Size = 45
    end
    object AdoQry_MainCANAccess: TIntegerField
      FieldName = 'CANAccess'
      Origin = 'SysMenuAccessCtrl'
    end
  end
  inherited DataSource: TDataSource
    Left = 424
    Top = 281
  end
  object AdoQry_tmp1: TAdoQuery
    Parameters = <>
    Left = 296
    Top = 189
  end
end

⌨️ 快捷键说明

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