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

32 lines
1.3 KiB
C#
Raw Normal View History

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 = "SecurityWindowsDesktop.EntityControls.ControlRoleUserList, SecurityWindowsDesktop")]
public class EmployeePostViewModel : ElementViewModel
{
[ViewModelControlListProperty("Название должность")]
[ViewModelControlElementProperty("Название должность", ControlType.ControlString, MustHaveValue = true)]
[MapConfiguration("EmployeePostName")]
public string EmployeePostName { get; set; }
[ViewModelControlListProperty("Порядок", 100)]
[ViewModelControlElementProperty("Порядок", ControlType.ControlInt, MustHaveValue = true)]
[MapConfiguration("Order")]
public int Order { get; set; }
public override string ToString() => EmployeePostName;
}
}