DurnyklyYol/DurnyklyYol.Module/BusinessObjects/GoodsImage.cs

39 lines
1.7 KiB
C#
Raw Normal View History

2024-09-02 10:07:25 +00:00
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)
{
}
2024-09-26 06:06:05 +00:00
//private Goods goods;
//[Association("Goods-GoodsImages")]
//public Goods Goods
//{
// get { return goods; }
// set { SetPropertyValue(nameof(Goods), ref goods, value); }
//}
2024-09-02 10:07:25 +00:00
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); }
}
}
}