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

📄 formyggzgl.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 Form员工工资管理 
   BackColor       =   &H00FFC0C0&
   Caption         =   "员工工资管理"
   ClientHeight    =   5565
   ClientLeft      =   3840
   ClientTop       =   2880
   ClientWidth     =   7740
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5565
   ScaleWidth      =   7740
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame2 
      Caption         =   "管理员管理"
      Height          =   1815
      Left            =   3960
      TabIndex        =   2
      Top             =   3600
      Width           =   3615
      Begin VB.CommandButton Command8 
         BackColor       =   &H00FFC0C0&
         Caption         =   "退出"
         Height          =   495
         Left            =   2640
         Style           =   1  'Graphical
         TabIndex        =   16
         Top             =   1080
         Width           =   735
      End
      Begin VB.CommandButton Command7 
         BackColor       =   &H00FFC0C0&
         Caption         =   "删除"
         Height          =   495
         Left            =   1800
         Style           =   1  'Graphical
         TabIndex        =   15
         Top             =   1080
         Width           =   735
      End
      Begin VB.CommandButton Command6 
         BackColor       =   &H00FFC0C0&
         Caption         =   "确定修改"
         Height          =   495
         Left            =   960
         Style           =   1  'Graphical
         TabIndex        =   14
         Top             =   1080
         Width           =   735
      End
      Begin VB.CommandButton Command5 
         BackColor       =   &H00FFC0C0&
         Caption         =   "修改"
         Height          =   495
         Left            =   120
         Style           =   1  'Graphical
         TabIndex        =   13
         Top             =   1080
         Width           =   735
      End
      Begin VB.CommandButton Command4 
         BackColor       =   &H00FFC0C0&
         Caption         =   "最后一条记录"
         Height          =   495
         Left            =   2640
         Style           =   1  'Graphical
         TabIndex        =   12
         Top             =   360
         Width           =   735
      End
      Begin VB.CommandButton Command3 
         BackColor       =   &H00FFC0C0&
         Caption         =   "下一条记录"
         Height          =   495
         Left            =   1800
         Style           =   1  'Graphical
         TabIndex        =   11
         Top             =   360
         Width           =   735
      End
      Begin VB.CommandButton Command2 
         BackColor       =   &H00FFC0C0&
         Caption         =   "上一条记录"
         Height          =   495
         Left            =   960
         Style           =   1  'Graphical
         TabIndex        =   10
         Top             =   360
         Width           =   735
      End
      Begin VB.CommandButton Command1 
         BackColor       =   &H00FFC0C0&
         Caption         =   "第一条记录"
         Height          =   495
         Left            =   120
         Style           =   1  'Graphical
         TabIndex        =   9
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "工资信息"
      Height          =   3375
      Left            =   3960
      TabIndex        =   1
      Top             =   120
      Width           =   3615
      Begin VB.TextBox Text3 
         DataField       =   "prize"
         DataSource      =   "Adodc1"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   1200
         TabIndex        =   8
         Top             =   2280
         Width           =   2295
      End
      Begin VB.TextBox Text2 
         DataField       =   "pay"
         DataSource      =   "Adodc1"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   1200
         TabIndex        =   7
         Top             =   1440
         Width           =   2295
      End
      Begin VB.TextBox Text1 
         DataField       =   "pid"
         DataSource      =   "Adodc1"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   1200
         TabIndex        =   6
         Top             =   600
         Width           =   2295
      End
      Begin VB.Label Label3 
         Caption         =   "奖    金:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         TabIndex        =   5
         Top             =   2400
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "基本工资:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   120
         TabIndex        =   4
         Top             =   1560
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "员工编号:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   120
         TabIndex        =   3
         Top             =   720
         Width           =   1095
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   600
      Top             =   4800
      Visible         =   0   'False
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   873
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=employer;Data Source=(local)"
      OLEDBString     =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=employer;Data Source=(local)"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "employerpay"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Formyggzgl.frx":0000
      Height          =   5295
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3735
      _ExtentX        =   6588
      _ExtentY        =   9340
      _Version        =   393216
      BackColor       =   16761024
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   3
      BeginProperty Column00 
         DataField       =   "pid"
         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       =   "pay"
         Caption         =   "基本工资"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02 
         DataField       =   "prize"
         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 
            ColumnWidth     =   1005.165
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1200.189
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1305.071
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "Form员工工资管理"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.MoveFirst
End Sub

Private Sub Command2_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
Adodc1.Recordset.MoveLast
End If
End Sub

Private Sub Command3_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveFirst
End If
End Sub

Private Sub Command4_Click()
Adodc1.Recordset.MoveLast
End Sub

Private Sub Command5_Click()
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command7.Enabled = False
Text1.DataField = ""
Text2.DataField = ""
Text3.DataField = ""
End Sub

Private Sub Command6_Click()
Dim res As String
 res = MsgBox("你确定要更新此信息吗?", vbQuestion + vbYesNo, "提示")
If res = vbYes Then
  Adodc1.Recordset.Delete
  Adodc1.RecordSource = "select * from employerpay where pid='" & Trim(Text1.Text) & "'"
  If Adodc1.Recordset.EOF = True Then
    MsgBox "此员工编号已经存在,请另外选择用户名!", vbOKOnly + vbExclamation, "警告"
    Text1.SetFocus
    Exit Sub
  End If
  Adodc1.Recordset.AddNew
  Adodc1.Recordset.Fields("pid") = Trim(Text1.Text)
  Adodc1.Recordset.Fields("pay") = Trim(Text2.Text)
  Adodc1.Recordset.Fields("prize") = Trim(Text3.Text)
  Adodc1.Recordset.Update
  MsgBox "信息修改成功!", vbOKOnly + vbExclamation, "提示"
  Adodc1.Recordset.MoveLast
  End If
  Text1.Enabled = False
  Text2.Enabled = False
  Text3.Enabled = False
  Command1.Enabled = True
  Command2.Enabled = True
  Command3.Enabled = True
  Command4.Enabled = True
  Command5.Enabled = True
  Command7.Enabled = True
  Text1.DataField = "pid"
  Text2.DataField = "pay"
  Text3.DataField = "prize"
End Sub

Private Sub Command7_Click()
Dim res As String
 res = MsgBox("你确定要删除此信息吗?", vbQuestion + vbYesNo, "提示")
If res = vbYes Then
    Adodc1.Recordset.Delete
    Adodc1.Recordset.MoveNext
  If Adodc1.Recordset.EOF Then
    Adodc1.Recordset.MoveFirst
       If Adodc1.Recordset.BOF Then
          Exit Sub
       End If
  End If

End If
  
End Sub

Private Sub Command8_Click()
  Text1.Enabled = False
  Text2.Enabled = False
  Text3.Enabled = False
  Command1.Enabled = True
  Command2.Enabled = True
  Command3.Enabled = True
  Command4.Enabled = True
  Command5.Enabled = True
  Command7.Enabled = True
  Form管理员管理.Show
  Me.Hide
End Sub

Private Sub Form_Load()
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
End Sub



⌨️ 快捷键说明

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