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

50 lines
1.3 KiB
C#
Raw Normal View History

using DesktopTools.Controls;
using DesktopTools.Models;
using ModuleTools.Enums;
using SecurityBusinessLogic.BindingModels;
using SecurityBusinessLogic.BusinessLogics;
using SecurityBusinessLogic.ViewModels;
using System;
namespace SecurityWindowsDesktop.Controls
{
2021-03-30 22:34:31 +04:00
public partial class UsersControl : AbstractGenericControlEntityList<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel, UserBusinessLogic>
{
public UsersControl() : base()
{
InitializeComponent();
Title = "Пользователи";
ControlId = new Guid("d5596997-d1f5-4e5e-b94b-6bdd6bca3452");
Order = 1;
AccessOperation = AccessOperation.Пользователи;
}
2021-03-30 22:34:31 +04:00
public override AbstractControlViewEntityList Clone() => new UsersControl() { ControlId = Guid.NewGuid() };
protected override ControlViewEntityListConfiguration GetConfig() => new()
{
PaginationOn = true,
CountElementsOnPage = 40
};
2021-03-30 22:34:31 +04:00
protected override UserListViewModel GetData()
{
throw new NotImplementedException();
}
protected override UserListViewModel GetDataWithPageName(string key)
{
throw new NotImplementedException();
}
protected override UserListViewModel GetDataWithPageNumber(int page, int count)
{
var list = _businessLogic.GetList(new UserGetBindingModel
{
PageNumber = page,
PageSize = count
});
return list;
}
}
}