📄 frmtrans.vb
字号:
Option Strict Off
Option Explicit On
Friend Class FrmTrans
Inherits System.Windows.Forms.Form
Public TmpOk As Boolean
Private Sub CmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdCancel.Click
TmpOk = False
Me.Close()
End Sub
Private Sub CmdOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdOK.Click
Dim Lbl_NewDep As Object
If CurDep.Dep_Id <= 0 Then
MsgBox("请选择调往部门")
Exit Sub
End If
If Lbl_NewDep = Lbl_OldDep.Text Then
MsgBox("调往部门与所在部门相同,请重新设置")
Exit Sub
End If
If txtTitle.Text = "" Then
MsgBox("请输入职务")
Exit Sub
End If
'更新部门信息
With MyEmp
.Dep_Id = CurDep.Dep_Id
.Title = Trim(txtTitle.Text)
.Update_Transfer((CurEmp.Emp_Id))
End With
TmpOk = True
Me.Close()
End Sub
Private Sub ComboDep_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboDep.Enter
txtTitle.Focus()
'设置FrmDepSel窗体的位置
FrmDepSel.Left = VB6.TwipsToPixelsX(VB6.PixelsToTwipsX(Me.Left) + VB6.PixelsToTwipsX(ComboDep.Left) + 350)
FrmDepSel.Top = VB6.TwipsToPixelsY(VB6.PixelsToTwipsY(Me.Top) + VB6.PixelsToTwipsY(ComboDep.Top) + VB6.PixelsToTwipsY(ComboDep.Height) + 450)
FrmDepSel.ShowDialog()
If CurDep.Dep_Id > 0 Then
ComboDep.Text = CurDep.Dep_name
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -