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

📄 frmsalarymanage.frm

📁 实现了对人力资源的管理
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         ScrollGroup     =   2
         Size            =   3
         BeginProperty Column00 
            ColumnWidth     =   1260.284
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   945.071
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1214.929
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   1184.882
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   810.142
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   1005.165
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   884.976
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   689.953
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   420
      Left            =   0
      TabIndex        =   43
      Top             =   0
      Width           =   8475
      _ExtentX        =   14949
      _ExtentY        =   741
      ButtonWidth     =   609
      ButtonHeight    =   582
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   1
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "btnSave"
            ImageIndex      =   1
         EndProperty
      EndProperty
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   5880
         Top             =   0
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   16
         ImageHeight     =   16
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   2
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmSalaryManage.frx":016A
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmSalaryManage.frx":027C
               Key             =   ""
            EndProperty
         EndProperty
      End
   End
   Begin VB.Label Label2 
      Caption         =   "倒入月份"
      Height          =   255
      Left            =   2160
      TabIndex        =   45
      Top             =   600
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "当前月份"
      Height          =   255
      Left            =   120
      TabIndex        =   44
      Top             =   600
      Width           =   855
   End
   Begin VB.Label lblLabels 
      Caption         =   "工伤保险:"
      Height          =   255
      Index           =   22
      Left            =   7200
      TabIndex        =   40
      Top             =   4200
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "生育保险:"
      Height          =   255
      Index           =   21
      Left            =   6120
      TabIndex        =   38
      Top             =   4200
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "失业保险:"
      Height          =   255
      Index           =   20
      Left            =   4920
      TabIndex        =   36
      Top             =   4200
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "养老保险:"
      Height          =   255
      Index           =   19
      Left            =   3720
      TabIndex        =   34
      Top             =   4200
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "医疗保险:"
      Height          =   255
      Index           =   18
      Left            =   2520
      TabIndex        =   32
      Top             =   4200
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "住房公积金:"
      Height          =   255
      Index           =   17
      Left            =   1320
      TabIndex        =   30
      Top             =   4200
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "罚款:"
      Height          =   255
      Index           =   16
      Left            =   360
      TabIndex        =   28
      Top             =   4200
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "考勤扣除:"
      Height          =   255
      Index           =   15
      Left            =   7320
      TabIndex        =   26
      Top             =   3600
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "请假扣除:"
      Height          =   255
      Index           =   14
      Left            =   6120
      TabIndex        =   24
      Top             =   3600
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "水电费:"
      Height          =   255
      Index           =   13
      Left            =   4920
      TabIndex        =   22
      Top             =   3600
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "房租:"
      Height          =   255
      Index           =   12
      Left            =   3960
      TabIndex        =   20
      Top             =   3600
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "奖金:"
      Height          =   255
      Index           =   10
      Left            =   2760
      TabIndex        =   18
      Top             =   3600
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "考核工资:"
      Height          =   255
      Index           =   9
      Left            =   1440
      TabIndex        =   16
      Top             =   3600
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "工龄工资:"
      Height          =   255
      Index           =   8
      Left            =   120
      TabIndex        =   14
      Top             =   3600
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "职务工资:"
      Height          =   255
      Index           =   7
      Left            =   7320
      TabIndex        =   12
      Top             =   3000
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "临时补:"
      Height          =   255
      Index           =   6
      Left            =   6240
      TabIndex        =   10
      Top             =   3000
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "房补:"
      Height          =   255
      Index           =   5
      Left            =   5160
      TabIndex        =   8
      Top             =   3000
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "粮副补:"
      Height          =   255
      Index           =   4
      Left            =   3840
      TabIndex        =   6
      Top             =   3000
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "合同补:"
      Height          =   255
      Index           =   3
      Left            =   2640
      TabIndex        =   4
      Top             =   3000
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "浮动工资:"
      Height          =   255
      Index           =   2
      Left            =   1320
      TabIndex        =   2
      Top             =   3000
      Width           =   1005
   End
   Begin VB.Label lblLabels 
      Caption         =   "基本工资:"
      Height          =   255
      Index           =   1
      Left            =   120
      TabIndex        =   0
      Top             =   3000
      Width           =   1005
   End
End
Attribute VB_Name = "frmSalaryManage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub btnCalSalary_Click()
    Dim db As New DataBases
    datPrimaryRS.Recordset.UpdateBatch adAffectAll
    '执行存储过程
    db.RunSelectSQL ("exec sf_当月工资统计")
    db.CloseConn
    MsgBox "计算完成"
    datPrimaryRS.Recordset.Requery
End Sub

Private Sub btnGetSalary_Click()
'判断倒入工资历史的条件
    If Len(Trim(txbNowSalary.Text)) <> 6 Or _
    Len(Trim(txbOldSalary.Text)) <> 6 Then
        Exit Sub
    End If
'执行存储过程
    Dim db As New DataBases
    Dim strSQL As String
    strSQL = "exec sf_形成月工资统计表 "
    strSQL = strSQL + Trim(txbOldSalary.Text) + "," + Trim(txbNowSalary.Text)
    db.RunSelectSQL (strSQL)
    db.CloseConn
    datPrimaryRS.Recordset.UpdateBatch adAffectAll
    MsgBox "倒入成功"
    datPrimaryRS.Recordset.Requery
End Sub

Private Sub btnGiveSalary_Click()
    If MsgBox("是否发放?", vbYesNo) = vbYes Then
        Dim db As New DataBases
        Dim strSQL As String
        strSQL = "exec sf_当月工资发放 '"
        strSQL = strSQL + datPrimaryRS.Recordset("职员编号") + "'"
        db.RunSelectSQL (strSQL)
        db.CloseConn
        datPrimaryRS.Recordset.UpdateBatch adAffectAll
        MsgBox "发放成功"
        datPrimaryRS.Recordset.Requery
    Else
        Exit Sub
    End If
End Sub

Private Sub Form_Load()
    Set grdDataGrid.DataSource = datPrimaryRS
End Sub

Private Sub Form_Resize()
  On Error Resume Next
  '当窗体调整时会调整网格
  grdDataGrid.Width = Me.ScaleWidth
'  grdDataGrid.Height = Me.ScaleHeight - grdDataGrid.Top - datPrimaryRS.Height - 30 - picButtons.Height
End Sub

Private Sub Form_Unload(Cancel As Integer)
  Screen.MousePointer = vbDefault
End Sub

Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
  '错误处理程序代码置于此处
  '想要忽略错误,注释掉下一行
  '想要捕获它们,在此添加代码以处理它们
  MsgBox "Data error event hit err:" & Description
End Sub

Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
  '为这个 recordset 显示当前记录位置
  datPrimaryRS.Caption = "Record: " & CStr(datPrimaryRS.Recordset.AbsolutePosition)
End Sub

Private Sub datPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
  '验证代码置于此处
  '下列动作发生时该事件被调用
  Dim bCancel As Boolean

  Select Case adReason
  Case adRsnAddNew
  Case adRsnClose
  Case adRsnDelete
  Case adRsnFirstChange
  Case adRsnMove
  Case adRsnRequery
  Case adRsnResynch
  Case adRsnUndoAddNew
  Case adRsnUndoDelete
  Case adRsnUndoUpdate
  Case adRsnUpdate
  End Select

  If bCancel Then adStatus = adStatusCancel
End Sub

Private Sub cmdAdd_Click()
  On Error GoTo AddErr
  datPrimaryRS.Recordset.AddNew

  Exit Sub
AddErr:
  MsgBox Err.Description
End Sub

Private Sub cmdDelete_Click()
  On Error GoTo DeleteErr
  With datPrimaryRS.Recordset
    .Delete
    .MoveNext
    If .EOF Then .MoveLast
  End With
  Exit Sub
DeleteErr:
  MsgBox Err.Description
End Sub

Private Sub cmdRefresh_Click()
  '只有多用户应用程序需要
  On Error GoTo RefreshErr
  datPrimaryRS.Refresh
  Set grdDataGrid.DataSource = datPrimaryRS.Recordset("ChildCMD").UnderlyingValue
  Exit Sub
RefreshErr:
  MsgBox Err.Description
End Sub

Private Sub cmdUpdate_Click()
  On Error GoTo UpdateErr

  datPrimaryRS.Recordset.UpdateBatch adAffectAll
  Exit Sub
UpdateErr:
  MsgBox Err.Description
End Sub

Private Sub cmdClose_Click()
  Unload Me
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
'判断按下的是否为“Save”按钮
    If StrComp(Button.Key, "btnSave") = 0 Then
        datPrimaryRS.Recordset.UpdateBatch adAffectAll
    End If
End Sub

⌨️ 快捷键说明

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