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

📄 form11.frm

📁 一个vb工资管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form11 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "工资管理系统权限管理"
   ClientHeight    =   5340
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9510
   LinkTopic       =   "Form11"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   5340
   ScaleWidth      =   9510
   ShowInTaskbar   =   0   'False
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   375
      Left            =   1920
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   120
      Visible         =   0   'False
      Width           =   2175
   End
   Begin VB.Frame Frame2 
      Caption         =   "现有操作员情况"
      Height          =   4575
      Left            =   3480
      TabIndex        =   2
      Top             =   600
      Width           =   5775
      Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
         Bindings        =   "Form11.frx":0000
         Height          =   4095
         Left            =   120
         TabIndex        =   9
         Top             =   360
         Width           =   5535
         _ExtentX        =   9763
         _ExtentY        =   7223
         _Version        =   393216
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "操作区"
      Height          =   4575
      Left            =   360
      TabIndex        =   1
      Top             =   600
      Width           =   2895
      Begin VB.Frame Frame3 
         Height          =   3015
         Left            =   120
         TabIndex        =   10
         Top             =   1440
         Width           =   2655
         Begin VB.CommandButton Command10 
            Caption         =   "取          消"
            Height          =   280
            Left            =   120
            TabIndex        =   20
            Top             =   2640
            Width           =   2415
         End
         Begin VB.CommandButton Command9 
            Caption         =   "保          存"
            Height          =   280
            Left            =   120
            TabIndex        =   19
            Top             =   2355
            Width           =   2415
         End
         Begin VB.CommandButton Command8 
            Caption         =   "删          除"
            Height          =   280
            Left            =   120
            TabIndex        =   18
            Top             =   2085
            Width           =   2415
         End
         Begin VB.CommandButton Command7 
            Caption         =   "增          加"
            Height          =   280
            Left            =   120
            TabIndex        =   17
            Top             =   1800
            Width           =   2415
         End
         Begin VB.CommandButton Command6 
            Caption         =   "修          改"
            Height          =   280
            Left            =   120
            TabIndex        =   16
            Top             =   1515
            Width           =   2415
         End
         Begin VB.CommandButton Command5 
            Caption         =   "查          找"
            Height          =   280
            Left            =   120
            TabIndex        =   15
            Top             =   1245
            Width           =   2415
         End
         Begin VB.CommandButton Command4 
            Caption         =   "末          页"
            Height          =   280
            Left            =   120
            TabIndex        =   14
            Top             =   960
            Width           =   2415
         End
         Begin VB.CommandButton Command3 
            Caption         =   "下          页"
            Height          =   280
            Left            =   120
            TabIndex        =   13
            Top             =   675
            Width           =   2415
         End
         Begin VB.CommandButton Command2 
            Caption         =   "上          页"
            Height          =   280
            Left            =   120
            TabIndex        =   12
            Top             =   405
            Width           =   2415
         End
         Begin VB.CommandButton Command1 
            Caption         =   "首          页"
            Height          =   280
            Left            =   120
            TabIndex        =   11
            Top             =   120
            Width           =   2415
         End
      End
      Begin VB.TextBox Text3 
         Height          =   270
         IMEMode         =   3  'DISABLE
         Left            =   1320
         PasswordChar    =   "*"
         TabIndex        =   8
         Top             =   1080
         Width           =   1455
      End
      Begin VB.TextBox Text2 
         Height          =   270
         Left            =   1320
         TabIndex        =   7
         Top             =   720
         Width           =   1455
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   1320
         TabIndex        =   6
         Top             =   360
         Width           =   1455
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "操作员密码:"
         Height          =   180
         Left            =   240
         TabIndex        =   5
         Top             =   1080
         Width           =   1080
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "操作员姓名:"
         Height          =   180
         Left            =   240
         TabIndex        =   4
         Top             =   720
         Width           =   1080
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "操作员代码:"
         Height          =   180
         Left            =   240
         TabIndex        =   3
         Top             =   360
         Width           =   1080
      End
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "工资管理系统权限管理"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C000C0&
      Height          =   315
      Left            =   3000
      TabIndex        =   0
      Top             =   0
      Width           =   3300
   End
End
Attribute VB_Name = "Form11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bz1 As Integer
Private Sub Command1_Click()
Data1.Recordset.MoveFirst
Call disp4
End Sub
Sub disp4()
   Text1.Text = Data1.Recordset.Fields(0)
   Text2.Text = Data1.Recordset.Fields(1)
   Text3.Text = Data1.Recordset.Fields(2)
End Sub

Private Sub Command10_Click()
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Command7.Enabled = True
Command8.Enabled = True
Command9.Enabled = False
Command1.SetFocus
Call disp4
End Sub

Private Sub Command2_Click()
   If Data1.Recordset.BOF = False Then Data1.Recordset.MovePrevious
   If Data1.Recordset.BOF = True Then Data1.Recordset.MoveNext
   Call disp4
End Sub

Private Sub Command3_Click()
  If Data1.Recordset.EOF = False Then Data1.Recordset.MoveNext
  If Data1.Recordset.EOF = True Then Data1.Recordset.MovePrevious
  Call disp4
End Sub

Private Sub Command4_Click()
Data1.Recordset.MoveLast
Call disp4
End Sub

Private Sub Command5_Click()
  dm = InputBox("请输入您要查找的操作员的代码")
  Data1.Recordset.FindFirst "czydm=" + "'" + dm + "'"
  If Data1.Recordset.NoMatch = True Then
     MsgBox "查无此操作员"
     Exit Sub
  Else
     Call disp4
  End If
End Sub

Private Sub Command6_Click()
  Command1.Enabled = False
  Command2.Enabled = False
  Command3.Enabled = False
  Command4.Enabled = False
  Command5.Enabled = False
  Command6.Enabled = False
  Command7.Enabled = False
  Command8.Enabled = False
  Command9.Enabled = True
  Command10.Enabled = True
  Text1.Locked = False
  Text2.Locked = False
  Text3.Locked = False
  Text1.SetFocus
  bz1 = 111
End Sub

Private Sub Command7_Click()
   Command1.Enabled = False
  Command2.Enabled = False
  Command3.Enabled = False
  Command4.Enabled = False
  Command5.Enabled = False
  Command6.Enabled = False
  Command7.Enabled = False
  Command8.Enabled = False
  Command9.Enabled = True
  Command10.Enabled = True
  Text1.Locked = False
  Text2.Locked = False
  Text3.Locked = False
  Text1.Text = ""
  Text2.Text = ""
  Text3.Text = ""
  Text1.SetFocus
  bz1 = 222
End Sub

Private Sub Command8_Click()
  k = MsgBox("您确认要删除名称为:" & Text2.Text & "的操作员吗?", vbYesNo + 32)
  If k = 6 Then
     If Text1.Text <> "00" Then
        Data1.Recordset.Delete
        Data1.Refresh
        Call disp4
     Else
        MsgBox "管理员记录不能删除"
        Exit Sub
     End If
  Else
     Call disp4
  End If
End Sub

Private Sub Command9_Click()
If bz1 = 111 Then
   Data1.Recordset.Edit
   Data1.Recordset.Fields(0) = Text1.Text
   Data1.Recordset.Fields(1) = Text2.Text
   Data1.Recordset.Fields(2) = Text3.Text
   Data1.Recordset.Update
End If
If bz1 = 222 Then
   Data1.Recordset.FindFirst "czydm=" + "'" + Text1.Text + "'"
   If Data1.Recordset.NoMatch = False Then
      MsgBox "操作员代码重复,请重新输入"
      Exit Sub
   Else
      Data1.Recordset.AddNew
      Data1.Recordset.Fields(0) = Text1.Text
      Data1.Recordset.Fields(1) = Text2.Text
      Data1.Recordset.Fields(2) = Text3.Text
      Data1.Recordset.Update
   End If
End If
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Command7.Enabled = True
Command8.Enabled = True
Command9.Enabled = False
Command1.SetFocus
Data1.Refresh
End Sub

Private Sub Form_Activate()
Text1.Locked = True
Text2.Locked = True
Text3.Locked = True
Command1.SetFocus
Call disp4
Command9.Enabled = False
End Sub

Private Sub Form_Load()
  Me.Top = 600
  Me.Left = 1100
  Data1.DatabaseName = App.Path + "\gzglxt.mdb"
  Data1.RecordSource = "mmk"
  Data1.Refresh
End Sub

⌨️ 快捷键说明

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