using DevExpress.Persistent.Base; using DevExpress.Persistent.BaseImpl; using DevExpress.Xpo; using FileSystemData.BusinessObjects; namespace DurnyklyYol.Module.BusinessObjects { [DefaultClassOptions, CreatableItem(false), NavigationItem(false), DeferredDeletion(false)] [FileAttachment(nameof(File))] //[ImageName("BO_Contact")] //[DefaultProperty("DisplayMemberNameForLookupEditorsOfThisType")] //[DefaultListViewOptions(MasterDetailMode.ListViewOnly, false, NewItemRowPosition.None)] //[Persistent("DatabaseTableName")] // Specify more UI options using a declarative approach (https://documentation.devexpress.com/#eXpressAppFramework/CustomDocument112701). public class GoodsImage : FileSystemStoreObject { // Inherit from a different class to provide a custom primary key, concurrency and deletion behavior, etc. (https://documentation.devexpress.com/eXpressAppFramework/CustomDocument113146.aspx). // Use CodeRush to create XPO classes and properties with a few keystrokes. // https://docs.devexpress.com/CodeRushForRoslyn/118557 public GoodsImage(Session session) : base(session) { } private Goods goods; [Association("Goods-GoodsImages")] public Goods Goods { get { return goods; } set { SetPropertyValue(nameof(Goods), ref goods, value); } } private FileData file; [FileTypeFilter("ImageFiles", 1, "*.png", "*.jpg")] [Aggregated, ExpandObjectMembers(ExpandObjectMembers.Never), ImmediatePostData] public FileData File { get { return file; } set { SetPropertyValue(nameof(File), ref file, value); } } } }