using CoreModels.Enums.Department;
using CoreModels.ModelsDepartment;
using System;
using ToolsModule.ManagmentEntity;
namespace DepartmentContract.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, IOrderModel
{
[ViewModelControlListProperty("Номер приказа", ColumnWidth = 120)]
[ViewModelControlElementProperty("Номер приказа", ControlType.ControlString, MustHaveValue = true)]
public string OrderNumber { get; set; }
[ViewModelControlListProperty("Дата приказа", ColumnWidth = 120, DefaultCellStyleFormat = "dd.MM.yyyy")]
[ViewModelControlElementProperty("Дата приказа", ControlType.ControlDateTime, MustHaveValue = true)]
public DateTime OrderDate { get; set; }
[ViewModelControlElementProperty("Тип приказа", ControlType.ControlEnum, MustHaveValue = true)]
public OrderType OrderType { get; set; }
[ViewModelControlListProperty("Тип приказа")]
public string OrderTypeTitle => OrderType.ToString("G");
}
}