-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDocument.cs
25 lines (22 loc) · 855 Bytes
/
Document.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
using DevExpress.ExpressApp.DC;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl.EF;
using DevExpress.Persistent.Validation;
using System.ComponentModel.DataAnnotations.Schema;
namespace Demo.Module.BusinessObjects {
[DefaultClassOptions]
[XafDefaultProperty("Title")]
[ImageName("BO_Note")]
public class Document : BaseObject {
public virtual string DocumentId {
get { return $"D{SequentialNumber.ToString("D6")}"; }
}
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public virtual long SequentialNumber { get; set; }
[RuleRequiredField("IDocument.Title.RuleRequiredField", DefaultContexts.Save)]
[FieldSize(255)]
public virtual string Title { get; set; }
[FieldSize(8192)]
public virtual string Text { get; set; }
}
}