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

32 lines
1.3 KiB
C#

using ModuleTools.Attributes;
using ModuleTools.Enums;
using ModuleTools.ViewModels;
namespace DepartmentBusinessLogic.ViewModels
{
/// <summary>
/// Список должностей сотрудников
/// </summary>
public class EmployeePostListViewModel : ListViewModel<EmployeePostViewModel> { }
/// <summary>
/// Элемент должности сотрудников
/// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Сотрудники", Order = 1, ParentPropertyName = "EmployeePostId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeePostEmployeeList, DepartmentWindowsDesktop")]
public class EmployeePostViewModel : ElementViewModel
{
[ViewModelControlListProperty("Название должности")]
[ViewModelControlElementProperty("Название должности", ControlType.ControlString, MustHaveValue = true)]
[MapConfiguration("EmployeePostName")]
public string EmployeePostName { get; set; }
[ViewModelControlListProperty("Порядок", ColumnWidth = 100)]
[ViewModelControlElementProperty("Порядок", ControlType.ControlInt, MustHaveValue = true)]
[MapConfiguration("Order")]
public int Order { get; set; }
public override string ToString() => EmployeePostName;
}
}