2022-03-18 22:48:14 +04:00
|
|
|
|
using ToolsDesktop.BaseControls;
|
|
|
|
|
using ToolsDesktop.Controls;
|
|
|
|
|
using ToolsDesktop.Interfaces;
|
|
|
|
|
using ToolsDesktop.Models;
|
2022-03-18 22:38:52 +04:00
|
|
|
|
using ToolsModule.Enums;
|
2021-04-01 21:30:29 +04:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|