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

📄 f_chuxianguanli.frm

📁 行政管理系统商业源码,可以down下来看看
💻 FRM
📖 第 1 页 / 共 2 页
字号:
               Left            =   1560
               TabIndex        =   12
               Top             =   1080
               Width           =   1935
            End
            Begin VB.TextBox txtFields 
               DataField       =   "部门"
               Height          =   285
               Index           =   3
               Left            =   5520
               TabIndex        =   10
               Top             =   720
               Width           =   1935
            End
            Begin VB.TextBox txtFields 
               DataField       =   "姓名"
               Height          =   285
               Index           =   2
               Left            =   1560
               TabIndex        =   8
               Top             =   720
               Width           =   1935
            End
            Begin VB.TextBox txtFields 
               DataField       =   "保单号"
               Height          =   285
               Index           =   1
               Left            =   5520
               TabIndex        =   6
               Top             =   360
               Width           =   1935
            End
            Begin VB.TextBox txtFields 
               DataField       =   "出险人员工号"
               Height          =   285
               Index           =   0
               Left            =   1560
               TabIndex        =   4
               Top             =   360
               Width           =   1935
            End
            Begin VB.Label lblLabels 
               Caption         =   "赔偿日期:"
               Height          =   255
               Index           =   12
               Left            =   240
               TabIndex        =   26
               Top             =   2160
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "实际赔偿金额:"
               Height          =   255
               Index           =   11
               Left            =   4080
               TabIndex        =   24
               Top             =   2160
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "办理赔偿情况:"
               Height          =   255
               Index           =   10
               Left            =   240
               TabIndex        =   22
               Top             =   2520
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "出险描述:"
               Height          =   255
               Index           =   9
               Left            =   4080
               TabIndex        =   20
               Top             =   1800
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "出险地点:"
               Height          =   255
               Index           =   8
               Left            =   240
               TabIndex        =   18
               Top             =   1800
               Width           =   735
            End
            Begin VB.Label lblLabels 
               Caption         =   "是否因工出险:"
               Height          =   255
               Index           =   7
               Left            =   4080
               TabIndex        =   16
               Top             =   1440
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "出险日期:"
               Height          =   255
               Index           =   6
               Left            =   240
               TabIndex        =   15
               Top             =   1440
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "工种:"
               Height          =   255
               Index           =   5
               Left            =   4080
               TabIndex        =   13
               Top             =   1080
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "性别:"
               Height          =   255
               Index           =   4
               Left            =   240
               TabIndex        =   11
               Top             =   1080
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "部门:"
               Height          =   255
               Index           =   3
               Left            =   4080
               TabIndex        =   9
               Top             =   720
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "姓名:"
               Height          =   255
               Index           =   2
               Left            =   240
               TabIndex        =   7
               Top             =   720
               Width           =   975
            End
            Begin VB.Label lblLabels 
               Caption         =   "保单号:"
               Height          =   255
               Index           =   1
               Left            =   4080
               TabIndex        =   5
               Top             =   360
               Width           =   975
            End
            Begin VB.Label lblLabels 
               Caption         =   "出险人员工号:"
               Height          =   255
               Index           =   0
               Left            =   240
               TabIndex        =   3
               Top             =   360
               Width           =   1215
            End
         End
      End
   End
End
Attribute VB_Name = "F_ChuXianGuanLi"
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 出险管理", db, adOpenStatic, adLockOptimistic

 Set DataGrid1.DataSource = adoPrimaryRS
  
  SetButtons True
  
 Set DTPicker1.DataSource = adoPrimaryRS
 Set DTPicker2.DataSource = adoPrimaryRS
  
  'Bind the text boxes to the data provider
  For Each oText In Me.txtFields
    Set oText.DataSource = adoPrimaryRS
  Next

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()
  XingZhengGL.Enabled = True
  Unload Me
End Sub

Private Sub SetButtons(bVal As Boolean)
Dim oText 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
  If bVal Then
   Set DataGrid1.DataSource = adoPrimaryRS
  Else
   Set DataGrid1.DataSource = Nothing
  End If
  
   For Each oText In Me.txtFields
     oText.Enabled = Not bVal
  Next
  
   DTPicker1.Enabled = Not bVal
   DTPicker2.Enabled = Not bVal
   
End Sub

Private Sub txtFields_LostFocus(Index As Integer)
If Not IsNumeric(txtFields(11).Text) And (txtFields(11).Text <> "") Then
    MsgBox "请在“实际赔偿金额”中输入数字", vbExclamation + vbOKOnly, pTitle
     txtFields(11).SetFocus
     txtFields(11).SelLength = Len(txtFields(11))
     txtFields(11).SelStart = 0
End If
End Sub

⌨️ 快捷键说明

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