using DepartmentBusinessLogic.Enums; using ModuleTools.Attributes; using ModuleTools.Enums; using ModuleTools.ViewModels; using System; namespace DepartmentBusinessLogic.ViewModels { /// /// Список приказов /// public class OrderListViewModel : ListViewModel { } /// /// Элемент приказа /// [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] [ViewModelControlElementDependenceEntity(Title = "Записи по студентам", Order = 1, ParentPropertyName = "AcademicPlanId", ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderStudentRecordList, DepartmentWindowsDesktop")] public class OrderViewModel : ElementViewModel { [ViewModelControlListProperty("Номер приказа", ColumnWidth = 120)] [ViewModelControlElementProperty("Номер приказа", ControlType.ControlString, MustHaveValue = true)] [MapConfiguration("OrderNumber")] public string OrderNumber { get; set; } [ViewModelControlListProperty("Дата приказа", ColumnWidth = 120, DefaultCellStyleFormat = "dd.MM.yyyy")] [ViewModelControlElementProperty("Дата приказа", ControlType.ControlInt, MustHaveValue = true)] [MapConfiguration("OrderDate")] public DateTime OrderDate { get; set; } [ViewModelControlElementProperty("Тип приказа", ControlType.ControlEnum, MustHaveValue = true)] [MapConfiguration("OrderType")] public OrderType OrderType { get; set; } [ViewModelControlListProperty("Тип приказа")] public string OrderTypeTitle => OrderType.ToString("G"); } }