DepartmentProject/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/OrderStudentRecordViewModel.cs

45 lines
2.1 KiB
C#
Raw Normal View History

2021-04-13 12:52:45 +04:00
using DepartmentBusinessLogic.Enums;
using ModuleTools.Attributes;
using ModuleTools.Enums;
using ModuleTools.ViewModels;
using System;
namespace DepartmentBusinessLogic.ViewModels
{
/// <summary>
/// Список приказов
/// </summary>
public class OrderStudentRecordListViewModel : ListViewModel<OrderStudentRecordViewModel> { }
/// <summary>
/// Элемент приказа
/// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = false)]
public class OrderStudentRecordViewModel : ElementViewModel
{
[ViewModelControlElementProperty("Приказ", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderList, DepartmentWindowsDesktop")]
[MapConfiguration("OrderId")]
public Guid OrderId { get; set; }
[ViewModelControlElementProperty("Студент", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentList, DepartmentWindowsDesktop")]
[MapConfiguration("StudentId")]
public Guid StudentId { get; set; }
[ViewModelControlElementProperty("Из группы", ControlType.ControlGuid, MustHaveValue = false, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentGroupList, DepartmentWindowsDesktop")]
[MapConfiguration("StudentGroupFromId")]
public Guid StudentGroupFromId { get; set; }
[ViewModelControlElementProperty("В группу", ControlType.ControlGuid, MustHaveValue = false, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentGroupList, DepartmentWindowsDesktop")]
[MapConfiguration("StudentGroupToId")]
public Guid StudentGroupToId { get; set; }
[ViewModelControlElementProperty("Тип приказа", ControlType.ControlEnum, MustHaveValue = true)]
[MapConfiguration("OrderStudentMoveType")]
public OrderStudentMoveType OrderStudentMoveType { get; set; }
[ViewModelControlListProperty("Тип приказа")]
public string OrderStudentMoveTypeTitle => OrderStudentMoveType.ToString("G");
public override string ToString() => $"";
}
}