39 lines
1.6 KiB
C#
39 lines
1.6 KiB
C#
|
using DepartmentBusinessLogic.Enums;
|
|||
|
using ModuleTools.Attributes;
|
|||
|
using ModuleTools.Enums;
|
|||
|
using ModuleTools.ViewModels;
|
|||
|
using System;
|
|||
|
|
|||
|
namespace DepartmentBusinessLogic.ViewModels
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Список приказов
|
|||
|
/// </summary>
|
|||
|
public class OrderListViewModel : ListViewModel<OrderViewModel> { }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Элемент приказа
|
|||
|
/// </summary>
|
|||
|
[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");
|
|||
|
}
|
|||
|
}
|