-
Notifications
You must be signed in to change notification settings - Fork 6
/
Employee.vb
58 lines (56 loc) · 1.56 KB
/
Employee.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Imports System
Imports DevExpress.Xpo
Imports System.ComponentModel
Imports DevExpress.Persistent.Base
Imports System.Collections.Generic
Imports DevExpress.ExpressApp.Security.Strategy
Imports DevExpress.Persistent.Validation
Namespace MainDemo.Module.BusinessObjects
<DefaultClassOptions, DefaultProperty("FullName"), ImageName("BO_User")>
Public Class Employee
Inherits SecuritySystemUser
Private _LastName As String
Private _FirstName As String
Private _department As Department
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Property FirstName() As String
Get
Return _FirstName
End Get
Set(ByVal value As String)
SetPropertyValue("FirstName", _FirstName, value)
End Set
End Property
Public Property LastName() As String
Get
Return _LastName
End Get
Set(ByVal value As String)
SetPropertyValue("LastName", _LastName, value)
End Set
End Property
<PersistentAlias("concat(FirstName, ' ', LastName)")>
Public ReadOnly Property FullName() As String
Get
Return Convert.ToString(EvaluateAlias("FullName"))
End Get
End Property
<Association, RuleRequiredField>
Public Property Department() As Department
Get
Return _department
End Get
Set(ByVal value As Department)
SetPropertyValue("Department", _department, value)
End Set
End Property
<Association>
Public ReadOnly Property Tasks() As XPCollection(Of EmployeeTask)
Get
Return GetCollection(Of EmployeeTask)("Tasks")
End Get
End Property
End Class
End Namespace