📄 frmaddteam.frm
字号:
VERSION 5.00
Begin VB.Form FrmAddteam
BorderStyle = 1 'Fixed Single
Caption = "添加项目组成员"
ClientHeight = 3105
ClientLeft = 45
ClientTop = 330
ClientWidth = 2430
Icon = "FrmAddteam.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3105
ScaleWidth = 2430
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_Cancel
BackColor = &H80000000&
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 1305
MouseIcon = "FrmAddteam.frx":1272
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 2
Top = 2520
Width = 1035
End
Begin VB.CommandButton Cmd_Ok
BackColor = &H80000000&
Caption = "确 定"
Height = 400
Left = 105
MouseIcon = "FrmAddteam.frx":157C
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 1
Top = 2520
Width = 1035
End
Begin VB.ListBox List1
Height = 1860
Left = 120
TabIndex = 0
Top = 480
Width = 2175
End
Begin VB.Label lblTitle
Caption = "lblTitle"
Height = 255
Left = 1080
TabIndex = 4
Top = 120
Width = 975
End
Begin VB.Label Label1
Caption = "职务:"
Height = 255
Left = 120
TabIndex = 3
Top = 120
Width = 615
End
End
Attribute VB_Name = "FrmAddteam"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public TmpType As Integer
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
'判断是否选择了员工
If List1.ListIndex < 0 Then
MsgBox "请选择员工"
Exit Sub
End If
'判断选择的员工是否已经添加到项目组中
If MyTeam.In_DB(CurProj.ProjId, List1.Text) = True Then
MsgBox "已经添加到项目组"
Exit Sub
End If
'把用户选择的数据赋值到MyTeam对象中,然后插入数据库
MyTeam.Ename = MakeStr(List1.Text)
MyTeam.Title = lblTitle
MyTeam.ProjId = CurProj.ProjId
MyTeam.Insert
'关闭窗体
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
'根据指定的用户类型,读取所有员工的姓名到数组Arr_Ename()中
MyUser.LoadEname (TmpType)
i = 0
'把员工姓名添加到List1中
Do While Arr_Ename(i) <> ""
List1.AddItem Arr_Ename(i)
i = i + 1
Loop
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -