2021-04-01 21:30:29 +04:00
|
|
|
|
using DesktopTools.BaseControls;
|
|
|
|
|
using DesktopTools.Controls;
|
|
|
|
|
using DesktopTools.Interfaces;
|
|
|
|
|
using DesktopTools.Models;
|
|
|
|
|
using ModuleTools.Enums;
|
|
|
|
|
using SecurityBusinessLogic.BindingModels;
|
|
|
|
|
using SecurityBusinessLogic.BusinessLogics;
|
|
|
|
|
using SecurityBusinessLogic.ViewModels;
|
|
|
|
|
using System;
|
|
|
|
|
|
2021-04-02 15:53:15 +04:00
|
|
|
|
namespace SecurityWindowsDesktop.EntityControls
|
2021-04-01 21:30:29 +04:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Реализация контрола для списка пользователей
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class ControlUserList :
|
|
|
|
|
GenericControlEntityList<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel, UserBusinessLogic>,
|
2021-04-04 21:09:39 +04:00
|
|
|
|
IGenericControlEntityList
|
2021-04-01 21:30:29 +04:00
|
|
|
|
{
|
|
|
|
|
public ControlUserList() : base()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
Title = "Пользователи";
|
|
|
|
|
ControlId = new Guid("d5596997-d1f5-4e5e-b94b-6bdd6bca3452");
|
|
|
|
|
AccessOperation = AccessOperation.Пользователи;
|
|
|
|
|
ControlViewEntityElement = new ControlUserElement();
|
|
|
|
|
_genericControlViewEntityList = this;
|
|
|
|
|
FillSearchPanel();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IControl GetInstanceGenericControl() => new ControlUserList() { ControlId = Guid.NewGuid() };
|
|
|
|
|
|
|
|
|
|
public ControlViewEntityListConfiguration GetConfigControl() => new()
|
|
|
|
|
{
|
|
|
|
|
PaginationOn = true,
|
|
|
|
|
CountElementsOnPage = 40
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private void FillSearchPanel()
|
|
|
|
|
{
|
2021-04-03 11:39:49 +04:00
|
|
|
|
var control = new BaseControlString("UserNameForSearch", false, false, 0)
|
2021-04-01 21:30:29 +04:00
|
|
|
|
{
|
|
|
|
|
Location = new System.Drawing.Point(10, 10),
|
|
|
|
|
Size = new System.Drawing.Size(400, 23),
|
|
|
|
|
Name = "SearchUserName",
|
|
|
|
|
TabIndex = 0
|
|
|
|
|
};
|
|
|
|
|
control.SetTitleWidth(control.SetTitle("Имя пользователя:"));
|
|
|
|
|
panelSearchControls.Controls.Add(control);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|