DurnyklyYol/DurnyklyYol.Module/BusinessObjects/CargoRoutePoints.cs

54 lines
1.5 KiB
C#

using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Xpo;
using System.ComponentModel;
namespace DurnyklyYol.Module.BusinessObjects
{
[DefaultClassOptions, CreatableItem(false), NavigationItem(false), DeferredDeletion(false)]
public class CargoRoutePoints : BaseObject
{ // 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 CargoRoutePoints(Session session)
: base(session)
{
}
Cargo cargo;
DateTime? date;
Point point;
ushort order;
[Index(0), ReadOnly(true)]
public ushort Order
{
get => order;
set => SetPropertyValue(nameof(Order), ref order, value);
}
[ReadOnly(true), Index(1)]
public Point Point
{
get => point;
set => SetPropertyValue(nameof(Point), ref point, value);
}
[Index(2)]
public DateTime? Date
{
get => date;
set => SetPropertyValue(nameof(Date), ref date, value);
}
[Association, Browsable(false)]
public Cargo Cargo
{
get => cargo;
set => SetPropertyValue(nameof(Cargo), ref cargo, value);
}
}
}