DepartmentProject/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.cs

43 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using ToolsDesktop.Controls;
using ToolsDesktop.Enums;
using ToolsDesktop.Interfaces;
using ToolsDesktop.Models;
using ToolsModule.Enums;
using SecurityBusinessLogic.BindingModels;
using SecurityBusinessLogic.BusinessLogics;
using SecurityBusinessLogic.ViewModels;
using System;
using System.Collections.Generic;
namespace SecurityWindowsDesktop.EntityControls
{
/// <summary>
/// Реализация контрола для списка ролей пользователя
/// </summary>
public partial class ControlUserRoleList :
GenericControlEntityList<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel, UserRoleBusinessLogic>,
IGenericControlEntityList
{
public ControlUserRoleList()
{
InitializeComponent();
Title = "Связи пользователей с ролями";
ControlId = new Guid("c5748925-c8ec-4d06-a256-c72b0983d332");
AccessOperation = AccessOperation.ПользователиРоли;
ControlViewEntityElement = new ControlUserRoleElement();
_genericControlViewEntityList = this;
}
public IControl GetInstanceGenericControl() => new ControlUserRoleList() { ControlId = Guid.NewGuid() };
public ControlViewEntityListConfiguration GetConfigControl() => new()
{
PaginationOn = false,
HideToolStripButton = new List<ToolStripButtonListNames>
{
ToolStripButtonListNames.toolStripButtonUpd,
ToolStripButtonListNames.toolStripButtonSearch
}
};
}
}