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

📄 f_dabingyiliao.frm

📁 公司人员综合管理系统 提供公司人员的简历、工资账目、考勤、医疗纪录、失业保险等情况
💻 FRM
📖 第 1 页 / 共 2 页
字号:
               Top             =   1680
               Width           =   2055
            End
            Begin VB.TextBox txtFields 
               DataField       =   "在职职工数"
               Height          =   285
               Index           =   2
               Left            =   1560
               TabIndex        =   7
               Top             =   1680
               Width           =   2055
            End
            Begin VB.TextBox txtFields 
               DataField       =   "年度"
               Height          =   285
               Index           =   0
               Left            =   1560
               TabIndex        =   4
               Top             =   1080
               Width           =   2055
            End
            Begin VB.Label lblLabels 
               Caption         =   "企业编号:"
               Height          =   255
               Index           =   7
               Left            =   240
               TabIndex        =   27
               Top             =   480
               Width           =   1815
            End
            Begin VB.Label lblLabels 
               Caption         =   "应缴金额合计:"
               Height          =   255
               Index           =   6
               Left            =   240
               TabIndex        =   25
               Top             =   2880
               Width           =   1815
            End
            Begin VB.Label lblLabels 
               Caption         =   "个人应缴额:"
               Height          =   255
               Index           =   5
               Left            =   4080
               TabIndex        =   12
               Top             =   2280
               Width           =   1815
            End
            Begin VB.Label lblLabels 
               Caption         =   "单位应缴额:"
               Height          =   255
               Index           =   4
               Left            =   240
               TabIndex        =   10
               Top             =   2280
               Width           =   1335
            End
            Begin VB.Label lblLabels 
               Caption         =   "上年月平均工资总额:"
               Height          =   255
               Index           =   3
               Left            =   4080
               TabIndex        =   8
               Top             =   1680
               Width           =   1815
            End
            Begin VB.Label lblLabels 
               Caption         =   "在职职工数:"
               Height          =   255
               Index           =   2
               Left            =   240
               TabIndex        =   6
               Top             =   1680
               Width           =   1815
            End
            Begin VB.Label lblLabels 
               Caption         =   "时间:"
               Height          =   255
               Index           =   1
               Left            =   4080
               TabIndex        =   5
               Top             =   1080
               Width           =   1815
            End
            Begin VB.Label lblLabels 
               Caption         =   "年度:"
               Height          =   255
               Index           =   0
               Left            =   240
               TabIndex        =   3
               Top             =   1080
               Width           =   1815
            End
         End
      End
   End
End
Attribute VB_Name = "F_DaBingYiLiao"
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


Private Sub Form_Load()
Dim oText As TextBox

  
  Set adoPrimaryRS = New Recordset
  adoPrimaryRS.Open "select * from 大病医疗记录 Order by 年度", db, adOpenStatic, adLockOptimistic

  
 Set DataGrid1.DataSource = adoPrimaryRS
 
 SetButtons True
 
   
  'Bind the text boxes to the data provider
  For Each oText In Me.txtFields
    Set oText.DataSource = adoPrimaryRS
  Next
  
  
    Set DTPicker1.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

  Exit Sub
AddErr:
  MsgBox "增加操作有错误", vbExclamation + vbOKOnly, pTitle
  
End Sub

Private Sub cmdDelete_Click()
  On Error GoTo DeleteErr
  With adoPrimaryRS
    .Delete
    .MoveNext
    If .EOF Then .MoveLast
  End With
  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
  Exit Sub
RefreshErr:
   MsgBox "刷新操作有错误", vbExclamation + vbOKOnly, pTitle
End Sub

Private Sub cmdEdit_Click()
  On Error GoTo EditErr
  mbEditFlag = True
  SetButtons False
  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

  adoPrimaryRS.UpdateBatch adAffectAll

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

  mbEditFlag = False
  mbAddNewFlag = False
  SetButtons True


  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)
Dim oTEX  As TextBox

  cmdAdd.Visible = bVal
  cmdEdit.Visible = bVal
  cmdUpdate.Visible = Not bVal
  cmdCancel.Visible = Not bVal
  cmdDelete.Visible = bVal
  cmdClose.Visible = bVal
  cmdRefresh.Visible = bVal
  
  
  For Each oText In Me.txtFields
     oText.Enabled = Not bVal
  Next
  
  If bVal Then
   Set DataGrid1.DataSource = adoPrimaryRS
  Else
   Set DataGrid1.DataSource = Nothing
  End If
  
  
   txtFields(0).Enabled = Not bVal
   txtFields(2).Enabled = Not bVal
   txtFields(3).Enabled = Not bVal
   DTPicker1.Enabled = Not bVal
   
End Sub


Private Sub txtFields_Change(Index As Integer)

txtFields(6).Text = "S344"


  If IsNumeric(txtFields(2).Text) And IsNumeric(txtFields(3).Text) Then
   
   txtFields(4) = CDbl(txtFields(2)) * CDbl(txtFields(3)) * 0.25
   txtFields(5) = CDbl(txtFields(2)) * CDbl(txtFields(3)) * 0.01
 
   txtFields(7) = CDbl(txtFields(4)) + CDbl(txtFields(5))
  
  End If

 

  
 
  
End Sub

Private Sub txtFields_LostFocus(Index As Integer)

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

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

If Not IsNumeric(txtFields(3).Text) And (txtFields(3).Text <> "") Then
    MsgBox "请在“上年月平均工资总额”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtFields(3).SetFocus
     txtFields(3).SelLength = Len(txtFields(3))
     txtFields(3).SelStart = 0
End If

End Sub

⌨️ 快捷键说明

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