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

📄 f_yanglaojiaofei.frm

📁 用Visual basic6开发的人事信息管理系统,数据库采用的是Sql Server2000
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            End
            Begin VB.Label lblLabels 
               Caption         =   "个人缴纳"
               Height          =   255
               Index           =   12
               Left            =   360
               TabIndex        =   31
               Top             =   3480
               Width           =   975
            End
            Begin VB.Label lblLabels 
               Caption         =   "划入帐户"
               Height          =   255
               Index           =   11
               Left            =   4320
               TabIndex        =   30
               Top             =   2880
               Width           =   975
            End
            Begin VB.Label lblLabels 
               Caption         =   "个人帐户金额小计"
               Height          =   255
               Index           =   10
               Left            =   4320
               TabIndex        =   29
               Top             =   3480
               Width           =   1575
            End
            Begin VB.Label lblLabels 
               Caption         =   "统筹基金"
               Height          =   255
               Index           =   9
               Left            =   360
               TabIndex        =   28
               Top             =   2880
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "职工月缴费基数"
               Height          =   255
               Index           =   8
               Left            =   4320
               TabIndex        =   27
               Top             =   2280
               Width           =   1335
            End
            Begin VB.Label lblLabels 
               Caption         =   "月   数"
               Height          =   255
               Index           =   7
               Left            =   360
               TabIndex        =   26
               Top             =   2280
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "缴费结束时间"
               Height          =   255
               Index           =   6
               Left            =   4320
               TabIndex        =   25
               Top             =   1680
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "缴费开始时间"
               Height          =   255
               Index           =   5
               Left            =   360
               TabIndex        =   24
               Top             =   1680
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "姓   名"
               Height          =   255
               Index           =   3
               Left            =   4320
               TabIndex        =   23
               Top             =   480
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "员工号"
               Height          =   255
               Index           =   2
               Left            =   360
               TabIndex        =   22
               Top             =   480
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "社会保障号码"
               Height          =   255
               Index           =   1
               Left            =   4320
               TabIndex        =   21
               Top             =   1080
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "电脑序号"
               Height          =   255
               Index           =   0
               Left            =   360
               TabIndex        =   20
               Top             =   1080
               Width           =   1095
            End
         End
      End
   End
End
Attribute VB_Name = "F_YangLaoJiaoFei"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents adoPrimaryRS As Recordset
Attribute adoPrimaryRS.VB_VarHelpID = -1

Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean

'统筹基金比例
 Dim tcjj  As Double
 '划入帐户比例
 Dim hrzh  As Double
 '个人缴纳比例
 Dim grjn  As Double

Private Sub DTPicker1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    SendKeys "{TAB}"
End If
End Sub

Private Sub DTPicker2_Change()
Dim Sql3 As String
 
  
If DTPicker2.Value <> "" Then
    Sql3 = "select  distinct 统筹基金比例 ,划入帐户比例 ,个人缴纳比例 from 养老保险公司比例  where 年度 = " & Year(DTPicker2.Value)
   
    Set rs3 = db.Execute(Sql3)

  If Not rs3.EOF Then
    
    If Not IsNull(rs3("统筹基金比例")) Then
    tcjj = Trim(rs3("统筹基金比例")) / 100
    End If
    
    If Not IsNull(rs3("划入帐户比例")) Then
       hrzh = Trim(rs3("划入帐户比例")) / 100
    End If
    
    If Not IsNull(rs3("个人缴纳比例")) Then
       grjn = Trim(rs3("个人缴纳比例")) / 100
    End If
    
    If IsNumeric(txtFields(7)) And IsNumeric(txtFields(8)) Then
  
   txtFields(9) = CDbl(txtFields(7)) * CDbl(txtFields(8)) * tcjj
   txtFields(11) = CDbl(txtFields(7)) * CDbl(txtFields(8)) * hrzh
   txtFields(12) = CDbl(txtFields(7)) * CDbl(txtFields(8)) * grjn
 
   txtFields(10) = CDbl(txtFields(11)) + CDbl(txtFields(12))
  End If
  
 
   Else
      MsgBox "公司比例中没有此年的记录,请输入后再进行缴费记录的填写!"
   
   End If
 
End If

End Sub

Private Sub DTPicker2_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    SendKeys "{TAB}"
End If
End Sub

Private Sub Form_Load()
On Error Resume Next
    For Each TextBox In Me.Controls
        TextBox.Font.Name = "宋体"
        TextBox.Font.Size = 9
    Next
  
  Set adoPrimaryRS = New Recordset
  adoPrimaryRS.Open "select * from 养老保险缴费情况表", db, adOpenStatic, adLockOptimistic
  Set DataGrid1.DataSource = adoPrimaryRS
  
  SetButtons True

  
  Dim oText As TextBox
  'Bind the text boxes to the data provider
  For Each oText In Me.txtFields
    Set oText.DataSource = adoPrimaryRS
  Next
      Set DTPicker1.DataSource = adoPrimaryRS
      Set DTPicker2.DataSource = adoPrimaryRS

End Sub

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

Private Sub cmdAdd_Click()
  On Error GoTo AddErr
 With adoPrimaryRS
    If Not (.BOF And .EOF) Then
      mvBookMark = .Bookmark
    End If
    .AddNew

    mbAddNewFlag = True
    SetButtons False
  End With
  On Error GoTo 0
  Exit Sub
AddErr:
  MsgBox "增加操作有错误", vbExclamation + vbOKOnly, pTitle
  
End Sub

Private Sub cmdDelete_Click()
  On Error GoTo DeleteErr
  If MsgBox("确认是否删除此记录信息?", vbYesNo + vbQuestion, "系统提示") = vbNo Then Exit Sub
  With adoPrimaryRS
    .Delete
    .MoveNext
    If .EOF Then .MoveLast
  End With
  On Error GoTo 0
  Exit Sub
DeleteErr:
  MsgBox "删除操作有错误", vbExclamation + vbOKOnly, pTitle
End Sub

Private Sub cmdRefresh_Click()
  'This is only needed for multi user apps
  On Error GoTo RefreshErr
  adoPrimaryRS.Requery
  On Error GoTo 0
  Exit Sub
RefreshErr:
   MsgBox "刷新操作有错误", vbExclamation + vbOKOnly, pTitle
End Sub

Private Sub cmdEdit_Click()
  On Error GoTo EditErr
  mbEditFlag = True
  SetButtons False
  On Error GoTo 0
  Exit Sub

EditErr:
   MsgBox "更改操作有错误", vbExclamation + vbOKOnly, pTitle
End Sub
Private Sub cmdCancel_Click()
 ' On Error Resume Next
 On Error GoTo CancelErr


  mbEditFlag = False
  mbAddNewFlag = False
  adoPrimaryRS.CancelUpdate

  If mvBookMark > 0 Then
   adoPrimaryRS.Bookmark = mvBookMark
  Else
   adoPrimaryRS.MoveFirst
  End If
 SetButtons True
  Exit Sub
CancelErr:
   
   MsgBox "取消操作有错误", vbExclamation + vbOKOnly, pTitle

End Sub

Private Sub cmdUpdate_Click()
  On Error GoTo UpdateErr
  If MsgBox("是否确认此操作?", vbYesNo + vbQuestion, "系统提示") = vbNo Then Exit Sub
  adoPrimaryRS.UpdateBatch adAffectAll

  If mbAddNewFlag Then
    adoPrimaryRS.MoveLast              'move to the new record
  End If

  mbEditFlag = False
  mbAddNewFlag = False
  SetButtons True

  On Error GoTo 0
  Exit Sub
UpdateErr:
   MsgBox "保存操作有错误", vbExclamation + vbOKOnly, pTitle
End Sub

Private Sub cmdClose_Click()
  RSGL.Enabled = True
  Unload Me
End Sub

Private Sub SetButtons(bVal As Boolean)
  CmdAdd.Visible = bVal
  cmdEdit.Visible = bVal
  cmdUpdate.Visible = Not bVal
  cmdCancel.Visible = Not bVal
  CmdDelete.Visible = bVal
  cmdClose.Visible = bVal
  cmdRefresh.Visible = bVal
  If bVal Then
   Set DataGrid1.DataSource = adoPrimaryRS
  Else
   Set DataGrid1.DataSource = Nothing
  End If
  
  txtFields(0).Enabled = Not bVal
  txtFields(1).Enabled = Not bVal
  txtFields(2).Enabled = Not bVal
  txtFields(3).Enabled = Not bVal
  txtFields(7).Enabled = Not bVal
  txtFields(8).Enabled = Not bVal
  DTPicker1.Enabled = Not bVal
  DTPicker2.Enabled = Not bVal
  
End Sub


Private Sub txtFields_Change(Index As Integer)
  If IsNumeric(txtFields(7)) And IsNumeric(txtFields(8)) Then
  
   txtFields(9) = CDbl(txtFields(7)) * CDbl(txtFields(8)) * tcjj
   txtFields(11) = CDbl(txtFields(7)) * CDbl(txtFields(8)) * hrzh
   txtFields(12) = CDbl(txtFields(7)) * CDbl(txtFields(8)) * grjn
 
   txtFields(10) = CDbl(txtFields(11)) + CDbl(txtFields(12))
  End If
End Sub

Private Sub txtFields_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    SendKeys "{TAB}"
End If
End Sub

Private Sub txtFields_LostFocus(Index As Integer)


If Not IsNumeric(txtFields(7).Text) And (txtFields(7).Text <> "") Then
    MsgBox "请在“月数”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtFields(7).SetFocus
     txtFields(7).SelLength = Len(txtFields(7))
     txtFields(7).SelStart = 0
End If

If Not IsNumeric(txtFields(8).Text) And (txtFields(8).Text <> "") Then
    MsgBox "请在“职工月缴费基数”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtFields(8).SetFocus
     txtFields(8).SelLength = Len(txtFields(8))
     txtFields(8).SelStart = 0
End If

End Sub

⌨️ 快捷键说明

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