DurnyklyYol/DurnyklyYol.Module/BusinessObjects/Region.cs

41 lines
1.6 KiB
C#
Raw Normal View History

2024-09-02 10:07:25 +00:00
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("Places")]
[ImageName("BO_Country_v92")]
[DefaultProperty(nameof(Name))]
//[DefaultListViewOptions(MasterDetailMode.ListViewOnly, false, NewItemRowPosition.None)]
//[Persistent("DatabaseTableName")]
// Specify more UI options using a declarative approach (https://documentation.devexpress.com/#eXpressAppFramework/CustomDocument112701).
public class Region : 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 Region(Session session)
: base(session)
{
}
string name;
[Size(SizeAttribute.DefaultStringMappingFieldSize), Indexed, RuleUniqueValue, RuleRequiredField(DefaultContexts.Save)]
public string Name
{
get => name;
set => SetPropertyValue(nameof(Name), ref name, value);
}
}
}