2021-03-27 23:50:29 +04:00
|
|
|
|
using DesktopTools.Controls;
|
|
|
|
|
using DesktopTools.Models;
|
2021-03-28 19:15:55 +04:00
|
|
|
|
using ModuleTools.BusinessLogics;
|
|
|
|
|
using ModuleTools.Enums;
|
2021-03-27 23:50:29 +04:00
|
|
|
|
using SecurityBusinessLogic.BindingModels;
|
|
|
|
|
using SecurityBusinessLogic.BusinessLogics;
|
|
|
|
|
using SecurityBusinessLogic.ViewModels;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace SecurityWindowsDesktop.Controls
|
|
|
|
|
{
|
|
|
|
|
public partial class UsersControl : AbstractGenerticControlEntityList<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel, UserBusinessLogic>
|
|
|
|
|
{
|
|
|
|
|
public UsersControl() : base()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
_businessLogic = UnityContainerConfigurator.Resolve<UserBusinessLogic>();
|
|
|
|
|
Title = "Пользователи";
|
|
|
|
|
Id = new Guid("d5596997-d1f5-4e5e-b94b-6bdd6bca3452");
|
|
|
|
|
Order = 1;
|
|
|
|
|
AccessOperation = AccessOperation.Пользователи;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override ControlViewEntityList Clone() => new UsersControl() { Id = Guid.NewGuid() };
|
|
|
|
|
|
|
|
|
|
protected override ControlViewEntityListConfiguration GetConfig() => new()
|
|
|
|
|
{
|
|
|
|
|
PaginationOn = true,
|
|
|
|
|
CountElementsOnPage = 40
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
protected override UserListViewModel GetDataWithPageNumber(int page, int count)
|
|
|
|
|
{
|
|
|
|
|
var list = _businessLogic.GetList(new UserGetBindingModel
|
|
|
|
|
{
|
|
|
|
|
PageNumber = page,
|
|
|
|
|
PageSize = count
|
|
|
|
|
});
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|