📄 frmmoveinfo.frm
字号:
VERSION 5.00
Object = "{3A6644DE-3402-11D9-9DE7-C33FAA87690A}#1.0#0"; "WinXPCEngine.ocx"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form FrmMoveInfo
BorderStyle = 3 'Fixed Dialog
Caption = "员工调动信息"
ClientHeight = 5355
ClientLeft = 45
ClientTop = 330
ClientWidth = 6060
Icon = "FrmMoveInfo.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5355
ScaleWidth = 6060
ShowInTaskbar = 0 'False
Begin VB.PictureBox Picture2
Height = 2295
Left = 120
ScaleHeight = 2235
ScaleWidth = 5745
TabIndex = 13
Top = 240
Width = 5805
Begin VB.TextBox TxtBranch
Enabled = 0 'False
Height = 330
Left = 1200
TabIndex = 4
Top = 720
Width = 1575
End
Begin VB.TextBox TxtName
Enabled = 0 'False
Height = 330
Left = 4080
TabIndex = 3
Top = 240
Width = 1575
End
Begin VB.TextBox TxtForTitle
Enabled = 0 'False
Height = 330
Left = 1200
TabIndex = 6
Top = 1200
Width = 1575
End
Begin MSComCtl2.DTPicker DTPfolddate
Height = 330
Left = 4080
TabIndex = 9
Top = 1680
Width = 1575
_ExtentX = 2778
_ExtentY = 582
_Version = 393216
Format = 73203713
CurrentDate = 38316
End
Begin MSComCtl2.DTPicker DTPmovedate
Height = 330
Left = 1200
TabIndex = 8
Top = 1680
Width = 1575
_ExtentX = 2778
_ExtentY = 582
_Version = 393216
Format = 73203713
CurrentDate = 38316
End
Begin MSDataListLib.DataCombo CmbCode
Height = 330
Left = 1200
TabIndex = 2
Top = 240
Width = 1575
_ExtentX = 2778
_ExtentY = 582
_Version = 393216
Style = 2
ListField = ""
Text = ""
End
Begin MSDataListLib.DataCombo CmbNewBranch
Height = 330
Left = 4080
TabIndex = 5
Top = 720
Width = 1575
_ExtentX = 2778
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin MSDataListLib.DataCombo CmbNewTitle
Height = 330
Left = 4080
TabIndex = 7
Top = 1200
Width = 1575
_ExtentX = 2778
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin VB.Label lblcode
AutoSize = -1 'True
Caption = "员工编号:"
Height = 180
Left = 120
TabIndex = 21
Top = 315
Width = 900
End
Begin VB.Label lblname
AutoSize = -1 'True
Caption = "员工姓名:"
Height = 180
Left = 3000
TabIndex = 20
Top = 315
Width = 900
End
Begin VB.Label lblforbranch
AutoSize = -1 'True
Caption = "原部门名称:"
Height = 180
Left = 120
TabIndex = 19
Top = 795
Width = 1080
End
Begin VB.Label lblnewbrach
AutoSize = -1 'True
Caption = "新部门名称:"
Height = 180
Left = 3000
TabIndex = 18
Top = 795
Width = 1080
End
Begin VB.Label lblforname
AutoSize = -1 'True
Caption = "原职务:"
Height = 180
Left = 120
TabIndex = 17
Top = 1275
Width = 720
End
Begin VB.Label lblnewname
AutoSize = -1 'True
Caption = "新职务:"
Height = 180
Left = 3000
TabIndex = 16
Top = 1275
Width = 720
End
Begin VB.Label lblmovedate
AutoSize = -1 'True
Caption = "调出时间:"
Height = 180
Left = 120
TabIndex = 15
Top = 1755
Width = 900
End
Begin VB.Label lblfolddate
AutoSize = -1 'True
Caption = "调入时间:"
Height = 180
Left = 3000
TabIndex = 14
Top = 1755
Width = 900
End
End
Begin VB.PictureBox Picture1
Height = 1575
Left = 120
ScaleHeight = 1515
ScaleWidth = 5745
TabIndex = 11
Top = 2760
Width = 5805
Begin VB.TextBox TxtRemark
Height = 1095
Left = 1080
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 10
Top = 240
Width = 4575
End
Begin VB.Label lblremark
AutoSize = -1 'True
Caption = "备 注:"
Height = 180
Left = 120
TabIndex = 12
Top = 240
Width = 900
End
End
Begin VB.CommandButton cmdcancel
Caption = "返回(&C)"
Height = 375
Left = 4560
TabIndex = 1
Top = 4680
Width = 1335
End
Begin VB.CommandButton cmdOK
Caption = "确认(&O)"
Default = -1 'True
Height = 375
Left = 3120
TabIndex = 0
Top = 4680
Width = 1335
End
Begin WinXPC_Engine.WindowsXPC WinXPMoveInfo
Left = 1560
Top = 3240
_ExtentX = 6588
_ExtentY = 1085
ColorScheme = 2
Common_Dialog = 0 'False
End
End
Attribute VB_Name = "FrmMoveInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub CmbCode_Change()
If RstName.State = adStateOpen Then
RstName.Close '//关闭记录集
End If
RstName.Open "select *from 员工档案 where 员工编号='" & CmbCode.Text & "'", DBCON, adOpenKeyset, adLockOptimistic, adCmdText
TxtName.Text = RstName.Fields(1).Value '//给文本框赋值
TxtBranch.Text = RstName.Fields(16).Value
TxtForTitle.Text = RstName.Fields(18).Value
End Sub
Private Sub cmdcancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
If CmbCode.Text <> Empty Then
If RsAddmove.State = adStateClosed Then
RsAddmove.Open "调动信息", DBCON, adOpenDynamic, adLockOptimistic, adCmdTable
End If
RsAddmove.AddNew '添加一条新记录
Call Addnewmove
RsAddmove.Update '更新记录
CmbCode.Text = Empty
TxtName.Text = Empty
TxtBranch.Text = Empty
CmbNewBranch.Text = Empty
TxtForTitle.Text = Empty
CmbNewTitle.Text = Empty
DTPmovedate = Date
DTPfolddate = Date
TxtRemark.Text = Empty
MsgBox "数据已被保存", , "保存成功"
Else
MsgBox "员工编号不能为空", , "验证失败"
End If
End Sub
Private Sub Form_Load()
WinXPMoveInfo.InitSubClassing
Me.Left = Frmmdimain.Width / 4
Me.Top = Frmmdimain.Height / 20
If RsCode.State = adStateClosed Then
RsCode.Open "员工档案", DBCON, adOpenKeyset, adLockOptimistic, adCmdTable
End If
Set CmbCode.RowSource = RsCode
CmbCode.BoundColumn = "员工编号"
CmbCode.ListField = "员工编号"
If RstBranch.State = adStateClosed Then
RstBranch.Open "部门管理", DBCON, adOpenKeyset, adLockOptimistic, adCmdTable
End If
Set CmbNewBranch.RowSource = RstBranch
CmbNewBranch.BoundColumn = "部门名称"
CmbNewBranch.ListField = "部门名称"
If RsMoveTitle.State = adStateClosed Then
RsMoveTitle.Open "员工职务", DBCON, adOpenKeyset, adLockOptimistic, adCmdTable
End If
Set CmbNewTitle.RowSource = RsMoveTitle
CmbNewTitle.BoundColumn = "员工职务"
CmbNewTitle.ListField = "员工职务"
End Sub
Private Sub Addnewmove()
RsAddmove.Fields(0).Value = CmbCode.Text
RsAddmove.Fields(1).Value = TxtName.Text
RsAddmove.Fields(2).Value = TxtBranch.Text
RsAddmove.Fields(3).Value = CmbNewBranch.Text
RsAddmove.Fields(4).Value = TxtForTitle.Text
RsAddmove.Fields(5).Value = CmbNewTitle.Text
RsAddmove.Fields(6).Value = DTPmovedate.Value
RsAddmove.Fields(7).Value = DTPfolddate.Value
RsAddmove.Fields(8).Value = TxtRemark.Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -