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

📄 frm_gzhs.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 Frm_gzhs 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "员工工资核算管理"
   ClientHeight    =   4830
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   7530
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4830
   ScaleWidth      =   7530
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text4 
      Enabled         =   0   'False
      Height          =   270
      Left            =   3990
      TabIndex        =   23
      Top             =   4470
      Width           =   1260
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   210
      Top             =   5265
      Width           =   2595
      _ExtentX        =   4577
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      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.TextBox Text3 
      Enabled         =   0   'False
      Height          =   270
      Left            =   2520
      TabIndex        =   20
      Top             =   4470
      Width           =   660
   End
   Begin VB.TextBox Text2 
      Enabled         =   0   'False
      Height          =   270
      Left            =   930
      TabIndex        =   19
      Top             =   4470
      Width           =   645
   End
   Begin VB.CommandButton cmd_qx 
      Caption         =   "取消"
      Height          =   345
      Left            =   6450
      TabIndex        =   16
      Top             =   4395
      Width           =   990
   End
   Begin VB.CommandButton cmd_hs 
      Caption         =   "核算"
      Height          =   345
      Left            =   5475
      TabIndex        =   15
      Top             =   4395
      Width           =   990
   End
   Begin VB.Frame Frame1 
      Height          =   1605
      Left            =   60
      TabIndex        =   0
      Top             =   30
      Width           =   7395
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   1050
         Style           =   2  'Dropdown List
         TabIndex        =   7
         Top             =   195
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   300
         Index           =   0
         Left            =   1050
         TabIndex        =   6
         Top             =   720
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   300
         Index           =   1
         Left            =   3300
         TabIndex        =   5
         Top             =   720
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   300
         Index           =   2
         Left            =   5775
         TabIndex        =   4
         Top             =   720
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   300
         Index           =   3
         Left            =   1050
         TabIndex        =   3
         Top             =   1185
         Width           =   1440
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   300
         Index           =   4
         Left            =   3405
         TabIndex        =   2
         Top             =   1185
         Width           =   1335
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   300
         Index           =   5
         Left            =   5775
         TabIndex        =   1
         Top             =   1185
         Width           =   1440
      End
      Begin VB.Label Label1 
         Caption         =   "员工姓名"
         Height          =   300
         Left            =   195
         TabIndex        =   14
         Top             =   270
         Width           =   1020
      End
      Begin VB.Label Label2 
         Caption         =   "基本工资"
         Height          =   240
         Left            =   210
         TabIndex        =   13
         Top             =   795
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "奖金"
         Height          =   240
         Left            =   2655
         TabIndex        =   12
         Top             =   795
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "伙食补助"
         Height          =   240
         Left            =   4890
         TabIndex        =   11
         Top             =   795
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "津贴"
         Height          =   240
         Left            =   210
         TabIndex        =   10
         Top             =   1260
         Width           =   735
      End
      Begin VB.Label Label6 
         Caption         =   "项目奖金"
         Height          =   240
         Left            =   2610
         TabIndex        =   9
         Top             =   1260
         Width           =   735
      End
      Begin VB.Label Label7 
         Caption         =   "出差补助"
         Height          =   240
         Left            =   4890
         TabIndex        =   8
         Top             =   1260
         Width           =   735
      End
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Frm_gzhs.frx":0000
      Height          =   2700
      Left            =   75
      TabIndex        =   22
      Top             =   1665
      Width           =   7365
      _ExtentX        =   12991
      _ExtentY        =   4763
      _Version        =   393216
      AllowUpdate     =   0   'False
      AllowArrows     =   0   'False
      HeadLines       =   1
      RowHeight       =   15
      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     =   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
   Begin VB.Label Label10 
      Caption         =   "月份"
      Height          =   210
      Left            =   3360
      TabIndex        =   21
      Top             =   4530
      Width           =   900
   End
   Begin VB.Label Label9 
      Caption         =   "迟到次数"
      Height          =   210
      Left            =   1680
      TabIndex        =   18
      Top             =   4530
      Width           =   900
   End
   Begin VB.Label Label8 
      Caption         =   "请假天数"
      Height          =   210
      Left            =   75
      TabIndex        =   17
      Top             =   4530
      Width           =   900
   End
End
Attribute VB_Name = "Frm_gzhs"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim YKPays    '定义一个应扣工资的变量
Private Sub cmd_hs_Click()
Dim AllPays
'计算实法工资
AllPays = Val(Text1(0).Text) + Val(Text1(1).Text) + Val(Text1(2).Text) + Val(Text1(3).Text) + _
Val(Text1(4).Text) + Val(Text1(5).Text) - YKPays
'修改实发工资信息
Set DB_AdoRs = Cnn.Execute("UPDATE 出勤信息 SET 实发工资='" + Str(AllPays) + "' where 员工编号='" + YgNums + "' and 月份='" + Mid(Str(Date), 1, 7) + "'")
MsgBox "操作成功", 64, "提示信息"
End Sub

Private Sub cmd_qx_Click()
  Unload Me
End Sub

Private Sub Combo1_Click()
  '获得员工编号
   DB_AdoRs.Open "select * from 员工信息 where 员工姓名='" + Combo1.Text + "'", Cnn, adOpenKeyset
  If DB_AdoRs.RecordCount > 0 Then
    YgNums = DB_AdoRs.Fields("员工编号")
  End If
  DB_AdoRs.Close
  '判断该员工的工资信息是否已经存在
  DB_AdoRs.Open "select * from 工资信息 where 员工编号='" + YgNums + "'", Cnn, adOpenKeyset
  If DB_AdoRs.RecordCount > 0 Then
    Text1(0).Text = DB_AdoRs.Fields("基本工资")
    Text1(1).Text = DB_AdoRs.Fields("奖金")
    Text1(2).Text = DB_AdoRs.Fields("伙食补助")
    Text1(3).Text = DB_AdoRs.Fields("津贴")
    Text1(4).Text = DB_AdoRs.Fields("项目奖金")
    Text1(5).Text = DB_AdoRs.Fields("出差补助")
  End If
  DB_AdoRs.Close
  '加载考勤信息
  DB_AdoRs.Open "select * from 出勤信息 where 员工编号='" + YgNums + "' and 月份='" + Mid(Str(Date), 1, 7) + "'", Cnn, adOpenKeyset
  If DB_AdoRs.RecordCount > 0 Then
    Text2.Text = DB_AdoRs.Fields("请假天数")
    Text3.Text = DB_AdoRs.Fields("迟到次数")
    Text4.Text = DB_AdoRs.Fields("月份")
  End If
  DB_AdoRs.Close
 DB_AdoRs.Open "select * from 扣款标准", Cnn, adOpenKeyset
 If DB_AdoRs.RecordCount > 0 Then
   YKPays = Val(Text3.Text) * Val(DB_AdoRs.Fields("迟到扣除")) + Val(Text2.Text) * Val(DB_AdoRs.Fields("请假扣除"))
 End If
 DB_AdoRs.Close
End Sub

Private Sub Form_Load()
   Adodc1.ConnectionString = MyStrs
   Adodc1.RecordSource = "select * from 员工信息 order by 员工编号"
   Adodc1.Refresh
  For i = 1 To Adodc1.Recordset.RecordCount
    Combo1.AddItem Adodc1.Recordset.Fields("员工姓名")
    Adodc1.Recordset.MoveNext
  Next i
End Sub

⌨️ 快捷键说明

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