main_xtgl_czqx.frm
上传用户:ake0106
上传日期:2022-07-23
资源大小:4052k
文件大小:20k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
  4. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  5. Begin VB.Form main_xtgl_czqx 
  6.    BorderStyle     =   3  'Fixed Dialog
  7.    ClientHeight    =   5325
  8.    ClientLeft      =   45
  9.    ClientTop       =   330
  10.    ClientWidth     =   10590
  11.    Icon            =   "main_xtgl_czqx.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   5325
  16.    ScaleWidth      =   10590
  17.    ShowInTaskbar   =   0   'False
  18.    StartUpPosition =   1  '所有者中心
  19.    Tag             =   "查看操作权限"
  20.    Begin VB.CommandButton Command1 
  21.       Caption         =   "全选"
  22.       Height          =   375
  23.       Left            =   4665
  24.       TabIndex        =   7
  25.       Top             =   4785
  26.       Width           =   1620
  27.    End
  28.    Begin VB.CommandButton Command2 
  29.       Caption         =   "全不选"
  30.       Height          =   375
  31.       Left            =   6360
  32.       TabIndex        =   6
  33.       Top             =   4785
  34.       Width           =   1620
  35.    End
  36.    Begin VB.CommandButton Command3 
  37.       Caption         =   "确定退出"
  38.       Height          =   375
  39.       Left            =   8055
  40.       TabIndex        =   5
  41.       Top             =   4785
  42.       Width           =   1620
  43.    End
  44.    Begin VB.Frame frame3 
  45.       Caption         =   "现有操作员信息"
  46.       Height          =   4575
  47.       Left            =   15
  48.       TabIndex        =   0
  49.       Top             =   45
  50.       Width           =   3735
  51.       Begin MSDataListLib.DataList DataList1 
  52.          Bindings        =   "main_xtgl_czqx.frx":000C
  53.          Height          =   4260
  54.          Left            =   75
  55.          TabIndex        =   4
  56.          Top             =   210
  57.          Width           =   3570
  58.          _ExtentX        =   6297
  59.          _ExtentY        =   7514
  60.          _Version        =   393216
  61.          ListField       =   "操作员"
  62.       End
  63.       Begin MSAdodcLib.Adodc ado1 
  64.          Height          =   330
  65.          Left            =   -225
  66.          Top             =   2730
  67.          Visible         =   0   'False
  68.          Width           =   2280
  69.          _ExtentX        =   4022
  70.          _ExtentY        =   582
  71.          ConnectMode     =   0
  72.          CursorLocation  =   3
  73.          IsolationLevel  =   -1
  74.          ConnectionTimeout=   15
  75.          CommandTimeout  =   30
  76.          CursorType      =   3
  77.          LockType        =   3
  78.          CommandType     =   2
  79.          CursorOptions   =   0
  80.          CacheSize       =   50
  81.          MaxRecords      =   0
  82.          BOFAction       =   0
  83.          EOFAction       =   0
  84.          ConnectStringType=   1
  85.          Appearance      =   1
  86.          BackColor       =   -2147483643
  87.          ForeColor       =   -2147483640
  88.          Orientation     =   0
  89.          Enabled         =   -1
  90.          Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
  91.          OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_manpowerinfo"
  92.          OLEDBFile       =   ""
  93.          DataSourceName  =   ""
  94.          OtherAttributes =   ""
  95.          UserName        =   ""
  96.          Password        =   ""
  97.          RecordSource    =   "权限信息表"
  98.          Caption         =   "adoXS"
  99.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  100.             Name            =   "宋体"
  101.             Size            =   9
  102.             Charset         =   134
  103.             Weight          =   400
  104.             Underline       =   0   'False
  105.             Italic          =   0   'False
  106.             Strikethrough   =   0   'False
  107.          EndProperty
  108.          _Version        =   393216
  109.       End
  110.    End
  111.    Begin VB.Frame Frame6 
  112.       Height          =   720
  113.       Left            =   15
  114.       TabIndex        =   1
  115.       Top             =   4500
  116.       Width           =   3735
  117.       Begin VB.CommandButton cmdPassword 
  118.          Caption         =   "修改密码"
  119.          Height          =   390
  120.          Left            =   2655
  121.          TabIndex        =   11
  122.          Top             =   210
  123.          Width           =   1005
  124.       End
  125.       Begin VB.CommandButton cmdDel 
  126.          Caption         =   "删除操作员"
  127.          Height          =   390
  128.          Left            =   1350
  129.          TabIndex        =   3
  130.          Top             =   210
  131.          Width           =   1320
  132.       End
  133.       Begin VB.CommandButton cmdAdd 
  134.          Caption         =   "添加新操作员"
  135.          Height          =   390
  136.          Left            =   45
  137.          TabIndex        =   2
  138.          Top             =   210
  139.          Width           =   1320
  140.       End
  141.    End
  142.    Begin TabDlg.SSTab SSTab1 
  143.       Height          =   4455
  144.       Left            =   3780
  145.       TabIndex        =   8
  146.       Top             =   195
  147.       Width           =   6780
  148.       _ExtentX        =   11959
  149.       _ExtentY        =   7858
  150.       _Version        =   393216
  151.       Tabs            =   1
  152.       TabsPerRow      =   1
  153.       TabHeight       =   520
  154.       TabCaption(0)   =   "权限设置"
  155.       TabPicture(0)   =   "main_xtgl_czqx.frx":001F
  156.       Tab(0).ControlEnabled=   -1  'True
  157.       Tab(0).Control(0)=   "Check1(2)"
  158.       Tab(0).Control(0).Enabled=   0   'False
  159.       Tab(0).Control(1)=   "Check1(3)"
  160.       Tab(0).Control(1).Enabled=   0   'False
  161.       Tab(0).Control(2)=   "Check1(4)"
  162.       Tab(0).Control(2).Enabled=   0   'False
  163.       Tab(0).Control(3)=   "Check1(5)"
  164.       Tab(0).Control(3).Enabled=   0   'False
  165.       Tab(0).Control(4)=   "Check1(6)"
  166.       Tab(0).Control(4).Enabled=   0   'False
  167.       Tab(0).Control(5)=   "Check1(7)"
  168.       Tab(0).Control(5).Enabled=   0   'False
  169.       Tab(0).Control(6)=   "Check1(8)"
  170.       Tab(0).Control(6).Enabled=   0   'False
  171.       Tab(0).Control(7)=   "Check1(9)"
  172.       Tab(0).Control(7).Enabled=   0   'False
  173.       Tab(0).Control(8)=   "Check1(10)"
  174.       Tab(0).Control(8).Enabled=   0   'False
  175.       Tab(0).Control(9)=   "Check1(16)"
  176.       Tab(0).Control(9).Enabled=   0   'False
  177.       Tab(0).Control(10)=   "Check1(17)"
  178.       Tab(0).Control(10).Enabled=   0   'False
  179.       Tab(0).Control(11)=   "Check1(18)"
  180.       Tab(0).Control(11).Enabled=   0   'False
  181.       Tab(0).Control(12)=   "Check1(19)"
  182.       Tab(0).Control(12).Enabled=   0   'False
  183.       Tab(0).Control(13)=   "Check1(0)"
  184.       Tab(0).Control(13).Enabled=   0   'False
  185.       Tab(0).Control(14)=   "Check1(1)"
  186.       Tab(0).Control(14).Enabled=   0   'False
  187.       Tab(0).Control(15)=   "Check1(11)"
  188.       Tab(0).Control(15).Enabled=   0   'False
  189.       Tab(0).Control(16)=   "Check1(12)"
  190.       Tab(0).Control(16).Enabled=   0   'False
  191.       Tab(0).Control(17)=   "Check1(13)"
  192.       Tab(0).Control(17).Enabled=   0   'False
  193.       Tab(0).Control(18)=   "Check1(14)"
  194.       Tab(0).Control(18).Enabled=   0   'False
  195.       Tab(0).Control(19)=   "Check1(15)"
  196.       Tab(0).Control(19).Enabled=   0   'False
  197.       Tab(0).Control(20)=   "Check1(20)"
  198.       Tab(0).Control(20).Enabled=   0   'False
  199.       Tab(0).Control(21)=   "Check1(21)"
  200.       Tab(0).Control(21).Enabled=   0   'False
  201.       Tab(0).Control(22)=   "Check1(22)"
  202.       Tab(0).Control(22).Enabled=   0   'False
  203.       Tab(0).Control(23)=   "Check1(23)"
  204.       Tab(0).Control(23).Enabled=   0   'False
  205.       Tab(0).Control(24)=   "Check1(24)"
  206.       Tab(0).Control(24).Enabled=   0   'False
  207.       Tab(0).Control(25)=   "Check1(25)"
  208.       Tab(0).Control(25).Enabled=   0   'False
  209.       Tab(0).Control(26)=   "Check1(26)"
  210.       Tab(0).Control(26).Enabled=   0   'False
  211.       Tab(0).Control(27)=   "Check1(27)"
  212.       Tab(0).Control(27).Enabled=   0   'False
  213.       Tab(0).Control(28)=   "Check1(28)"
  214.       Tab(0).Control(28).Enabled=   0   'False
  215.       Tab(0).Control(29)=   "Check1(29)"
  216.       Tab(0).Control(29).Enabled=   0   'False
  217.       Tab(0).Control(30)=   "Check1(30)"
  218.       Tab(0).Control(30).Enabled=   0   'False
  219.       Tab(0).Control(31)=   "Check1(31)"
  220.       Tab(0).Control(31).Enabled=   0   'False
  221.       Tab(0).Control(32)=   "Check1(32)"
  222.       Tab(0).Control(32).Enabled=   0   'False
  223.       Tab(0).Control(33)=   "Check1(33)"
  224.       Tab(0).Control(33).Enabled=   0   'False
  225.       Tab(0).Control(34)=   "Check1(34)"
  226.       Tab(0).Control(34).Enabled=   0   'False
  227.       Tab(0).Control(35)=   "Check1(35)"
  228.       Tab(0).Control(35).Enabled=   0   'False
  229.       Tab(0).ControlCount=   36
  230.       Begin VB.CheckBox Check1 
  231.          Caption         =   "Check1"
  232.          Height          =   225
  233.          Index           =   35
  234.          Left            =   4455
  235.          TabIndex        =   45
  236.          Top             =   3915
  237.          Width           =   2115
  238.       End
  239.       Begin VB.CheckBox Check1 
  240.          Caption         =   "Check1"
  241.          Height          =   225
  242.          Index           =   34
  243.          Left            =   4455
  244.          TabIndex        =   44
  245.          Top             =   3585
  246.          Width           =   2115
  247.       End
  248.       Begin VB.CheckBox Check1 
  249.          Caption         =   "Check1"
  250.          Height          =   225
  251.          Index           =   33
  252.          Left            =   4455
  253.          TabIndex        =   43
  254.          Top             =   3285
  255.          Width           =   2115
  256.       End
  257.       Begin VB.CheckBox Check1 
  258.          Caption         =   "Check1"
  259.          Height          =   225
  260.          Index           =   32
  261.          Left            =   4455
  262.          TabIndex        =   42
  263.          Top             =   2985
  264.          Width           =   2115
  265.       End
  266.       Begin VB.CheckBox Check1 
  267.          Caption         =   "Check1"
  268.          Height          =   225
  269.          Index           =   31
  270.          Left            =   4455
  271.          TabIndex        =   41
  272.          Top             =   2670
  273.          Width           =   2115
  274.       End
  275.       Begin VB.CheckBox Check1 
  276.          Caption         =   "Check1"
  277.          Height          =   225
  278.          Index           =   30
  279.          Left            =   4455
  280.          TabIndex        =   40
  281.          Top             =   2385
  282.          Width           =   2115
  283.       End
  284.       Begin VB.CheckBox Check1 
  285.          Caption         =   "Check1"
  286.          Height          =   225
  287.          Index           =   29
  288.          Left            =   4455
  289.          TabIndex        =   39
  290.          Top             =   2070
  291.          Width           =   2115
  292.       End
  293.       Begin VB.CheckBox Check1 
  294.          Caption         =   "Check1"
  295.          Height          =   225
  296.          Index           =   28
  297.          Left            =   4455
  298.          TabIndex        =   38
  299.          Top             =   1785
  300.          Width           =   2115
  301.       End
  302.       Begin VB.CheckBox Check1 
  303.          Caption         =   "Check1"
  304.          Height          =   225
  305.          Index           =   27
  306.          Left            =   4455
  307.          TabIndex        =   37
  308.          Top             =   1455
  309.          Width           =   2115
  310.       End
  311.       Begin VB.CheckBox Check1 
  312.          Caption         =   "Check1"
  313.          Height          =   225
  314.          Index           =   26
  315.          Left            =   4455
  316.          TabIndex        =   36
  317.          Top             =   1155
  318.          Width           =   2115
  319.       End
  320.       Begin VB.CheckBox Check1 
  321.          Caption         =   "Check1"
  322.          Height          =   225
  323.          Index           =   25
  324.          Left            =   4455
  325.          TabIndex        =   35
  326.          Top             =   840
  327.          Width           =   2115
  328.       End
  329.       Begin VB.CheckBox Check1 
  330.          Caption         =   "Check1"
  331.          Height          =   225
  332.          Index           =   24
  333.          Left            =   4455
  334.          TabIndex        =   34
  335.          Top             =   555
  336.          Width           =   2115
  337.       End
  338.       Begin VB.CheckBox Check1 
  339.          Caption         =   "Check1"
  340.          Height          =   225
  341.          Index           =   23
  342.          Left            =   2325
  343.          TabIndex        =   33
  344.          Top             =   3915
  345.          Width           =   2115
  346.       End
  347.       Begin VB.CheckBox Check1 
  348.          Caption         =   "Check1"
  349.          Height          =   225
  350.          Index           =   22
  351.          Left            =   2325
  352.          TabIndex        =   32
  353.          Top             =   3585
  354.          Width           =   2115
  355.       End
  356.       Begin VB.CheckBox Check1 
  357.          Caption         =   "Check1"
  358.          Height          =   225
  359.          Index           =   21
  360.          Left            =   2325
  361.          TabIndex        =   31
  362.          Top             =   3285
  363.          Width           =   2115
  364.       End
  365.       Begin VB.CheckBox Check1 
  366.          Caption         =   "Check1"
  367.          Height          =   225
  368.          Index           =   20
  369.          Left            =   2325
  370.          TabIndex        =   30
  371.          Top             =   2985
  372.          Width           =   2115
  373.       End
  374.       Begin VB.CheckBox Check1 
  375.          Caption         =   "Check1"
  376.          Height          =   225
  377.          Index           =   15
  378.          Left            =   2325
  379.          TabIndex        =   23
  380.          Top             =   1455
  381.          Width           =   2115
  382.       End
  383.       Begin VB.CheckBox Check1 
  384.          Caption         =   "Check1"
  385.          Height          =   225
  386.          Index           =   14
  387.          Left            =   2325
  388.          TabIndex        =   22
  389.          Top             =   1155
  390.          Width           =   2115
  391.       End
  392.       Begin VB.CheckBox Check1 
  393.          Caption         =   "Check1"
  394.          Height          =   225
  395.          Index           =   13
  396.          Left            =   2325
  397.          TabIndex        =   21
  398.          Top             =   840
  399.          Width           =   2115
  400.       End
  401.       Begin VB.CheckBox Check1 
  402.          Caption         =   "Check1"
  403.          Height          =   225
  404.          Index           =   12
  405.          Left            =   2325
  406.          TabIndex        =   20
  407.          Top             =   555
  408.          Width           =   2115
  409.       End
  410.       Begin VB.CheckBox Check1 
  411.          Caption         =   "Check1"
  412.          Height          =   225
  413.          Index           =   11
  414.          Left            =   360
  415.          TabIndex        =   19
  416.          Top             =   3915
  417.          Width           =   2115
  418.       End
  419.       Begin VB.CheckBox Check1 
  420.          Caption         =   "Check1"
  421.          Height          =   225
  422.          Index           =   1
  423.          Left            =   360
  424.          TabIndex        =   29
  425.          Top             =   840
  426.          Width           =   2115
  427.       End
  428.       Begin VB.CheckBox Check1 
  429.          Caption         =   "Check1"
  430.          Height          =   225
  431.          Index           =   0
  432.          Left            =   360
  433.          TabIndex        =   28
  434.          Top             =   555
  435.          Width           =   2115
  436.       End
  437.       Begin VB.CheckBox Check1 
  438.          Caption         =   "Check1"
  439.          Height          =   225
  440.          Index           =   19
  441.          Left            =   2325
  442.          TabIndex        =   27
  443.          Top             =   2670
  444.          Width           =   2115
  445.       End
  446.       Begin VB.CheckBox Check1 
  447.          Caption         =   "Check1"
  448.          Height          =   225
  449.          Index           =   18
  450.          Left            =   2325
  451.          TabIndex        =   26
  452.          Top             =   2385
  453.          Width           =   2115
  454.       End
  455.       Begin VB.CheckBox Check1 
  456.          Caption         =   "Check1"
  457.          Height          =   225
  458.          Index           =   17
  459.          Left            =   2325
  460.          TabIndex        =   25
  461.          Top             =   2070
  462.          Width           =   2115
  463.       End
  464.       Begin VB.CheckBox Check1 
  465.          Caption         =   "Check1"
  466.          Height          =   225
  467.          Index           =   16
  468.          Left            =   2325
  469.          TabIndex        =   24
  470.          Top             =   1785
  471.          Width           =   2115
  472.       End
  473.       Begin VB.CheckBox Check1 
  474.          Caption         =   "Check1"
  475.          Height          =   225
  476.          Index           =   10
  477.          Left            =   360
  478.          TabIndex        =   18
  479.          Top             =   3585
  480.          Width           =   2115
  481.       End
  482.       Begin VB.CheckBox Check1 
  483.          Caption         =   "Check1"
  484.          Height          =   225
  485.          Index           =   9
  486.          Left            =   360
  487.          TabIndex        =   17
  488.          Top             =   3285
  489.          Width           =   2115
  490.       End
  491.       Begin VB.CheckBox Check1 
  492.          Caption         =   "Check1"
  493.          Height          =   225
  494.          Index           =   8
  495.          Left            =   360
  496.          TabIndex        =   16
  497.          Top             =   2985
  498.          Width           =   2115
  499.       End
  500.       Begin VB.CheckBox Check1 
  501.          Caption         =   "Check1"
  502.          Height          =   225
  503.          Index           =   7
  504.          Left            =   360
  505.          TabIndex        =   15
  506.          Top             =   2670
  507.          Width           =   2115
  508.       End
  509.       Begin VB.CheckBox Check1 
  510.          Caption         =   "Check1"
  511.          Height          =   225
  512.          Index           =   6
  513.          Left            =   360
  514.          TabIndex        =   14
  515.          Top             =   2385
  516.          Width           =   2115
  517.       End
  518.       Begin VB.CheckBox Check1 
  519.          Caption         =   "Check1"
  520.          Height          =   225
  521.          Index           =   5
  522.          Left            =   360
  523.          TabIndex        =   13
  524.          Top             =   2070
  525.          Width           =   2115
  526.       End
  527.       Begin VB.CheckBox Check1 
  528.          Caption         =   "Check1"
  529.          Height          =   225
  530.          Index           =   4
  531.          Left            =   360
  532.          TabIndex        =   12
  533.          Top             =   1785
  534.          Width           =   2115
  535.       End
  536.       Begin VB.CheckBox Check1 
  537.          Caption         =   "Check1"
  538.          Height          =   225
  539.          Index           =   3
  540.          Left            =   360
  541.          TabIndex        =   10
  542.          Top             =   1455
  543.          Width           =   2115
  544.       End
  545.       Begin VB.CheckBox Check1 
  546.          Caption         =   "Check1"
  547.          Height          =   225
  548.          Index           =   2
  549.          Left            =   360
  550.          TabIndex        =   9
  551.          Top             =   1155
  552.          Width           =   2115
  553.       End
  554.    End
  555. End
  556. Attribute VB_Name = "main_xtgl_czqx"
  557. Attribute VB_GlobalNameSpace = False
  558. Attribute VB_Creatable = False
  559. Attribute VB_PredeclaredId = True
  560. Attribute VB_Exposed = False
  561. Dim rs1 As New ADODB.Recordset
  562. Dim i As Integer
  563. Private Sub cmdAdd_Click()
  564.   Load main_xtgl_czy
  565.   main_xtgl_czy.Show 1
  566. End Sub
  567. Private Sub cmdDel_Click()
  568.   Cnn.Execute ("delete from 权限信息表 where 操作员='" + DataList1.BoundText + "'")
  569.   ado1.Refresh
  570. End Sub
  571. Private Sub cmdPassword_Click()
  572.   Load main_xtgl_mm
  573.   main_xtgl_mm.Show 1
  574. End Sub
  575. Private Sub Form_Activate()
  576.    ado1.Refresh
  577.    DataList1.SetFocus
  578. End Sub
  579. Private Sub Form_Load()
  580.   Me.Caption = text
  581.   rs1.Open "权限信息表", Cnn, adOpenKeyset, adLockOptimistic
  582.   For i = 0 To Check1.UBound
  583.       Check1(i).Caption = rs1.Fields(i).Name
  584.   Next i
  585.   rs1.Close
  586.   Set rs1 = Nothing
  587.   DataList1.text = ado1.Recordset.Fields("操作员")
  588.   DataList1_Click
  589. End Sub
  590. Private Sub Command1_Click()     '全选
  591.   For i = 0 To Check1.UBound
  592.      Check1(i).Value = 1
  593.   Next i
  594. End Sub
  595. Private Sub Command2_Click()     '全不选
  596.   For i = 0 To Check1.UBound
  597.      Check1(i).Value = 0
  598.   Next i
  599. End Sub
  600. Private Sub Command3_Click()     '为操作员设置权限
  601.   For i = 0 To Check1.UBound
  602.      If Check1(i).Value = 1 Then
  603.         Cnn.Execute ("update 权限信息表 set " & Check1(i).Caption & "=1 where 操作员='" + DataList1.BoundText + "'")
  604.      Else
  605.         Cnn.Execute ("update 权限信息表 set " & Check1(i).Caption & "=0 where 操作员='" + DataList1.BoundText + "'")
  606.      End If
  607.   Next i
  608.   Unload Me
  609. End Sub
  610. Private Sub DataList1_Click()     '查看操作员权限
  611.   rs1.Open "权限信息表 where 操作员='" & DataList1.BoundText & "'", Cnn, adOpenStatic
  612.   If rs1.RecordCount > 0 Then
  613.    For i = 0 To Check1.UBound
  614.      If rs1.Fields(i) = True Then Check1(i).Value = 1 Else Check1(i).Value = 0
  615.    Next i
  616.   End If
  617.   rs1.Close
  618.   Set rs1 = Nothing
  619. End Sub