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

📄 zhiwu.frm

📁 该系统是用VB开发的一个人事管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form zhiwu 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "职务调动"
   ClientHeight    =   5655
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6180
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5655
   ScaleWidth      =   6180
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text6 
      Height          =   375
      Left            =   4200
      TabIndex        =   17
      Top             =   960
      Width           =   1575
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      Left            =   1200
      TabIndex        =   15
      Top             =   240
      Width           =   1695
   End
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   4200
      TabIndex        =   14
      Top             =   240
      Width           =   1815
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消变更"
      Height          =   375
      Left            =   4080
      TabIndex        =   12
      Top             =   5040
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认变更"
      Height          =   375
      Left            =   2400
      TabIndex        =   11
      Top             =   5040
      Width           =   1335
   End
   Begin MSComCtl2.DTPicker DTPicker1 
      Height          =   255
      Left            =   4320
      TabIndex        =   10
      Top             =   1680
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   450
      _Version        =   393216
      Format          =   65994753
      CurrentDate     =   38521
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1200
      TabIndex        =   9
      Top             =   1560
      Width           =   1695
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1200
      TabIndex        =   8
      Top             =   960
      Width           =   1695
   End
   Begin VB.TextBox Text2 
      Height          =   855
      Left            =   240
      TabIndex        =   7
      Top             =   3960
      Width           =   5535
   End
   Begin VB.TextBox Text1 
      Height          =   855
      Left            =   240
      TabIndex        =   6
      Top             =   2520
      Width           =   5535
   End
   Begin VB.Label Label8 
      Caption         =   "员工姓名:"
      Height          =   255
      Left            =   3120
      TabIndex        =   16
      Top             =   240
      Width           =   1095
   End
   Begin VB.Label Label7 
      Caption         =   "员工号:"
      Height          =   255
      Left            =   240
      TabIndex        =   13
      Top             =   360
      Width           =   735
   End
   Begin VB.Label Label6 
      Caption         =   "备注说明:"
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   3600
      Width           =   975
   End
   Begin VB.Label Label5 
      Caption         =   "调动原因:"
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   2160
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "经手人:"
      Height          =   255
      Left            =   240
      TabIndex        =   3
      Top             =   1680
      Width           =   735
   End
   Begin VB.Label Label4 
      Caption         =   "生效时间:"
      Height          =   255
      Left            =   3240
      TabIndex        =   2
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "新职务:"
      Height          =   255
      Left            =   3240
      TabIndex        =   1
      Top             =   1080
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "原职务:"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   1080
      Width           =   735
   End
End
Attribute VB_Name = "zhiwu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
Dim mm As ADODB.Recordset
Dim txtSQL As String
Dim txtSQL1 As String
Dim MsgText As String

Private Sub Combo2_click()
txtSQL = "select * from 员工调动表 where 员工编号='" & Trim(Combo2.Text) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
   Text3.Text = Trim(mrc.Fields(5))
   Text5.Text = Trim(mrc.Fields(0))
    Text3.Enabled = False
    Text5.Enabled = False
   'Set DataGrid1.DataSource = mrc
   'mrc.Close
   Set mrc = Nothing
End Sub

Private Sub Command1_Click()
Dim SqlJL As String
'Dim adoshowrsJL As ADODB.Recordset
Dim cnn As ADODB.Recordset
Dim msgstr As String



'If Not IsNull(Text1.Text) Then
 '   MsgBox "请输入原部门", vbExclamation + vbOKOnly, pTitle
 '    Text1.SetFocus
     

'Else
If IsNull(Text6.Text) Then
    MsgBox "请输入新职务", vbExclamation + vbOKOnly, pTitle
     Text2.SetFocus
     
Else
'If Text1.Text <> "" And IsNumeric(txtFields(0).Text) And IsNumeric(txtFields(1).Text) Then
SqlJL = "SELECT * From 员工调动表 Where 员工编号  ='" & Combo2.Text & "' "
'Else
'MsgBox "请输入正确的员工号、年度和月份信息!", vbExclamation + vbOKOnly, "信息框"
'Exit Sub

End If
Set cnn = ExecuteSQL(SqlJL, msgstr)
'adoshowrsJL.Open SqlJL, db, adOpenStatic, adLockOptimistic
'adoshowrsJL.Requery

'If Not cnn.BOF And Not cnn.EOF Then
'   MsgBox "此员工的本年月考勤已存在,请输入新的员工考勤!", vbExclamation + vbOKOnly, "信息框"
'  Exit Sub
'End If
Dim txtSQL As String
'Dim cnn As ADODB.Recordset
 txtSQL = "select * from 员工调动表"
    Set cnn = ExecuteSQL(txtSQL, msgstr)
    
                'cnn.AddNew
                cnn.Fields(0) = Trim(Text5.Text)
                cnn.Fields(1) = Trim(Combo2.Text)
                cnn.Fields(5) = Trim(Text3.Text)
                cnn.Fields(6) = Trim(Text6.Text)
                cnn.Fields(7) = Trim(Text1.Text)
                cnn.Fields(9) = Trim(Text2.Text)
                cnn.Fields(8) = Trim(Text4.Text)
                cnn.Fields(2) = DTPicker1.Value
                
                cnn.Update
                MsgBox "考勤信息添加成功!", vbOKOnly + vbExclamation, "添加房屋资料信息"
                cnn.Close
                Set cnn = Nothing
Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub



Private Sub Form_Load()
Dim i As Integer
Dim MsgText As String


txtSQL = "select distinct 员工编号 from 员工调动表"
       Set mrc = ExecuteSQL(txtSQL, MsgText)
       If Not mrc.EOF Then
       Do While Not mrc.EOF
       Combo2.AddItem Trim(mrc.Fields(0))
       mrc.MoveNext
       Loop
       Exit Sub
       End If
       
End Sub

⌨️ 快捷键说明

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