2022-03-18 22:24:10 +04:00
|
|
|
|
using CoreModels.Enums.Department;
|
|
|
|
|
using CoreModels.ModelsDepartment;
|
2021-04-13 12:52:45 +04:00
|
|
|
|
using System;
|
2022-03-20 10:10:44 +04:00
|
|
|
|
using ToolsModule.ManagmentEntity;
|
2021-04-13 12:52:45 +04:00
|
|
|
|
|
2022-03-19 22:48:13 +04:00
|
|
|
|
namespace DepartmentContract.ViewModels
|
2021-04-13 12:52:45 +04:00
|
|
|
|
{
|
2022-03-18 22:24:10 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список приказов
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class OrderListViewModel : ListViewModel<OrderViewModel> { }
|
2021-04-13 12:52:45 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Элемент приказа
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
2022-03-29 13:33:32 +04:00
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Записи по студентам", Order = 1, ParentPropertyName = "OrderId",
|
2021-04-13 12:52:45 +04:00
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderStudentRecordList, DepartmentWindowsDesktop")]
|
2022-03-18 22:24:10 +04:00
|
|
|
|
public class OrderViewModel : ElementViewModel, IOrderModel
|
2021-04-13 12:52:45 +04:00
|
|
|
|
{
|
|
|
|
|
[ViewModelControlListProperty("Номер приказа", ColumnWidth = 120)]
|
|
|
|
|
[ViewModelControlElementProperty("Номер приказа", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string OrderNumber { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Дата приказа", ColumnWidth = 120, DefaultCellStyleFormat = "dd.MM.yyyy")]
|
2021-04-27 15:14:35 +04:00
|
|
|
|
[ViewModelControlElementProperty("Дата приказа", ControlType.ControlDateTime, MustHaveValue = true)]
|
2021-04-13 12:52:45 +04:00
|
|
|
|
public DateTime OrderDate { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Тип приказа", ControlType.ControlEnum, MustHaveValue = true)]
|
|
|
|
|
public OrderType OrderType { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Тип приказа")]
|
|
|
|
|
public string OrderTypeTitle => OrderType.ToString("G");
|
|
|
|
|
}
|
|
|
|
|
}
|