DepartmentProject/DepartmentPortal/Security/SecurityWindowsDesktop/Controls/RolesControl.cs

37 lines
1.1 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 DesktopTools.Controls;
using DesktopTools.Models;
using ModelTools.BusinessLogics;
using ModelTools.Enums;
using SecurityBusinessLogic.BindingModels;
using SecurityBusinessLogic.BusinessLogics;
using SecurityBusinessLogic.ViewModels;
using System;
namespace SecurityWindowsDesktop.Controls
{
public partial class RolesControl : AbstractGenerticControlEntityList<RoleGetBindingModel, RoleSetBindingModel, RoleListViewModel, RoleViewModel, RoleBusinessLogic>
{
public RolesControl() : base()
{
InitializeComponent();
_businessLogic = UnityContainerConfigurator.Resolve<RoleBusinessLogic>();
Title = "Роли";
Id = new Guid("6a33ce5c-e950-4294-9f75-2a0b35941bf7");
Order = 1;
AccessOperation = AccessOperation.Роли;
}
public override ControlViewEntityList Clone() => new RolesControl() { Id = Guid.NewGuid() };
protected override ControlViewEntityListConfiguration GetConfig() => new()
{
PaginationOn = false
};
protected override RoleListViewModel GetData()
{
var list = _businessLogic.GetList(new RoleGetBindingModel());
return list;
}
}
}