41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using DesktopTools.Controls;
|
||
using DesktopTools.Models;
|
||
using ModuleTools.BusinessLogics;
|
||
using ModuleTools.Enums;
|
||
using SecurityBusinessLogic.BindingModels;
|
||
using SecurityBusinessLogic.BusinessLogics;
|
||
using SecurityBusinessLogic.ViewModels;
|
||
using System;
|
||
|
||
namespace SecurityWindowsDesktop.Controls
|
||
{
|
||
public partial class UsersControl : GenericControlEntityList<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel, UserBusinessLogic>
|
||
{
|
||
public UsersControl() : base()
|
||
{
|
||
InitializeComponent();
|
||
Title = "Пользователи";
|
||
ControlId = new Guid("d5596997-d1f5-4e5e-b94b-6bdd6bca3452");
|
||
Order = 1;
|
||
AccessOperation = AccessOperation.Пользователи;
|
||
}
|
||
|
||
public override BaseControlViewEntityList Clone() => new UsersControl() { ControlId = 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;
|
||
}
|
||
}
|
||
} |