35 lines
1.5 KiB
C#
35 lines
1.5 KiB
C#
using CoreModels.Enums.Department;
|
|
using CoreModels.ModelsDepartment;
|
|
using System;
|
|
using ToolsModule.ManagmentEntity;
|
|
|
|
namespace DepartmentContract.ViewModels
|
|
{
|
|
/// <summary>
|
|
/// Список приказов
|
|
/// </summary>
|
|
public class OrderListViewModel : ListViewModel<OrderViewModel> { }
|
|
|
|
/// <summary>
|
|
/// Элемент приказа
|
|
/// </summary>
|
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
|
[ViewModelControlElementDependenceEntity(Title = "Записи по студентам", Order = 1, ParentPropertyName = "OrderId",
|
|
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");
|
|
}
|
|
} |