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

📄 diaodong.frm

📁 该系统是用VB开发的一个人事管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form diaodong 
   BackColor       =   &H00C0C0C0&
   Caption         =   "调动资料"
   ClientHeight    =   5835
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6465
   LinkTopic       =   "Form3"
   ScaleHeight     =   5835
   ScaleWidth      =   6465
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text6 
      Height          =   270
      Left            =   4200
      TabIndex        =   17
      Top             =   240
      Width           =   1335
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   1560
      TabIndex        =   14
      Top             =   240
      Width           =   1575
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00FFFFC0&
      Caption         =   "取消调动"
      Height          =   375
      Left            =   3960
      TabIndex        =   13
      Top             =   4920
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFFFC0&
      Caption         =   "确认调动"
      Height          =   375
      Left            =   1800
      TabIndex        =   12
      Top             =   4920
      Width           =   1575
   End
   Begin MSComCtl2.DTPicker DTPicker1 
      Height          =   375
      Left            =   3600
      TabIndex        =   11
      Top             =   4440
      Width           =   1935
      _ExtentX        =   3413
      _ExtentY        =   661
      _Version        =   393216
      Format          =   65863681
      CurrentDate     =   38521
   End
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   1080
      TabIndex        =   10
      Top             =   4440
      Width           =   1335
   End
   Begin VB.TextBox Text4 
      Height          =   735
      Left            =   240
      TabIndex        =   9
      Top             =   3600
      Width           =   5295
   End
   Begin VB.TextBox Text3 
      Height          =   735
      Left            =   240
      TabIndex        =   8
      Top             =   2400
      Width           =   5295
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1560
      TabIndex        =   7
      Top             =   1320
      Width           =   3975
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1560
      TabIndex        =   6
      Top             =   840
      Width           =   3975
   End
   Begin VB.Label Label8 
      Caption         =   "员工姓名:"
      Height          =   255
      Left            =   3240
      TabIndex        =   16
      Top             =   240
      Width           =   975
   End
   Begin VB.Label Label7 
      Caption         =   "员工号:"
      Height          =   255
      Left            =   240
      TabIndex        =   15
      Top             =   240
      Width           =   735
   End
   Begin VB.Label Label6 
      Caption         =   "生效时间:"
      Height          =   255
      Left            =   2520
      TabIndex        =   5
      Top             =   4560
      Width           =   975
   End
   Begin VB.Label Label5 
      Caption         =   "经办人:"
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   4560
      Width           =   735
   End
   Begin VB.Label Label4 
      Caption         =   "备注说明:"
      Height          =   255
      Left            =   240
      TabIndex        =   3
      Top             =   3240
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "调动说明:"
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   2040
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "新部门:"
      Height          =   255
      Left            =   240
      TabIndex        =   1
      Top             =   1440
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "原部门:"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   960
      Width           =   735
   End
End
Attribute VB_Name = "diaodong"
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 MsgText As String
Private Sub Combo1_click()
txtSQL = "select * from 员工调动表 where 员工编号='" & Trim(Combo1.Text) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
   Text1.Text = Trim(mrc.Fields(3))
   Text6.Text = Trim(mrc.Fields(0))
    Text1.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(Text2.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 员工编号  ='" & Combo1.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(Text6.Text)
                cnn.Fields(1) = Trim(Combo1.Text)
                cnn.Fields(3) = Trim(Text1.Text)
                cnn.Fields(4) = Trim(Text2.Text)
                cnn.Fields(7) = Trim(Text3.Text)
                cnn.Fields(9) = Trim(Text4.Text)
                cnn.Fields(8) = Trim(Text5.Text)
                cnn.Fields(2) = DTPicker1.Value
                
                cnn.Update
                MsgBox "考勤信息添加成功!", vbOKOnly + vbExclamation, "添加房屋资料信息"
                cnn.Close
                Set cnn = Nothing
               ' End If
    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
       Combo1.AddItem Trim(mrc.Fields(0))
       mrc.MoveNext
       Loop
       Exit Sub
       End If
End Sub

⌨️ 快捷键说明

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