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

📄 f_jibenxinxi.frm

📁 公司人员综合管理系统 提供公司人员的简历、工资账目、考勤、医疗纪录、失业保险等情况
💻 FRM
📖 第 1 页 / 共 4 页
字号:
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "学历:"
               Height          =   255
               Index           =   15
               Left            =   3960
               TabIndex        =   29
               Top             =   960
               Width           =   975
            End
            Begin VB.Label lblLabels 
               Caption         =   "身份证号:"
               Height          =   255
               Index           =   14
               Left            =   120
               TabIndex        =   27
               Top             =   2400
               Width           =   1815
            End
            Begin VB.Label lblLabels 
               Caption         =   "婚姻状况:"
               Height          =   255
               Index           =   13
               Left            =   7800
               TabIndex        =   25
               Top             =   600
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "政治面目:"
               Height          =   255
               Index           =   12
               Left            =   120
               TabIndex        =   23
               Top             =   960
               Width           =   1815
            End
            Begin VB.Label lblLabels 
               Caption         =   "户口所在地:"
               Height          =   255
               Index           =   11
               Left            =   7800
               TabIndex        =   21
               Top             =   2040
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "出生地点:"
               Height          =   255
               Index           =   10
               Left            =   3960
               TabIndex        =   19
               Top             =   2040
               Width           =   1815
            End
            Begin VB.Label lblLabels 
               Caption         =   "籍贯:"
               Height          =   255
               Index           =   9
               Left            =   120
               TabIndex        =   17
               Top             =   2040
               Width           =   615
            End
            Begin VB.Label lblLabels 
               Caption         =   "民族:"
               Height          =   255
               Index           =   8
               Left            =   3960
               TabIndex        =   15
               Top             =   600
               Width           =   615
            End
            Begin VB.Label lblLabels 
               Caption         =   "出生日期:"
               Height          =   255
               Index           =   7
               Left            =   120
               TabIndex        =   14
               Top             =   600
               Width           =   975
            End
            Begin VB.Label lblLabels 
               Caption         =   "血型:"
               Height          =   255
               Index           =   5
               Left            =   120
               TabIndex        =   12
               Top             =   1680
               Width           =   615
            End
            Begin VB.Label lblLabels 
               Caption         =   "体重:"
               Height          =   255
               Index           =   4
               Left            =   7800
               TabIndex        =   10
               Top             =   1680
               Width           =   615
            End
            Begin VB.Label lblLabels 
               Caption         =   "身高:"
               Height          =   255
               Index           =   3
               Left            =   3960
               TabIndex        =   8
               Top             =   1680
               Width           =   615
            End
            Begin VB.Label lblLabels 
               Caption         =   "性别:"
               Height          =   255
               Index           =   2
               Left            =   7800
               TabIndex        =   7
               Top             =   240
               Width           =   615
            End
            Begin VB.Label lblLabels 
               Caption         =   "姓名:"
               Height          =   255
               Index           =   1
               Left            =   3960
               TabIndex        =   5
               Top             =   240
               Width           =   615
            End
            Begin VB.Label lblLabels 
               Caption         =   "员工号:"
               Height          =   255
               Index           =   0
               Left            =   120
               TabIndex        =   3
               Top             =   300
               Width           =   615
            End
         End
      End
   End
End
Attribute VB_Name = "F_JiBenXinXi"
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 SqlBuMen As String


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
  
  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 DTPicker8.DataSource = adoPrimaryRS
  Set DTPicker9.DataSource = adoPrimaryRS
  Set DTPicker10.DataSource = adoPrimaryRS
  Set DTPicker11.DataSource = adoPrimaryRS
  Set DTPicker12.DataSource = adoPrimaryRS
  Set DTPicker13.DataSource = adoPrimaryRS
   Set DTPicker14.DataSource = adoPrimaryRS
  Set Combo1.DataSource = adoPrimaryRS
  Set Combo2.DataSource = adoPrimaryRS
  Set Combo3.DataSource = adoPrimaryRS
  Set Combo4.DataSource = adoPrimaryRS
  Set Combo5.DataSource = adoPrimaryRS
  Set Combo6.DataSource = adoPrimaryRS
  Set Combo7.DataSource = adoPrimaryRS
  Dim oText As TextBox
  'Bind the text boxes to the data provider
  For Each oText In Me.txtFields
    Set oText.DataSource = adoPrimaryRS
  Next
  
 SqlBuMen = "select  distinct 部门名称 from 部门维护表"
  Set RsBuMen = db.Execute(SqlBuMen)
   
  While Not RsBuMen.EOF
     Combo1.AddItem Trim(RsBuMen("部门名称"))
    RsBuMen.MoveNext

  Wend

Combo2.AddItem "正式工"
Combo2.AddItem "临时工"
Combo2.AddItem "聘退人员"

Combo3.AddItem "博士"
Combo3.AddItem "硕士"
Combo3.AddItem "大学"
Combo3.AddItem "大专"
Combo3.AddItem "高中"
Combo3.AddItem "职高"
Combo3.AddItem "中技"
Combo3.AddItem "初中"

Combo4.AddItem "男"
Combo4.AddItem "女"
Combo5.AddItem "男"
Combo5.AddItem "女"

Combo6.AddItem "从农村招收"
Combo6.AddItem "从城镇招收"
Combo6.AddItem "复员转业军人"
Combo6.AddItem "大学中专技校毕业生"
Combo6.AddItem "本市外单位调入"
Combo6.AddItem "外省自治区直辖市调入"
Combo6.AddItem "其他"

Combo7.AddItem "工人和学徒"
Combo7.AddItem "工程技术人员"
Combo7.AddItem "管理人员"
Combo7.AddItem "服务人员"
Combo7.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

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
  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
  DTPicker3.Enabled = Not bVal
  DTPicker4.Enabled = Not bVal
  DTPicker5.Enabled = Not bVal
  DTPicker6.Enabled = Not bVal
  DTPicker7.Enabled = Not bVal
  DTPicker8.Enabled = Not bVal
  DTPicker9.Enabled = Not bVal
  DTPicker10.Enabled = Not bVal
  DTPicker11.Enabled = Not bVal
  DTPicker12.Enabled = Not bVal
  DTPicker13.Enabled = Not bVal
  DTPicker14.Enabled = Not bVal
  Combo1.Enabled = Not bVal
  Combo2.Enabled = Not bVal
  Combo3.Enabled = Not bVal
  Combo4.Enabled = Not bVal
  Combo5.Enabled = Not bVal
  Combo6.Enabled = Not bVal
  Combo7.Enabled = Not bVal

End Sub

Private Sub txtFields_LostFocus(Index As Integer)
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

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



⌨️ 快捷键说明

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