using DevExpress.Data.Filtering; using DevExpress.ExpressApp; using DevExpress.ExpressApp.DC; using DevExpress.ExpressApp.Model; using DevExpress.Persistent.Base; using DevExpress.Persistent.BaseImpl; using DevExpress.Persistent.Validation; using DevExpress.Xpo; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; namespace DurnyklyYol.Module.BusinessObjects { [DefaultClassOptions, NavigationItem(false)] [DeferredDeletion(false), CreatableItem(false)] //[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 RoutePoint : 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 RoutePoint(Session session) : base(session) { } Point point; ushort order; Route route; [Association("Route-RoutePoints")] public Route Route { get => route; set => SetPropertyValue(nameof(Route), ref route, value); } [RuleValueComparison(ValueComparisonType.LessThan, ushort.MaxValue)] public ushort Order { get => order; set => SetPropertyValue(nameof(Order), ref order, value); } [RuleRequiredField(DefaultContexts.Save)] public Point Point { get => point; set => SetPropertyValue(nameof(Point), ref point, value); } } }