?? 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 + -