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

📄 formyggzdj.frm

📁 企业员工信息管理系统.可以对企业的员工的各种信息进行管理
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form员工工资登记 
   Caption         =   "员工工资登记"
   ClientHeight    =   5565
   ClientLeft      =   3840
   ClientTop       =   3060
   ClientWidth     =   7740
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   Picture         =   "Formyggzdj.frx":0000
   ScaleHeight     =   5565
   ScaleWidth      =   7740
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   495
      Left            =   720
      Top             =   4920
      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    =   "employermessege"
      Caption         =   "Adodc2"
      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 MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   720
      Top             =   4080
      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 VB.CommandButton Command3 
      BackColor       =   &H00FFC0C0&
      Caption         =   "取消"
      Height          =   495
      Left            =   4800
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   4680
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00FFC0C0&
      Caption         =   "退出"
      Height          =   495
      Left            =   6360
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   4680
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "提交"
      Default         =   -1  'True
      Height          =   495
      Left            =   3240
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   4680
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "0.00;(0.00)"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   2052
         SubFormatType   =   1
      EndProperty
      DataSource      =   "Adodc1"
      Height          =   495
      Left            =   5280
      TabIndex        =   5
      Top             =   3000
      Width           =   2295
   End
   Begin VB.TextBox Text2 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "0.00;(0.00)"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   2052
         SubFormatType   =   1
      EndProperty
      DataSource      =   "Adodc1"
      Height          =   495
      Left            =   5280
      TabIndex        =   4
      Top             =   2160
      Width           =   2295
   End
   Begin VB.TextBox Text1 
      DataSource      =   "Adodc1"
      Height          =   495
      Left            =   5280
      TabIndex        =   3
      Top             =   1320
      Width           =   2295
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "奖       金:"
      BeginProperty Font 
         Name            =   "华文新魏"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   3840
      TabIndex        =   2
      Top             =   3120
      Width           =   1575
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "基本工资:"
      BeginProperty Font 
         Name            =   "华文新魏"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   495
      Left            =   3840
      TabIndex        =   1
      Top             =   2280
      Width           =   1455
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "员工编号:"
      BeginProperty Font 
         Name            =   "华文新魏"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   3840
      TabIndex        =   0
      Top             =   1440
      Width           =   1455
   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()
'判断员工编号是否为空
If Len(Text1.Text) = 0 Then
  MsgBox "员工编号不能为空!", vbOKOnly + vbExclamation, "警告"
  Text1.SetFocus
  Exit Sub
End If

'查看数据库看是否有此编号的员工存在
Adodc2.CommandType = adCmdText
Adodc2.RecordSource = "select * from employermessege where eid='" & Trim(Text1.Text) & "'"
Adodc2.Refresh
If Adodc2.Recordset.EOF = True Then
 MsgBox "此员工不存在,不能进行登记,请先填写正确员工编号!", vbOKOnly + vbExclamation, "警告"
 Text1.Text = ""
 Text1.SetFocus
Exit Sub
End If
'查看数据库看此编号是否已经登记
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from employerpay where pid='" & Trim(Text1.Text) & "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF = False Then
 MsgBox "此员工已经登记!", vbOKOnly + vbExclamation, "警告"
 Text1.Text = ""
 Text1.SetFocus
Exit Sub
End If

'判断基本工资是否为空
If Len(Text2.Text) = 0 Then
  MsgBox "基本工资不能为空!", vbOKOnly + vbExclamation, "警告"
  Text2.SetFocus
  Exit Sub
End If

'判断基本工资是否为空
If Len(Text3.Text) = 0 Then
  MsgBox "奖金不能为空!", vbOKOnly + vbExclamation, "警告"
  Text3.SetFocus
  Exit Sub

'输入信息
Else

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
Adodc1.Refresh
MsgBox "恭喜你,工资登记成功!", vbOKOnly + vbExclamation, "提示"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Form用户管理.Show
Me.Hide
End If
End Sub

Private Sub Command2_Click()
Form用户管理.Show
Me.Hide
End Sub

Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub

⌨️ 快捷键说明

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