/
MyTask.cs
73 lines (72 loc) · 1.99 KB
/
MyTask.cs
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using System;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
using DevExpress.ExpressApp;
using System.ComponentModel;
using DevExpress.Data.Filtering;
using DevExpress.Persistent.Base;
using System.Collections.Generic;
using DevExpress.ExpressApp.Model;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
using DevExpress.ExpressApp.Editors;
using DevExpress.Persistent.Base.General;
using DevExpress.ExpressApp.SystemModule;
namespace dxTestSolution.Module.BusinessObjects {
[DefaultClassOptions]
[DefaultProperty("Subject")]
public class MyTask : BaseObject {
public MyTask(Session session)
: base(session) {
}
public override void AfterConstruction() {
base.AfterConstruction();
}
string _subject;
public string Subject {
get {
return _subject;
}
set {
SetPropertyValue(nameof(Subject), ref _subject, value);
}
}
Contact _assignedTo;
[Association("Contact-Tasks")]
public Contact AssignedTo {
get {
return _assignedTo;
}
set {
SetPropertyValue(nameof(AssignedTo), ref _assignedTo, value);
}
}
bool _isActive;
public bool IsActive {
get {
return _isActive;
}
set {
SetPropertyValue(nameof(IsActive), ref _isActive, value);
}
}
Priority _priority;
public Priority Priority {
get {
return _priority;
}
set {
SetPropertyValue(nameof(Priority), ref _priority, value);
}
}
}
public enum Priority {
[ImageName("State_Priority_Low")]
Low = 0,
[ImageName("State_Priority_Normal")]
Normal = 1,
[ImageName("State_Priority_High")]
High = 2
}
}