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

41 lines
1.2 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 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;
}
}
}