DepartmentProject/DepartmentPortal/Security/SecurityContract/ViewModels/RoleViewModels.cs

29 lines
1.3 KiB
C#
Raw Permalink Normal View History

using CoreModels.ModelsSecurity;
2022-03-20 10:10:44 +04:00
using ToolsModule.ManagmentEntity;
namespace SecurityContract.ViewModels
{
/// <summary>
/// Список ролей
/// </summary>
public class RoleListViewModel : ListViewModel<RoleViewModel> { }
/// <summary>
/// Элемент ролей
/// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Доступы", Order = 1, ParentPropertyName = "RoleId",
ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlAccessList, SecurityWindowsDesktop")]
[ViewModelControlElementDependenceEntity(Title = "Пользователи", Order = 2, ParentPropertyName = "RoleId",
ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlUserRoleList, SecurityWindowsDesktop")]
public class RoleViewModel : ElementViewModel, IRoleModel
{
[ViewModelControlListProperty("Название роли")]
[ViewModelControlElementProperty("Название роли", ControlType.ControlString, MustHaveValue = true)]
public string RoleName { get; set; }
[ViewModelControlListProperty("Приоритет", ColumnWidth = 100)]
[ViewModelControlElementProperty("Приоритет", ControlType.ControlInt, MustHaveValue = true)]
public int RolePriority { get; set; }
}
}