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

📄 f_zhenggangxvqiu.frm

📁 用Visual basic6开发的人事信息管理系统,数据库采用的是Sql Server2000
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            End
            Begin VB.Label lblLabels 
               Caption         =   "人力部意见"
               Height          =   255
               Index           =   14
               Left            =   240
               TabIndex        =   30
               Top             =   2280
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "签字时间"
               Height          =   255
               Index           =   13
               Left            =   240
               TabIndex        =   29
               Top             =   4920
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "部门经理"
               Height          =   255
               Index           =   12
               Left            =   1440
               TabIndex        =   28
               Top             =   4200
               Width           =   1215
            End
            Begin VB.Label lblLabels 
               Caption         =   "任职条件"
               Height          =   255
               Index           =   10
               Left            =   240
               TabIndex        =   27
               Top             =   1440
               Width           =   855
            End
            Begin VB.Label lblLabels 
               Caption         =   "理    由"
               Height          =   255
               Index           =   9
               Left            =   240
               TabIndex        =   26
               Top             =   720
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "岗位名称"
               Height          =   255
               Index           =   7
               Left            =   3360
               TabIndex        =   25
               Top             =   240
               Width           =   975
            End
            Begin VB.Label lblLabels 
               Caption         =   "部   门"
               Height          =   255
               Index           =   1
               Left            =   240
               TabIndex        =   24
               Top             =   240
               Width           =   1095
            End
            Begin VB.Label lblLabels 
               Caption         =   "岗位定员"
               Height          =   255
               Index           =   0
               Left            =   6000
               TabIndex        =   23
               Top             =   240
               Width           =   1095
            End
         End
         Begin VB.Frame Frame3 
            Height          =   5655
            Left            =   -74760
            TabIndex        =   20
            Top             =   480
            Width           =   8775
            Begin MSDataGridLib.DataGrid DataGrid1 
               Height          =   5175
               Left            =   240
               TabIndex        =   21
               Top             =   240
               Width           =   8295
               _ExtentX        =   14631
               _ExtentY        =   9128
               _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
      End
   End
End
Attribute VB_Name = "F_ZhengGangXVQiu"
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 WithEvents RsBuMen   As Recordset
Attribute RsBuMen.VB_VarHelpID = -1
Dim mbChangedByCode As Boolean
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean

Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    SendKeys "{TAB}"
End If
End Sub

Private Sub DTPicker2_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    SendKeys "{TAB}"
End If
End Sub

Private Sub DTPicker3_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    SendKeys "{TAB}"
End If
End Sub

Private Sub DTPicker4_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
Dim SqlBuMen As String
  Set adoPrimaryRS = New Recordset
  adoPrimaryRS.Open "select * from 增岗需求单", db, adOpenStatic, adLockOptimistic

   Set DataGrid1.DataSource = adoPrimaryRS
  
  SetButtons True

 
  Set DTPicker2.DataSource = adoPrimaryRS
  Set DTPicker3.DataSource = adoPrimaryRS
  Set DTPicker4.DataSource = adoPrimaryRS
  Set Combo1.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

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
  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
  
  Dim oText As TextBox
  'Bind the text boxes to the data provider
  For Each oText In Me.txtFields
    oText.Enabled = Not bVal
  Next
     
  DTPicker2.Enabled = Not bVal
  DTPicker3.Enabled = Not bVal
  DTPicker4.Enabled = Not bVal
  
End Sub


Private Sub txtFields_Change(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
End Sub

Private Sub txtFields_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    SendKeys "{TAB}"
End If
End Sub

⌨️ 快捷键说明

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