F_YangLaoJiaoFei.frm
资源名称:dbbase.rar [点击查看]
上传用户:xiao_xia32
上传日期:2022-07-21
资源大小:1174k
文件大小:25k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
- Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
- Begin VB.Form F_YangLaoJiaoFei
- BorderStyle = 3 'Fixed Dialog
- Caption = "养老保险缴费情况表"
- ClientHeight = 6360
- ClientLeft = 1095
- ClientTop = 330
- ClientWidth = 10050
- ControlBox = 0 'False
- KeyPreview = -1 'True
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- Moveable = 0 'False
- ScaleHeight = 6360
- ScaleWidth = 10050
- StartUpPosition = 2 '屏幕中心
- Begin VB.Frame Frame1
- Height = 6015
- Left = 240
- TabIndex = 17
- Top = 120
- Width = 9615
- Begin TabDlg.SSTab SSTab1
- Height = 5415
- Left = 240
- TabIndex = 18
- Top = 360
- Width = 9135
- _ExtentX = 16113
- _ExtentY = 9551
- _Version = 393216
- Tabs = 2
- TabHeight = 520
- TabCaption(0) = "编 辑"
- TabPicture(0) = "F_YangLaoJiaoFei.frx":0000
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Frame2"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "Picture1"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).ControlCount= 2
- TabCaption(1) = "列 表"
- TabPicture(1) = "F_YangLaoJiaoFei.frx":001C
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Frame3"
- Tab(1).ControlCount= 1
- Begin VB.PictureBox Picture1
- Appearance = 0 'Flat
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 420
- Left = 2160
- ScaleHeight = 420
- ScaleWidth = 6720
- TabIndex = 34
- Top = 4800
- Width = 6720
- Begin Threed.SSCommand cmdClose
- Height = 330
- Left = 5520
- TabIndex = 35
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&Q.关闭"
- Font3D = 1
- End
- Begin Threed.SSCommand CmdAdd
- Height = 330
- Left = 720
- TabIndex = 12
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&A.增 加"
- Font3D = 1
- End
- Begin Threed.SSCommand cmdEdit
- Height = 330
- Left = 1920
- TabIndex = 13
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&E.编 辑"
- Font3D = 1
- End
- Begin Threed.SSCommand CmdDelete
- Height = 330
- Left = 3120
- TabIndex = 14
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&D.删 除"
- Font3D = 1
- End
- Begin Threed.SSCommand cmdUpdate
- Height = 330
- Left = 4320
- TabIndex = 36
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&Y.保存"
- Font3D = 1
- End
- Begin Threed.SSCommand cmdRefresh
- Height = 330
- Left = 4320
- TabIndex = 15
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&R.刷 新"
- Font3D = 1
- End
- Begin Threed.SSCommand cmdCancel
- Height = 330
- Left = 5520
- TabIndex = 16
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&C.取 消"
- Font3D = 1
- End
- End
- Begin VB.Frame Frame3
- Height = 4695
- Left = -74760
- TabIndex = 32
- Top = 480
- Width = 8655
- Begin MSDataGridLib.DataGrid DataGrid1
- Height = 4215
- Left = 240
- TabIndex = 33
- Top = 240
- Width = 8175
- _ExtentX = 14420
- _ExtentY = 7435
- _Version = 393216
- AllowUpdate = 0 'False
- HeadLines = 1
- RowHeight = 14
- BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- 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
- End
- Begin VB.Frame Frame2
- Height = 4215
- Left = 240
- TabIndex = 19
- Top = 480
- Width = 8655
- Begin MSComCtl2.DTPicker DTPicker2
- DataField = "缴费结束时间"
- Height = 300
- Left = 6120
- TabIndex = 5
- Top = 1680
- Width = 1935
- _ExtentX = 3413
- _ExtentY = 529
- _Version = 393216
- CheckBox = -1 'True
- DateIsNull = -1 'True
- Format = 69664769
- CurrentDate = 36191
- End
- Begin MSComCtl2.DTPicker DTPicker1
- DataField = "缴费开始时间"
- Height = 300
- Left = 1680
- TabIndex = 4
- Top = 1680
- Width = 1935
- _ExtentX = 3413
- _ExtentY = 529
- _Version = 393216
- CheckBox = -1 'True
- DateIsNull = -1 'True
- Format = 69664769
- CurrentDate = 36191
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "个人缴纳"
- Enabled = 0 'False
- Height = 285
- Index = 12
- Left = 1680
- TabIndex = 10
- Top = 3480
- Width = 1935
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "划入帐户"
- Enabled = 0 'False
- Height = 285
- Index = 11
- Left = 6120
- TabIndex = 9
- Top = 2880
- Width = 1935
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "个人帐户金额小计"
- Enabled = 0 'False
- Height = 285
- Index = 10
- Left = 6120
- TabIndex = 11
- Top = 3480
- Width = 1935
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "统筹基金"
- Enabled = 0 'False
- Height = 285
- Index = 9
- Left = 1680
- TabIndex = 8
- Top = 2880
- Width = 1935
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "职工月缴费基数"
- Height = 285
- Index = 8
- Left = 6120
- TabIndex = 7
- Top = 2280
- Width = 1935
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "月数"
- Height = 285
- Index = 7
- Left = 1680
- TabIndex = 6
- Top = 2280
- Width = 1935
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "姓名"
- Height = 285
- Index = 3
- Left = 6120
- TabIndex = 1
- Top = 480
- Width = 1935
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "员工号"
- Height = 285
- Index = 2
- Left = 1680
- TabIndex = 0
- Top = 480
- Width = 1935
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "社会保障号码"
- Height = 285
- Index = 1
- Left = 6120
- TabIndex = 3
- Top = 1080
- Width = 1935
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "电脑序号"
- Height = 285
- Index = 0
- Left = 1680
- TabIndex = 2
- Top = 1080
- Width = 1935
- 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