DepartmentProject/DepartmentPortal/Department/DepartmentContract/ViewModels/OrderViewModels.cs

37 lines
1.6 KiB
C#
Raw Normal View History

using CoreModels.Enums.Department;
using CoreModels.ModelsDepartment;
using ToolsModule.Attributes;
using ToolsModule.Enums;
using ToolsModule.ViewModels;
2021-04-13 12:52:45 +04:00
using System;
namespace DepartmentContract.ViewModels
2021-04-13 12:52:45 +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)]
[ViewModelControlElementDependenceEntity(Title = "Записи по студентам", Order = 1, ParentPropertyName = "AcademicPlanId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderStudentRecordList, DepartmentWindowsDesktop")]
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")]
[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");
}
}