frmtrans.frm

来自「开发人力资源管理系统的目的就是帮助企业的人力资源部门提高工作效率,实现企业认识信」· FRM 代码 · 共 209 行

FRM
209
字号
VERSION 5.00
Begin VB.Form FrmTrans 
   Caption         =   "员工部门调转"
   ClientHeight    =   2625
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3975
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2625
   ScaleWidth      =   3975
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton CmdCancel 
      Caption         =   "取 消"
      Height          =   400
      Left            =   2190
      MaskColor       =   &H00FFFFFF&
      MouseIcon       =   "FrmTrans.frx":0000
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   10
      Top             =   2040
      Width           =   1300
   End
   Begin VB.CommandButton CmdOK 
      Caption         =   "确 定"
      Default         =   -1  'True
      Height          =   400
      Left            =   510
      MouseIcon       =   "FrmTrans.frx":030A
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   2040
      Width           =   1300
   End
   Begin VB.Frame Frame1 
      Height          =   1815
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   3735
      Begin VB.TextBox txtTitle 
         Height          =   270
         Left            =   1440
         TabIndex        =   2
         Top             =   1395
         Width           =   2055
      End
      Begin VB.ComboBox ComboDep 
         Height          =   300
         Left            =   1440
         TabIndex        =   1
         Text            =   "Combo1"
         Top             =   980
         Width           =   2055
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "新任职务"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   180
         Left            =   240
         TabIndex        =   8
         Top             =   1440
         Width           =   780
      End
      Begin VB.Label Lbl_OldDep 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Dep"
         Height          =   180
         Left            =   1440
         TabIndex        =   7
         Top             =   645
         Width           =   270
      End
      Begin VB.Label Lbl_Emp_Name 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Name"
         Height          =   180
         Left            =   1440
         TabIndex        =   6
         Top             =   240
         Width           =   360
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "调往部门"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   180
         Left            =   240
         TabIndex        =   5
         Top             =   1040
         Width           =   780
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "现在部门"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   180
         Left            =   240
         TabIndex        =   4
         Top             =   640
         Width           =   780
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "员工姓名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   180
         Left            =   240
         TabIndex        =   3
         Top             =   240
         Width           =   780
      End
   End
End
Attribute VB_Name = "FrmTrans"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public TmpOk As Boolean

Private Sub CmdCancel_Click()
  TmpOk = False
  Unload Me
End Sub
Private Sub CmdOK_Click()
  If CurDep.Dep_Id <= 0 Then
    MsgBox "请选择调往部门"
    Exit Sub
  End If
  If Lbl_NewDep = Lbl_OldDep Then
    MsgBox "调往部门与所在部门相同,请重新设置"
    Exit Sub
  End If
  If txtTitle = "" Then
    MsgBox "请输入职务"
    Exit Sub
  End If
  
'更新部门信息
  With MyEmp
  .Dep_Id = CurDep.Dep_Id
  .Title = MakeStr(txtTitle)
  .Update_Transfer (CurEmp.Emp_Id)
  End With
  TmpOk = True
  Unload Me
End Sub

Private Sub ComboDep_GotFocus()
  txtTitle.SetFocus
  
  '设置FrmDepSel窗体的位置
  FrmDepSel.Left = Me.Left + ComboDep.Left + 350
  FrmDepSel.Top = Me.Top + ComboDep.Top + ComboDep.Height + 450
  FrmDepSel.Show 1
  
  If CurDep.Dep_Id > 0 Then
    ComboDep.Text = CurDep.Dep_name
  End If
End Sub

⌨️ 快捷键说明

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