using ModuleTools.Attributes;
using ModuleTools.Enums;
using ModuleTools.ViewModels;
namespace DepartmentBusinessLogic.ViewModels
{
///
/// Список должностей сотрудников
///
public class EmployeePostListViewModel : ListViewModel { }
///
/// Элемент должности сотрудников
///
[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;
}
}