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

📄 f_laodonghetong.frm

📁 vb开发的人事管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            End
            Begin VB.Label lblLabels 
               Caption         =   "是否已停止:"
               Height          =   255
               Index           =   20
               Left            =   360
               TabIndex        =   54
               Top             =   4800
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "签定期限:"
               DataField       =   $"F_LaoDongHeTong.frx":0038
               Height          =   255
               Index           =   19
               Left            =   360
               TabIndex        =   42
               Top             =   2760
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "劳动合同编号:"
               Height          =   255
               Index           =   0
               Left            =   360
               TabIndex        =   32
               Top             =   360
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "姓名:"
               Height          =   255
               Index           =   1
               Left            =   3600
               TabIndex        =   31
               Top             =   360
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "签定时间:"
               Height          =   255
               Index           =   2
               Left            =   6720
               TabIndex        =   30
               Top             =   2280
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "文化程度:"
               Height          =   255
               Index           =   3
               Left            =   6720
               TabIndex        =   29
               Top             =   360
               Width           =   735
            End
            Begin VB.Label lblLabels 
               Caption         =   "性别:"
               Height          =   255
               Index           =   4
               Left            =   360
               TabIndex        =   28
               Top             =   840
               Width           =   735
            End
            Begin VB.Label lblLabels 
               Caption         =   "出生日期:"
               Height          =   255
               Index           =   5
               Left            =   3600
               TabIndex        =   27
               Top             =   840
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "身份证号:"
               Height          =   255
               Index           =   6
               Left            =   6720
               TabIndex        =   26
               Top             =   1320
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "家庭通讯地址:"
               Height          =   255
               Index           =   7
               Left            =   360
               TabIndex        =   25
               Top             =   1320
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "邮编:"
               Height          =   255
               Index           =   8
               Left            =   6720
               TabIndex        =   24
               Top             =   840
               Width           =   615
            End
            Begin VB.Label lblLabels 
               Caption         =   "所在街道办事处:"
               Height          =   255
               Index           =   9
               Left            =   360
               TabIndex        =   23
               Top             =   1800
               Width           =   1335
            End
            Begin VB.Label lblLabels 
               Caption         =   "开始时间:"
               DataField       =   $"F_LaoDongHeTong.frx":0100
               Height          =   255
               Index           =   10
               Left            =   3600
               TabIndex        =   22
               Top             =   2760
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "结束时间:"
               Height          =   255
               Index           =   11
               Left            =   6720
               TabIndex        =   21
               Top             =   2760
               Width           =   975
            End
            Begin VB.Label lblLabels 
               Caption         =   "试用开始时间:"
               Height          =   255
               Index           =   12
               Left            =   360
               TabIndex        =   20
               Top             =   3360
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "试用结束时间:"
               Height          =   255
               Index           =   13
               Left            =   3480
               TabIndex        =   19
               Top             =   3360
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "部门:"
               Height          =   255
               Index           =   14
               Left            =   360
               TabIndex        =   18
               Top             =   2280
               Width           =   735
            End
            Begin VB.Label lblLabels 
               Caption         =   "岗位:"
               Height          =   255
               Index           =   15
               Left            =   3600
               TabIndex        =   17
               Top             =   2280
               Width           =   615
            End
            Begin VB.Label lblLabels 
               Caption         =   "当事人约定的其他内容:"
               Height          =   495
               Index           =   16
               Left            =   360
               TabIndex        =   16
               Top             =   3840
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "停止方式:"
               Height          =   255
               Index           =   17
               Left            =   3720
               TabIndex        =   15
               Top             =   4800
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "停止时间:"
               Height          =   255
               Index           =   18
               Left            =   6720
               TabIndex        =   14
               Top             =   4800
               Width           =   1095
            End
         End
      End
   End
End
Attribute VB_Name = "F_LaoDongHeTong"
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()
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 DTPicker1.DataSource = adoPrimaryRS
  Set DTPicker2.DataSource = adoPrimaryRS
  Set DTPicker3.DataSource = adoPrimaryRS
  Set DTPicker4.DataSource = adoPrimaryRS
  Set DTPicker5.DataSource = adoPrimaryRS
  Set DTPicker6.DataSource = adoPrimaryRS
  Set DTPicker7.DataSource = adoPrimaryRS
    
   Set DataGrid1.DataSource = adoPrimaryRS
   
   Set Combo1.DataSource = adoPrimaryRS
   Set Combo2.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
  
  Combo1.AddItem "终止"
  Combo1.AddItem "解除"
  Combo1.AddItem "续定"
  
  Combo2.AddItem "是"
  Combo2.AddItem "否"
 

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
  SetButtons True
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
   SetButtons True
End Sub

Private Sub cmdClose_Click()
    RSGL.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
  
  For Each oText In Me.txtFields
     oText.Enabled = Not bVal
  Next
  
  DTPicker1.Enabled = Not bVal
  DTPicker2.Enabled = Not bVal
  DTPicker3.Enabled = Not bVal
  DTPicker4.Enabled = Not bVal
  DTPicker5.Enabled = Not bVal
  DTPicker6.Enabled = Not bVal
  DTPicker7.Enabled = Not bVal
  
  If bVal Then
   Set DataGrid1.DataSource = adoPrimaryRS
  Else
   Set DataGrid1.DataSource = Nothing
  End If
  
  Combo1.Enabled = Not bVal
  Combo2.Enabled = Not bVal
End Sub

Private Sub txtFields_LostFocus(Index As Integer)
If Index = 0 Then
Dim Sql3 As String


 
    Sql3 = "select  distinct 部门 ,姓名 ,性别 ,出生日期 ,岗位,学历 ,家庭通讯地址 ,邮编 ,身份证号,所在街道办事处   from 员工基本信息  where 员工号 = '" & txtFields(0).Text & "'"
    Set rs3 = db.Execute(Sql3)
   If Not rs3.EOF Then
   
   If Not IsNull(rs3("姓名")) Then
       txtFields(1).Text = Trim(rs3("姓名"))
   End If
   
   If Not IsNull(rs3("学历")) Then
       txtFields(3).Text = Trim(rs3("学历"))
   End If
   
   If Not IsNull(rs3("性别")) Then
       txtFields(4).Text = Trim(rs3("性别"))
   End If
   
   If Not IsNull(rs3("出生日期")) Then
       DTPicker1.Value = Trim(rs3("出生日期"))
   End If
   
   If Not IsNull(rs3("邮编")) Then
       txtFields(8).Text = Trim(rs3("邮编"))
   End If
   
   If Not IsNull(rs3("家庭通讯地址")) Then
       txtFields(7).Text = Trim(rs3("家庭通讯地址"))
   End If
   
   If Not IsNull(rs3("身份证号")) Then
       txtFields(6).Text = Trim(rs3("身份证号"))
   End If
   
   If Not IsNull(rs3("所在街道办事处")) Then
       txtFields(7).Text = Trim(rs3("所在街道办事处"))
   End If
   
  
   End If


End If
End Sub

⌨️ 快捷键说明

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