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

📄 frmchgddinfo.frm

📁 企业人事管理系统,有考勤,人员管理等功能,值得研究,也是我付费弄来的,绝对超值
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Begin VB.Form frmchgDDinfo 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "修改员工调动信息"
   ClientHeight    =   5235
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8595
   Icon            =   "frmchgDDinfo.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5235
   ScaleWidth      =   8595
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame1 
      Caption         =   "调动信息"
      Height          =   4575
      Left            =   3240
      TabIndex        =   2
      Top             =   600
      Width           =   5295
      Begin VB.TextBox txtYBM 
         Height          =   270
         Left            =   3600
         Locked          =   -1  'True
         TabIndex        =   19
         Top             =   840
         Width           =   1335
      End
      Begin VB.TextBox txtYZW 
         Height          =   270
         Left            =   840
         Locked          =   -1  'True
         TabIndex        =   18
         Top             =   840
         Width           =   1455
      End
      Begin VB.TextBox txtBZ 
         Height          =   975
         Left            =   240
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   15
         Top             =   2640
         Width           =   4695
      End
      Begin MSComCtl2.DTPicker dtpDC 
         Height          =   375
         Left            =   3600
         TabIndex        =   14
         Top             =   2040
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   661
         _Version        =   393216
         Format          =   85131265
         CurrentDate     =   38124
      End
      Begin MSComCtl2.DTPicker dtpDL 
         Height          =   375
         Left            =   960
         TabIndex        =   13
         Top             =   1920
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   661
         _Version        =   393216
         Format          =   85131265
         CurrentDate     =   38124
      End
      Begin VB.TextBox txtGH 
         Height          =   270
         Left            =   840
         Locked          =   -1  'True
         TabIndex        =   12
         Top             =   360
         Width           =   1455
      End
      Begin VB.TextBox txtXBM 
         Height          =   270
         Left            =   3600
         TabIndex        =   11
         Top             =   1440
         Width           =   1335
      End
      Begin VB.TextBox txtXZW 
         Height          =   270
         Left            =   840
         TabIndex        =   10
         Top             =   1320
         Width           =   1455
      End
      Begin VB.TextBox txtName 
         Height          =   270
         Left            =   3600
         Locked          =   -1  'True
         TabIndex        =   5
         Top             =   360
         Width           =   1335
      End
      Begin MSForms.CommandButton cmdOK 
         Height          =   375
         Index           =   0
         Left            =   240
         TabIndex        =   23
         Top             =   3960
         Width           =   1095
         Caption         =   "修改"
         PicturePosition =   327683
         Size            =   "1931;661"
         Picture         =   "frmchgDDinfo.frx":0442
         FontName        =   "宋体"
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   34
         ParagraphAlign  =   3
      End
      Begin MSForms.CommandButton cmdExit 
         Height          =   375
         Left            =   3960
         TabIndex        =   22
         Top             =   3960
         Width           =   1095
         Caption         =   "返回"
         PicturePosition =   327683
         Size            =   "1931;661"
         Picture         =   "frmchgDDinfo.frx":07DC
         FontName        =   "宋体"
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   34
         ParagraphAlign  =   3
      End
      Begin MSForms.CommandButton cmdClear 
         Height          =   375
         Left            =   2640
         TabIndex        =   21
         Top             =   3960
         Width           =   1095
         Caption         =   "清空"
         PicturePosition =   327683
         Size            =   "1931;661"
         Picture         =   "frmchgDDinfo.frx":2A16
         FontName        =   "宋体"
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   34
         ParagraphAlign  =   3
      End
      Begin MSForms.CommandButton cmdDel 
         Height          =   375
         Left            =   1440
         TabIndex        =   20
         Top             =   3960
         Width           =   1095
         Caption         =   "删除"
         PicturePosition =   327683
         Size            =   "1931;661"
         Picture         =   "frmchgDDinfo.frx":4B50
         FontName        =   "宋体"
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   34
         ParagraphAlign  =   3
      End
      Begin VB.Label Label2 
         Caption         =   "原部门"
         Height          =   255
         Left            =   2520
         TabIndex        =   17
         Top             =   840
         Width           =   735
      End
      Begin MSForms.Label Label1 
         Height          =   255
         Left            =   120
         TabIndex        =   16
         Top             =   840
         Width           =   615
         Caption         =   "原职务"
         Size            =   "1085;450"
         FontName        =   "宋体"
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   34
      End
      Begin VB.Label Labtc 
         Caption         =   "调出时间:"
         Height          =   375
         Left            =   2640
         TabIndex        =   9
         Top             =   2040
         Width           =   975
      End
      Begin VB.Label Labtr 
         Caption         =   "调入时间:"
         Height          =   375
         Left            =   120
         TabIndex        =   8
         Top             =   1920
         Width           =   855
      End
      Begin VB.Label LabXBM 
         Caption         =   "新部门:"
         Height          =   375
         Left            =   2640
         TabIndex        =   7
         Top             =   1440
         Width           =   735
      End
      Begin VB.Label LabXZw 
         Caption         =   "新职务:"
         Height          =   375
         Left            =   120
         TabIndex        =   6
         Top             =   1320
         Width           =   855
      End
      Begin VB.Label Labname 
         Caption         =   "姓名:"
         Height          =   375
         Left            =   2640
         TabIndex        =   4
         Top             =   360
         Width           =   855
      End
      Begin VB.Label LabID 
         Caption         =   "工号:"
         Height          =   375
         Left            =   120
         TabIndex        =   3
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "显示全部员工调动信息"
      Height          =   375
      Left            =   0
      TabIndex        =   1
      Top             =   120
      Width           =   3015
   End
   Begin MSFlexGridLib.MSFlexGrid Grid1 
      Height          =   4455
      Left            =   0
      TabIndex        =   0
      Top             =   600
      Width           =   3135
      _ExtentX        =   5530
      _ExtentY        =   7858
      _Version        =   393216
      SelectionMode   =   1
      AllowUserResizing=   1
   End
End
Attribute VB_Name = "frmchgDDinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdClear_Click()
txtXBM.Text = ""
txtXZW.Text = ""

End Sub

Private Sub cmdDel_Click()
  If Grid1.Rows < 1 Then Exit Sub
  Dim intId As Integer
  intId = Grid1.TextMatrix(Grid1.Row, 1)
  
  If MsgBox("你真的要删除吗?", vbQuestion + vbYesNo) = vbYes Then
   Dim strSql As String
   Dim strMsg As String
   Dim rs As New ADODB.Recordset
   strSql = "delete * from AlterationInfo where id=" & intId
   Set rs = ExecuteSQL(strSql, strMsg)
   
   Call Form_Load
  End If
  
    
End Sub

Private Sub cmdExit_Click()
  Unload Me
  
End Sub

Private Sub cmdOk_Click(Index As Integer)
 If Grid1.Rows < 1 Then Exit Sub
 
  Dim intId As Integer
  intId = Grid1.TextMatrix(Grid1.Row, 1)
  
  Dim strSql As String
  Dim strMsg As String
  Dim rs As New ADODB.Recordset
  
  
If Trim(txtXBM) = "" Then
   MsgBox "请输入新部门!"
   cboXBM.SetFocus
    Exit Sub
 End If
   
   
If Trim(txtXZW) = "" Then
   MsgBox "请输入新职务!!"
   txtXZW.SetFocus
   Exit Sub
 End If

   strSql = "delete * from AlterationInfo where id=" & intId
   Set rs = ExecuteSQL(strSql, strMsg)
   

   
   strSql2 = "select * from AlterationInfo"
   Set rs2 = ExecuteSQL(strSql2, strMsg)
   
   rs2.AddNew
   rs2.Fields("id") = intId
   rs2.Fields("工号") = txtGH.Text
   rs2.Fields("原部门") = txtYBM.Text
   rs2.Fields("新部门") = txtXBM.Text
   rs2.Fields("原职务") = txtYZW.Text
   rs2.Fields("新职务") = txtXZW.Text
   rs2.Fields("备注") = txtBZ.Text
   rs2.Fields("调入时间") = dtpDL.Value
   rs2.Fields("调出时间") = dtpDC.Value
   rs2.Update
   rs2.Close
  

   MsgBox "修改成功!"
   Call Form_Load
  
End Sub

Private Sub Form_Load()
Dim strSql As String
Dim strMsg As String
Dim rs As New ADODB.Recordset
 
strSql = "select * from AlterationInfo"
Set rs = ExecuteSQL(strSql, strMsg)

Call FillData(rs, Grid1)

 If Grid1.Rows > 1 Then
   Grid1.RowSel = 1
 End If
End Sub

Private Sub TabStrip1_Click()

End Sub

Private Sub Text1_Change()

End Sub

Private Sub Grid1_Click()
   If Grid1.Rows <= 1 Then Exit Sub
   Dim intId As Integer
   intId = Grid1.TextMatrix(Grid1.Row, 1)
   
   If intId < 1 Then Exit Sub
   
   Dim strSql As String
   Dim strMsg As String
   Dim rs As New ADODB.Recordset
   
   strSql = "select * from AlterationInfo,t_br  where AlterationInfo.工号=t_br.工号 and AlterationInfo.id=" & intId
   Set rs = ExecuteSQL(strSql, strMsg)
   
   txtName = rs.Fields("姓名")
   txtGH = rs.Fields("AlterationInfo.工号")
   txtYZW = rs.Fields("原职务")
   txtXZW = rs.Fields("新职务")
   txtYBM = rs.Fields("原部门")
   txtXBM = rs.Fields("新部门")
   If IsNull(rs.Fields("备注")) Then
   txtBZ = ""
   Else
   txtBZ = rs.Fields("备注")
   End If
   dtpDC.Value = rs.Fields("调出时间")
   dtpDL.Value = rs.Fields("调入时间")
   rs.Close
   Set rs = Nothing
End Sub

⌨️ 快捷键说明

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