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

📄 forsetuserright.frm

📁 这个是我们软件工程的课程设计成果
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "msdatgrd.ocx"
Begin VB.Form ForSetUserRight 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "设置用户"
   ClientHeight    =   6030
   ClientLeft      =   45
   ClientTop       =   420
   ClientWidth     =   9090
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6030
   ScaleWidth      =   9090
   StartUpPosition =   2  'CenterScreen
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0FFFF&
      BorderStyle     =   0  'None
      DrawMode        =   4  'Mask Not Pen
      ForeColor       =   &H80000008&
      Height          =   735
      IMEMode         =   1  'ON
      Left            =   0
      Picture         =   "ForSetUserRight.frx":0000
      ScaleHeight     =   735
      ScaleWidth      =   735
      TabIndex        =   2
      Top             =   0
      Width           =   735
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H00C0E0FF&
      Caption         =   "设置用户"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1695
      Left            =   240
      TabIndex        =   1
      Top             =   4080
      Width           =   8655
      Begin VB.CommandButton Command3 
         BackColor       =   &H0080FFFF&
         Caption         =   "修改"
         Height          =   375
         Left            =   1920
         Style           =   1  'Graphical
         TabIndex        =   9
         Top             =   720
         Width           =   1335
      End
      Begin VB.CommandButton Command5 
         BackColor       =   &H0080FFFF&
         Caption         =   "刷新"
         Height          =   375
         Left            =   5400
         Style           =   1  'Graphical
         TabIndex        =   7
         Top             =   720
         Width           =   1335
      End
      Begin VB.CommandButton Command4 
         BackColor       =   &H0080FFFF&
         Caption         =   "退出"
         Height          =   375
         Left            =   7080
         Style           =   1  'Graphical
         TabIndex        =   5
         Top             =   720
         Width           =   1335
      End
      Begin VB.CommandButton Command2 
         BackColor       =   &H0080FFFF&
         Caption         =   "删除"
         Height          =   375
         Left            =   3600
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   720
         Width           =   1455
      End
      Begin VB.CommandButton Command1 
         BackColor       =   &H0080FFFF&
         Caption         =   "添加"
         Height          =   375
         Left            =   240
         Style           =   1  'Graphical
         TabIndex        =   3
         Top             =   720
         Width           =   1335
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0E0FF&
      Caption         =   "用户权限表"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2655
      Left            =   240
      TabIndex        =   0
      Top             =   840
      Width           =   8655
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "ForSetUserRight.frx":0ECA
         Height          =   2175
         Left            =   240
         TabIndex        =   6
         Top             =   360
         Width           =   8295
         _ExtentX        =   14631
         _ExtentY        =   3836
         _Version        =   393216
         AllowUpdate     =   0   'False
         BackColor       =   12648447
         ColumnHeaders   =   -1  'True
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   3000
      Top             =   0
      Visible         =   0   'False
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   873
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   0
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=train;Data Source=CHENYIDAN"
      OLEDBString     =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=train;Data Source=CHENYIDAN"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 用户信息表"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "注:0代表没有该操作权限,1代表有该操作权限"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   240
      TabIndex        =   8
      Top             =   3600
      Width           =   3975
   End
   Begin VB.Image Image1 
      Height          =   11520
      Left            =   -3840
      Picture         =   "ForSetUserRight.frx":0EDF
      Top             =   -120
      Width           =   15360
   End
End
Attribute VB_Name = "ForSetUserRight"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public i As Integer
Public j As Integer
Public AddOrModify As Boolean
Public txt As String

Private Sub Command1_Click()
j = 0
AddOrModify = True
ForUserInfo.Show

End Sub

Private Sub Command2_Click()
Dim i As Integer

i = MsgBox("确定删除该记录??", vbYesNo + vbExclamation, "提示")
If i = vbYes Then
   If DataGrid1.SelBookmarks.Count <> 0 Then
 Adodc1.Recordset.Delete
 Adodc1.Recordset.Update
   End If
End If

End Sub

Private Sub Command3_Click()
j = 1
txt = DataGrid1.Text
AddOrModify = False
If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
  MsgBox "请选择表中要修改的信息!!", vbOKOnly + vbExclamation, "警告"
  Exit Sub
End If
ForUserInfo.Text1 = Adodc1.Recordset.Fields(0)
ForUserInfo.Text2 = Adodc1.Recordset.Fields(1)
ForUserInfo.Text3 = Adodc1.Recordset.Fields(3)
If Trim(Adodc1.Recordset.Fields(2)) = "后台管理人" Then
 ForUserInfo.Option1 = True
 ForUserInfo.Option2 = False
Else
 ForUserInfo.Option1 = False
 ForUserInfo.Option2 = True
End If

If Adodc1.Recordset.Fields(4) = 1 Then
 ForUserInfo.Check1.Value = 1
Else
 ForUserInfo.Check1.Value = 0
End If

If Adodc1.Recordset.Fields(5) = 1 Then
 ForUserInfo.Check2.Value = 1
Else
 ForUserInfo.Check2.Value = 0
End If

If Adodc1.Recordset.Fields(6) = 1 Then
 ForUserInfo.Check3.Value = 1
Else
 ForUserInfo.Check3.Value = 0
End If

If Adodc1.Recordset.Fields(12) = 1 Then
 ForUserInfo.Check4.Value = 1
Else
 ForUserInfo.Check4.Value = 0
End If

If Adodc1.Recordset.Fields(7) = 1 Then
 ForUserInfo.Check5.Value = 1
Else
 ForUserInfo.Check5.Value = 0
End If

If Adodc1.Recordset.Fields(8) = 1 Then
 ForUserInfo.Check6.Value = 1
Else
 ForUserInfo.Check6.Value = 0
End If

If Adodc1.Recordset.Fields(9) = 1 Then
 ForUserInfo.Check7.Value = 1
Else
 ForUserInfo.Check7.Value = 0
End If

If Adodc1.Recordset.Fields(10) = 1 Then
 ForUserInfo.Check8.Value = 1
Else
 ForUserInfo.Check8.Value = 0
End If

If Adodc1.Recordset.Fields(11) = 1 Then
 ForUserInfo.Check9.Value = 1
Else
 ForUserInfo.Check9.Value = 0
End If

If Adodc1.Recordset.Fields(13) = 1 Then
 ForUserInfo.Check10.Value = 1
Else
 ForUserInfo.Check10.Value = 0
End If

If Adodc1.Recordset.Fields(14) = 1 Then
 ForUserInfo.Check11.Value = 1
Else
 ForUserInfo.Check11.Value = 0
End If

If Adodc1.Recordset.Fields(15) = 1 Then
 ForUserInfo.Check12.Value = 1
Else
 ForUserInfo.Check12.Value = 0
End If

ForUserInfo.Show


End Sub

Private Sub Command4_Click()
Unload Me

End Sub

Private Sub Command5_Click()
Adodc1.RecordSource = "select * from 用户信息表 "
Adodc1.Refresh
End Sub

Private Sub DataGrid1_Click()
 txt = DataGrid1.Text
End Sub

⌨️ 快捷键说明

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