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