рпавки при отладке + убрали получение спсиок в контролах

This commit is contained in:
kotcheshir73 2021-04-04 21:09:39 +04:00
parent dc0f0e376e
commit 3d17927bce
58 changed files with 923 additions and 1483 deletions

View File

@ -0,0 +1,845 @@
// <auto-generated />
using System;
using DatabaseCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace DatabaseCore.Migrations
{
[DbContext(typeof(DatabaseContext))]
[Migration("20210404170518_RemLecturerField")]
partial class RemLecturerField
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.4")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("DatabaseCore.Models.Department.Classroom", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<int>("Capacity")
.HasColumnType("int");
b.Property<int>("ClassroomType")
.HasColumnType("int");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("EmployeeId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("HaveProjector")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("Number")
.HasColumnType("nvarchar(450)");
b.Property<byte[]>("Photo")
.HasColumnType("varbinary(max)");
b.Property<string>("SecurityCode")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("Square")
.HasColumnType("decimal(18,2)");
b.Property<string>("Title")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("EmployeeId");
b.HasIndex("Number")
.IsUnique()
.HasFilter("[Number] IS NOT NULL");
b.ToTable("Classrooms");
});
modelBuilder.Entity("DatabaseCore.Models.Department.Discipline", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("DisciplineBlockId")
.HasColumnType("uniqueidentifier");
b.Property<string>("DisciplineBlueAsteriskName")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisciplineName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("DisciplineShortName")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.HasKey("Id");
b.HasIndex("DisciplineBlockId");
b.HasIndex("DisciplineName")
.IsUnique();
b.ToTable("Disciplines");
});
modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("DisciplineBlockBlueAsteriskName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisciplineBlockOrder")
.HasColumnType("int");
b.Property<bool>("DisciplineBlockUseForGrouping")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("Title")
.IsUnique();
b.ToTable("DisciplineBlocks");
});
modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Address")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DateBirth")
.HasColumnType("datetime2");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("Email")
.HasColumnType("nvarchar(max)");
b.Property<string>("FirstName")
.HasColumnType("nvarchar(450)");
b.Property<string>("GroupElectricalSafety")
.HasColumnType("nvarchar(max)");
b.Property<string>("HomeNumber")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("LastName")
.HasColumnType("nvarchar(450)");
b.Property<string>("MobileNumber")
.HasColumnType("nvarchar(max)");
b.Property<string>("Patronymic")
.HasColumnType("nvarchar(450)");
b.Property<byte[]>("Photo")
.HasColumnType("varbinary(max)");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("UserId");
b.HasIndex("FirstName", "LastName", "Patronymic")
.IsUnique()
.HasFilter("[FirstName] IS NOT NULL AND [LastName] IS NOT NULL AND [Patronymic] IS NOT NULL");
b.ToTable("Employees");
});
modelBuilder.Entity("DatabaseCore.Models.Department.EmployeeEmployeePost", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<Guid>("EmployeeId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("EmployeePostId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<bool>("IsExternalCombination")
.HasColumnType("bit");
b.Property<bool>("IsInternalCombination")
.HasColumnType("bit");
b.Property<decimal>("Rate")
.HasColumnType("decimal(18,2)");
b.HasKey("Id");
b.HasIndex("EmployeeId");
b.HasIndex("EmployeePostId");
b.ToTable("EmployeeEmployeePosts");
});
modelBuilder.Entity("DatabaseCore.Models.Department.EmployeePost", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("EmployeePostName")
.HasColumnType("nvarchar(450)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<int>("Order")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("EmployeePostName")
.IsUnique()
.HasFilter("[EmployeePostName] IS NOT NULL");
b.ToTable("EmployeePosts");
});
modelBuilder.Entity("DatabaseCore.Models.Department.Lecturer", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Abbreviation")
.HasColumnType("nvarchar(max)");
b.Property<string>("Address")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DateBirth")
.HasColumnType("datetime2");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("HomeNumber")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<Guid?>("LecturerAcademicDegreeId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("LecturerAcademicRankId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("LecturerPostId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("LecturerPostRate")
.HasColumnType("decimal(18,2)");
b.Property<string>("MobileNumber")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<bool>("OnlyForPrivate")
.HasColumnType("bit");
b.Property<string>("Patronymic")
.HasColumnType("nvarchar(450)");
b.Property<byte[]>("Photo")
.HasColumnType("varbinary(max)");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("LecturerAcademicDegreeId");
b.HasIndex("LecturerAcademicRankId");
b.HasIndex("LecturerPostId");
b.HasIndex("UserId");
b.HasIndex("FirstName", "LastName", "Patronymic")
.IsUnique()
.HasFilter("[Patronymic] IS NOT NULL");
b.ToTable("Lecturers");
});
modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicDegree", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("LecturerAcademicDegreeName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("Order")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("LecturerAcademicDegreeName")
.IsUnique();
b.ToTable("LecturerAcademicDegrees");
});
modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicRank", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("LecturerAcademicRankName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("Order")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("LecturerAcademicRankName")
.IsUnique();
b.ToTable("LecturerAcademicRanks");
});
modelBuilder.Entity("DatabaseCore.Models.Department.LecturerEmployeePost", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<Guid>("EmployeePostId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<bool>("IsExternalCombination")
.HasColumnType("bit");
b.Property<bool>("IsInternalCombination")
.HasColumnType("bit");
b.Property<Guid>("LecturerId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Rate")
.HasColumnType("decimal(18,2)");
b.HasKey("Id");
b.HasIndex("EmployeePostId");
b.HasIndex("LecturerId");
b.ToTable("LecturerEmployeePosts");
});
modelBuilder.Entity("DatabaseCore.Models.Department.LecturerPost", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<int>("Hours")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("LecturerPostName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("Order")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("LecturerPostName")
.IsUnique();
b.ToTable("LecturerPosts");
});
modelBuilder.Entity("DatabaseCore.Models.Security.Access", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<int>("AccessOperation")
.HasColumnType("int");
b.Property<int>("AccessType")
.HasColumnType("int");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("Accesses");
});
modelBuilder.Entity("DatabaseCore.Models.Security.EnviromentSetting", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("Key")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("Key")
.IsUnique();
b.ToTable("EnviromentSettings");
});
modelBuilder.Entity("DatabaseCore.Models.Security.Role", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("RoleName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("RolePriority")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("RoleName")
.IsUnique();
b.ToTable("Roles");
});
modelBuilder.Entity("DatabaseCore.Models.Security.User", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<byte[]>("Avatar")
.HasColumnType("varbinary(max)");
b.Property<int>("CountAttempt")
.HasColumnType("int");
b.Property<DateTime?>("DateBanned")
.HasColumnType("datetime2");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateLastVisit")
.HasColumnType("datetime2");
b.Property<bool>("IsBanned")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("UserName");
b.ToTable("Users");
});
modelBuilder.Entity("DatabaseCore.Models.Security.UserRole", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("RoleId");
b.HasIndex("UserId");
b.ToTable("UserRoles");
});
modelBuilder.Entity("DatabaseCore.Models.Department.Classroom", b =>
{
b.HasOne("DatabaseCore.Models.Department.Employee", "Employee")
.WithMany("Classrooms")
.HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Employee");
});
modelBuilder.Entity("DatabaseCore.Models.Department.Discipline", b =>
{
b.HasOne("DatabaseCore.Models.Department.DisciplineBlock", "DisciplineBlock")
.WithMany("Disciplines")
.HasForeignKey("DisciplineBlockId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("DisciplineBlock");
});
modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b =>
{
b.HasOne("DatabaseCore.Models.Security.User", "User")
.WithMany("Employees")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
modelBuilder.Entity("DatabaseCore.Models.Department.EmployeeEmployeePost", b =>
{
b.HasOne("DatabaseCore.Models.Department.Employee", "Employee")
.WithMany("EmployeeEmployeePosts")
.HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("DatabaseCore.Models.Department.EmployeePost", "EmployeePost")
.WithMany("EmployeeEmployeePosts")
.HasForeignKey("EmployeePostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Employee");
b.Navigation("EmployeePost");
});
modelBuilder.Entity("DatabaseCore.Models.Department.Lecturer", b =>
{
b.HasOne("DatabaseCore.Models.Department.LecturerAcademicDegree", "LecturerAcademicDegree")
.WithMany("Lecturers")
.HasForeignKey("LecturerAcademicDegreeId");
b.HasOne("DatabaseCore.Models.Department.LecturerAcademicRank", "LecturerAcademicRank")
.WithMany("Lecturers")
.HasForeignKey("LecturerAcademicRankId");
b.HasOne("DatabaseCore.Models.Department.LecturerPost", "LecturerPost")
.WithMany("Lecturers")
.HasForeignKey("LecturerPostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("DatabaseCore.Models.Security.User", "User")
.WithMany("Lecturers")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LecturerAcademicDegree");
b.Navigation("LecturerAcademicRank");
b.Navigation("LecturerPost");
b.Navigation("User");
});
modelBuilder.Entity("DatabaseCore.Models.Department.LecturerEmployeePost", b =>
{
b.HasOne("DatabaseCore.Models.Department.EmployeePost", "EmployeePost")
.WithMany("LecturerEmployeePosts")
.HasForeignKey("EmployeePostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer")
.WithMany("LecturerEmployeePosts")
.HasForeignKey("LecturerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("EmployeePost");
b.Navigation("Lecturer");
});
modelBuilder.Entity("DatabaseCore.Models.Security.Access", b =>
{
b.HasOne("DatabaseCore.Models.Security.Role", "Role")
.WithMany("Access")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Role");
});
modelBuilder.Entity("DatabaseCore.Models.Security.UserRole", b =>
{
b.HasOne("DatabaseCore.Models.Security.Role", "Role")
.WithMany("UserRoles")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("DatabaseCore.Models.Security.User", "User")
.WithMany("UserRoles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Role");
b.Navigation("User");
});
modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b =>
{
b.Navigation("Disciplines");
});
modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b =>
{
b.Navigation("Classrooms");
b.Navigation("EmployeeEmployeePosts");
});
modelBuilder.Entity("DatabaseCore.Models.Department.EmployeePost", b =>
{
b.Navigation("EmployeeEmployeePosts");
b.Navigation("LecturerEmployeePosts");
});
modelBuilder.Entity("DatabaseCore.Models.Department.Lecturer", b =>
{
b.Navigation("LecturerEmployeePosts");
});
modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicDegree", b =>
{
b.Navigation("Lecturers");
});
modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicRank", b =>
{
b.Navigation("Lecturers");
});
modelBuilder.Entity("DatabaseCore.Models.Department.LecturerPost", b =>
{
b.Navigation("Lecturers");
});
modelBuilder.Entity("DatabaseCore.Models.Security.Role", b =>
{
b.Navigation("Access");
b.Navigation("UserRoles");
});
modelBuilder.Entity("DatabaseCore.Models.Security.User", b =>
{
b.Navigation("Employees");
b.Navigation("Lecturers");
b.Navigation("UserRoles");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,23 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace DatabaseCore.Migrations
{
public partial class RemLecturerField : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "GroupElectricalSafety",
table: "Lecturers");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "GroupElectricalSafety",
table: "Lecturers",
type: "nvarchar(max)",
nullable: true);
}
}
}

View File

@ -309,9 +309,6 @@ namespace DatabaseCore.Migrations
.IsRequired() .IsRequired()
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");
b.Property<string>("GroupElectricalSafety")
.HasColumnType("nvarchar(max)");
b.Property<string>("HomeNumber") b.Property<string>("HomeNumber")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");

View File

@ -93,10 +93,6 @@ namespace DatabaseCore.Models.Department
[MapConfiguration("Photo")] [MapConfiguration("Photo")]
public byte[] Photo { get; set; } public byte[] Photo { get; set; }
[DataMember]
[MapConfiguration("GroupElectricalSafety")]
public string GroupElectricalSafety { get; set; }
[DataMember] [DataMember]
[MapConfiguration("OnlyForPrivate")] [MapConfiguration("OnlyForPrivate")]
public bool OnlyForPrivate { get; set; } public bool OnlyForPrivate { get; set; }

View File

@ -99,7 +99,7 @@ namespace DesktopTools.BaseControls
throw new ArgumentNullException($"Поле свойства '{labelTitle.Text}' должно быть заполнено"); throw new ArgumentNullException($"Поле свойства '{labelTitle.Text}' должно быть заполнено");
} }
var converter = new ImageConverter(); var converter = new ImageConverter();
return (byte[])converter.ConvertTo(pictureBox.Image, typeof(byte[])); return (byte[])converter.ConvertTo(new Bitmap(pictureBox.Image), typeof(byte[]));
} }
public string GetPropertyName() => _propertyName; public string GetPropertyName() => _propertyName;

View File

@ -1,15 +1,11 @@
using DesktopTools.Models; using DesktopTools.Models;
using ModuleTools.ViewModels;
using System;
namespace DesktopTools.Interfaces namespace DesktopTools.Interfaces
{ {
/// <summary> /// <summary>
/// Работа с generic-контролом списка /// Работа с generic-контролом списка
/// </summary> /// </summary>
public interface IGenericControlEntityList<L, E> public interface IGenericControlEntityList
where L : ListViewModel<E>
where E : ElementViewModel
{ {
/// <summary> /// <summary>
/// Новый экземпляр контрола /// Новый экземпляр контрола
@ -22,33 +18,5 @@ namespace DesktopTools.Interfaces
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
ControlViewEntityListConfiguration GetConfigControl(); ControlViewEntityListConfiguration GetConfigControl();
/// <summary>
/// Получение полного списка
/// </summary>
/// <returns></returns>
L GetDataForControl();
/// <summary>
/// Получение списка с пагинацией по названиям
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
L GetDataWithPageNameForControl(string key);
/// <summary>
/// Получение списка с пагинацией по страницам
/// </summary>
/// <param name="page"></param>
/// <param name="count"></param>
/// <returns></returns>
L GetDataWithPageNumberForControl(int page, int count);
/// <summary>
/// Получение списка от родителя
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
L GetDataFromParentForControl(Guid id);
} }
} }

View File

@ -50,12 +50,7 @@ namespace DesktopTools.Controls
/// <summary> /// <summary>
/// Методы для реализации в generic-контроле /// Методы для реализации в generic-контроле
/// </summary> /// </summary>
protected IGenericControlEntityList<L, E> _genericControlViewEntityList; protected IGenericControlEntityList _genericControlViewEntityList;
/// <summary>
/// Список значений с контролов с панели поиска
/// </summary>
protected List<(string Name, object Value)> _searchValues;
/// <summary> /// <summary>
/// Констркутор /// Констркутор
@ -283,7 +278,7 @@ namespace DesktopTools.Controls
toolStripButtonAdd.Click += (object sender, EventArgs e) => { AddElement(); }; toolStripButtonAdd.Click += (object sender, EventArgs e) => { AddElement(); };
toolStripButtonUpd.Click += (object sender, EventArgs e) => { UpdElement(); }; toolStripButtonUpd.Click += (object sender, EventArgs e) => { UpdElement(); };
toolStripButtonDel.Click += (object sender, EventArgs e) => { DelElement(); }; toolStripButtonDel.Click += (object sender, EventArgs e) => { DelElement(); };
toolStripButtonSearch.Click += (object sender, EventArgs e) => { panelSearch.Visible = !panelSearch.Visible; _searchValues?.Clear(); }; toolStripButtonSearch.Click += (object sender, EventArgs e) => { panelSearch.Visible = !panelSearch.Visible; };
toolStripButtonRef.Click += async (object sender, EventArgs e) => { await LoadListAsync(); }; toolStripButtonRef.Click += async (object sender, EventArgs e) => { await LoadListAsync(); };
toolStripButtonSelect.Click += (object sender, EventArgs e) => { SelectElement(); }; toolStripButtonSelect.Click += (object sender, EventArgs e) => { SelectElement(); };
toolStripButtonClose.Click += (object sender, EventArgs e) => toolStripButtonClose.Click += (object sender, EventArgs e) =>
@ -294,7 +289,7 @@ namespace DesktopTools.Controls
}; };
buttonSearch.Click += async (object sender, EventArgs e) => { await LoadListAsync(); }; buttonSearch.Click += async (object sender, EventArgs e) => { await LoadListAsync(); };
buttonCancelSearch.Click += (object sender, EventArgs e) => { panelSearch.Visible = false; _searchValues?.Clear(); }; buttonCancelSearch.Click += (object sender, EventArgs e) => { panelSearch.Visible = false; };
dataGridViewList.KeyDown += (object sender, KeyEventArgs e) => dataGridViewList.KeyDown += (object sender, KeyEventArgs e) =>
{ {
@ -380,18 +375,17 @@ namespace DesktopTools.Controls
try try
{ {
Cursor.Current = Cursors.WaitCursor; Cursor.Current = Cursors.WaitCursor;
var model = new G();
if (panelSearch.Visible) if (panelSearch.Visible)
{ {
var controls = panelSearchControls.Controls.Cast<IBaseControl>(); var controls = panelSearchControls.Controls.Cast<IBaseControl>();
if (_searchValues == null)
{
_searchValues = new();
}
_searchValues.Clear();
foreach (var cntrl in controls) foreach (var cntrl in controls)
{ {
_searchValues.Add((cntrl.GetPropertyName(), cntrl.GetValueFromControl())); var prop = typeof(G).GetProperty(cntrl.GetPropertyName());
if (prop != null)
{
prop.SetValue(model, cntrl.GetValueFromControl());
}
} }
} }
@ -399,7 +393,11 @@ namespace DesktopTools.Controls
{ {
if (ParentId.HasValue) if (ParentId.HasValue)
{ {
await Task.Run(() => data = GetDataFromParent(ParentId.Value)); var prop = typeof(G).GetProperty(ParentPropertyName);
if (prop != null)
{
prop.SetValue(model, ParentId);
}
Visible = true; Visible = true;
} }
else else
@ -415,7 +413,8 @@ namespace DesktopTools.Controls
{ {
if (int.TryParse(toolStripTextBoxPage.Text, out int page) && int.TryParse(toolStripTextBoxCountRecords.Text.ToString(), out int count)) if (int.TryParse(toolStripTextBoxPage.Text, out int page) && int.TryParse(toolStripTextBoxCountRecords.Text.ToString(), out int count))
{ {
await Task.Run(() => data = GetDataWithPageNumber(page - 1, count)); model.PageNumber = page - 1;
model.PageSize = count;
} }
} }
// поименная // поименная
@ -423,15 +422,15 @@ namespace DesktopTools.Controls
{ {
if (toolStripComboBoxPageNames.SelectedItem is PageNamesForPaginationModel key) if (toolStripComboBoxPageNames.SelectedItem is PageNamesForPaginationModel key)
{ {
await Task.Run(() => data = GetDataWithPageName(key.Key)); var prop = typeof(G).GetProperty(toolStripComboBoxPageNames.Tag.ToString());
if (prop != null)
{
prop.SetValue(model, key.Key);
}
} }
} }
} }
else await Task.Run(() => data = _businessLogic.GetList(model));
{
await Task.Run(() => data = GetData());
}
toolStripLabelCountPages.Text = $"из {data?.MaxCount}"; toolStripLabelCountPages.Text = $"из {data?.MaxCount}";
} }
catch (Exception ex) catch (Exception ex)
@ -567,7 +566,7 @@ namespace DesktopTools.Controls
{ {
if (toolStripComboBoxPageNames.SelectedItem is PageNamesForPaginationModel key) if (toolStripComboBoxPageNames.SelectedItem is PageNamesForPaginationModel key)
{ {
control.ParentId = new Guid(key.Key); control.ParentId = new Guid(key.Key.ToString());
control.ParentPropertyName = toolStripComboBoxPageNames.Tag?.ToString(); control.ParentPropertyName = toolStripComboBoxPageNames.Tag?.ToString();
} }
} }
@ -600,13 +599,5 @@ namespace DesktopTools.Controls
} }
private ControlViewEntityListConfiguration GetConfig() => _genericControlViewEntityList?.GetConfigControl(); private ControlViewEntityListConfiguration GetConfig() => _genericControlViewEntityList?.GetConfigControl();
private L GetData() => _genericControlViewEntityList?.GetDataForControl();
private L GetDataWithPageName(string key) => _genericControlViewEntityList?.GetDataWithPageNameForControl(key);
private L GetDataWithPageNumber(int page, int count) => _genericControlViewEntityList?.GetDataWithPageNumberForControl(page, count);
private L GetDataFromParent(Guid id) => _genericControlViewEntityList?.GetDataFromParentForControl(id);
} }
} }

View File

@ -5,11 +5,11 @@
/// </summary> /// </summary>
public class PageNamesForPaginationModel public class PageNamesForPaginationModel
{ {
public string Key { get; set; } public object Key { get; set; }
public string Value { get; set; } public object Value { get; set; }
public override string ToString() => Value; public override string ToString() => Value?.ToString();
} }
} }

View File

@ -14,9 +14,9 @@ namespace DepartmentBusinessLogic.ViewModels
/// </summary> /// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Сотрудники", Order = 1, ParentPropertyName = "EmployeePostId", [ViewModelControlElementDependenceEntity(Title = "Сотрудники", Order = 1, ParentPropertyName = "EmployeePostId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeePostEmployeeList, DepartmentWindowsDesktop")] ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeeEmployeePostList, DepartmentWindowsDesktop")]
[ViewModelControlElementDependenceEntity(Title = "Сотрудники", Order = 1, ParentPropertyName = "EmployeePostId", [ViewModelControlElementDependenceEntity(Title = "Сотрудники", Order = 1, ParentPropertyName = "EmployeePostId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeePostLecturerList, DepartmentWindowsDesktop")] ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerEmployeePostList, DepartmentWindowsDesktop")]
public class EmployeePostViewModel : ElementViewModel public class EmployeePostViewModel : ElementViewModel
{ {
[ViewModelControlListProperty("Название должности")] [ViewModelControlListProperty("Название должности")]

View File

@ -13,8 +13,8 @@ namespace DepartmentBusinessLogic.ViewModels
/// Элемент должности преподавателей /// Элемент должности преподавателей
/// </summary> /// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerPostId", [ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerAcademicDegreeId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerLecturerAcademicDegreeList, DepartmentWindowsDesktop")] ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")]
public class LecturerAcademicDegreeViewModel : ElementViewModel public class LecturerAcademicDegreeViewModel : ElementViewModel
{ {
[ViewModelControlListProperty("Ученая степень")] [ViewModelControlListProperty("Ученая степень")]

View File

@ -13,8 +13,8 @@ namespace DepartmentBusinessLogic.ViewModels
/// Элемент должности преподавателей /// Элемент должности преподавателей
/// </summary> /// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerPostId", [ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerAcademicRankId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerLecturerAcademicRankList, DepartmentWindowsDesktop")] ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")]
public class LecturerAcademicRankViewModel : ElementViewModel public class LecturerAcademicRankViewModel : ElementViewModel
{ {
[ViewModelControlListProperty("Ученая степень")] [ViewModelControlListProperty("Ученая степень")]

View File

@ -14,7 +14,7 @@ namespace DepartmentBusinessLogic.ViewModels
/// </summary> /// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerPostId", [ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerPostId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerLecturerPostList, DepartmentWindowsDesktop")] ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")]
public class LecturerPostViewModel : ElementViewModel public class LecturerPostViewModel : ElementViewModel
{ {
[ViewModelControlListProperty("Название должности")] [ViewModelControlListProperty("Название должности")]

View File

@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlClassroomList : public partial class ControlClassroomList :
GenericControlEntityList<ClassroomGetBindingModel, ClassroomSetBindingModel, ClassroomListViewModel, ClassroomViewModel, ClassroomBusinessLogic>, GenericControlEntityList<ClassroomGetBindingModel, ClassroomSetBindingModel, ClassroomListViewModel, ClassroomViewModel, ClassroomBusinessLogic>,
IGenericControlEntityList<ClassroomListViewModel, ClassroomViewModel> IGenericControlEntityList
{ {
public ControlClassroomList() public ControlClassroomList()
{ {
@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public ClassroomListViewModel GetDataForControl() => _businessLogic.GetList(new ClassroomGetBindingModel());
public ClassroomListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new ClassroomGetBindingModel { EmployeeId = id });
public ClassroomListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public ClassroomListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -14,7 +14,7 @@ namespace DepartmentWindowsDesktop.EntityControls
{ {
public partial class ControlDisciplineList : public partial class ControlDisciplineList :
GenericControlEntityList<DisciplineGetBindingModel, DisciplineSetBindingModel, DisciplineListViewModel, DisciplineViewModel, DisciplineBusinessLogic>, GenericControlEntityList<DisciplineGetBindingModel, DisciplineSetBindingModel, DisciplineListViewModel, DisciplineViewModel, DisciplineBusinessLogic>,
IGenericControlEntityList<DisciplineListViewModel, DisciplineViewModel> IGenericControlEntityList
{ {
private readonly DisciplineBlockBusinessLogic _disciplineBlockBusinessLogic; private readonly DisciplineBlockBusinessLogic _disciplineBlockBusinessLogic;
@ -38,44 +38,12 @@ namespace DepartmentWindowsDesktop.EntityControls
PageNamesForPagination = _disciplineBlockBusinessLogic.GetList(new DisciplineBlockGetBindingModel())?.List?.Select(x => PageNamesForPagination = _disciplineBlockBusinessLogic.GetList(new DisciplineBlockGetBindingModel())?.List?.Select(x =>
new PageNamesForPaginationModel new PageNamesForPaginationModel
{ {
Key = x.Id.ToString(), Key = x.Id,
Value = x.Title Value = x.Title
})?.ToList(), })?.ToList(),
ParentPropertyName = "DisciplineBlockId" ParentPropertyName = "DisciplineBlockId"
}; };
public DisciplineListViewModel GetDataForControl() => throw new NotImplementedException();
public DisciplineListViewModel GetDataFromParentForControl(Guid id)
{
var model = new DisciplineGetBindingModel { DisciplineBlockId = id };
if (_searchValues != null)
{
var cntrl = _searchValues.FirstOrDefault(x => x.Name == "UserNameForSearch");
if (cntrl != default)
{
model.DisciplineName = cntrl.Value.ToString();
}
}
return _businessLogic.GetList(model);
}
public DisciplineListViewModel GetDataWithPageNameForControl(string key)
{
var model = new DisciplineGetBindingModel { DisciplineBlockId = new Guid(key) };
if (_searchValues != null)
{
var cntrl = _searchValues.FirstOrDefault(x => x.Name == "UserNameForSearch");
if (cntrl != default)
{
model.DisciplineName = cntrl.Value.ToString();
}
}
return _businessLogic.GetList(model);
}
public DisciplineListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
private void FillSearchPanel() private void FillSearchPanel()
{ {
var control = new BaseControlString("DisciplineNameForSearch", false, false, 0) var control = new BaseControlString("DisciplineNameForSearch", false, false, 0)

View File

@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlDisciplineBlockList : public partial class ControlDisciplineBlockList :
GenericControlEntityList<DisciplineBlockGetBindingModel, DisciplineBlockSetBindingModel, DisciplineBlockListViewModel, DisciplineBlockViewModel, DisciplineBlockBusinessLogic>, GenericControlEntityList<DisciplineBlockGetBindingModel, DisciplineBlockSetBindingModel, DisciplineBlockListViewModel, DisciplineBlockViewModel, DisciplineBlockBusinessLogic>,
IGenericControlEntityList<DisciplineBlockListViewModel, DisciplineBlockViewModel> IGenericControlEntityList
{ {
public ControlDisciplineBlockList() public ControlDisciplineBlockList()
{ {
@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public DisciplineBlockListViewModel GetDataForControl() => _businessLogic.GetList(new DisciplineBlockGetBindingModel());
public DisciplineBlockListViewModel GetDataFromParentForControl(Guid id) => throw new NotImplementedException();
public DisciplineBlockListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public DisciplineBlockListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlEmployeeList : public partial class ControlEmployeeList :
GenericControlEntityList<EmployeeGetBindingModel, EmployeeSetBindingModel, EmployeeListViewModel, EmployeeViewModel, EmployeeBusinessLogic>, GenericControlEntityList<EmployeeGetBindingModel, EmployeeSetBindingModel, EmployeeListViewModel, EmployeeViewModel, EmployeeBusinessLogic>,
IGenericControlEntityList<EmployeeListViewModel, EmployeeViewModel> IGenericControlEntityList
{ {
public ControlEmployeeList() public ControlEmployeeList()
{ {
@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public EmployeeListViewModel GetDataForControl() => _businessLogic.GetList(new EmployeeGetBindingModel());
public EmployeeListViewModel GetDataFromParentForControl(Guid id) => throw new NotImplementedException();
public EmployeeListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public EmployeeListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlEmployeeEmployeePostList : public partial class ControlEmployeeEmployeePostList :
GenericControlEntityList<EmployeeEmployeePostGetBindingModel, EmployeeEmployeePostSetBindingModel, EmployeeEmployeePostListViewModel, EmployeeEmployeePostViewModel, EmployeeEmployeePostBusinessLogic>, GenericControlEntityList<EmployeeEmployeePostGetBindingModel, EmployeeEmployeePostSetBindingModel, EmployeeEmployeePostListViewModel, EmployeeEmployeePostViewModel, EmployeeEmployeePostBusinessLogic>,
IGenericControlEntityList<EmployeeEmployeePostListViewModel, EmployeeEmployeePostViewModel> IGenericControlEntityList
{ {
public ControlEmployeeEmployeePostList() public ControlEmployeeEmployeePostList()
{ {
@ -39,13 +39,5 @@ namespace DepartmentWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public EmployeeEmployeePostListViewModel GetDataForControl() => throw new NotImplementedException();
public EmployeeEmployeePostListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new EmployeeEmployeePostGetBindingModel { EmployeeId = id });
public EmployeeEmployeePostListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public EmployeeEmployeePostListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -1,33 +0,0 @@

namespace DepartmentWindowsDesktop.EntityControls
{
partial class ControlEmployeePostEmployeeList
{
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором компонентов
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@ -1,51 +0,0 @@
using DepartmentBusinessLogic.BindingModels;
using DepartmentBusinessLogic.BusinessLogics;
using DepartmentBusinessLogic.ViewModels;
using DesktopTools.Controls;
using DesktopTools.Enums;
using DesktopTools.Interfaces;
using DesktopTools.Models;
using ModuleTools.Enums;
using System;
using System.Collections.Generic;
namespace DepartmentWindowsDesktop.EntityControls
{
/// <summary>
/// Реализация контрола для списка сотрудников должности
/// </summary>
public partial class ControlEmployeePostEmployeeList :
GenericControlEntityList<EmployeeEmployeePostGetBindingModel, EmployeeEmployeePostSetBindingModel, EmployeeEmployeePostListViewModel, EmployeeEmployeePostViewModel, EmployeeEmployeePostBusinessLogic>,
IGenericControlEntityList<EmployeeEmployeePostListViewModel, EmployeeEmployeePostViewModel>
{
public ControlEmployeePostEmployeeList()
{
InitializeComponent();
Title = "Связи сотрудников с должностями";
ControlId = new Guid("59a917ee-7366-4c97-8a56-42eb86cff99c");
AccessOperation = AccessOperation.Сотрудники;
ControlViewEntityElement = new ControlEmployeeEmployeePostElement();
_genericControlViewEntityList = this;
}
public IControl GetInstanceGenericControl() => new ControlEmployeePostEmployeeList() { ControlId = Guid.NewGuid() };
public ControlViewEntityListConfiguration GetConfigControl() => new()
{
PaginationOn = false,
HideToolStripButton = new List<ToolStripButtonListNames>
{
ToolStripButtonListNames.toolStripButtonUpd,
ToolStripButtonListNames.toolStripButtonSearch
}
};
public EmployeeEmployeePostListViewModel GetDataForControl() => throw new NotImplementedException();
public EmployeeEmployeePostListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new EmployeeEmployeePostGetBindingModel { EmployeePostId = id });
public EmployeeEmployeePostListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public EmployeeEmployeePostListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,33 +0,0 @@

namespace DepartmentWindowsDesktop.EntityControls
{
partial class ControlEmployeePostLecturerList
{
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором компонентов
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@ -1,48 +0,0 @@
using DepartmentBusinessLogic.BindingModels;
using DepartmentBusinessLogic.BusinessLogics;
using DepartmentBusinessLogic.ViewModels;
using DesktopTools.Controls;
using DesktopTools.Enums;
using DesktopTools.Interfaces;
using DesktopTools.Models;
using ModuleTools.Enums;
using System;
using System.Collections.Generic;
namespace DepartmentWindowsDesktop.EntityControls
{
public partial class ControlEmployeePostLecturerList :
GenericControlEntityList<LecturerEmployeePostGetBindingModel, LecturerEmployeePostSetBindingModel, LecturerEmployeePostListViewModel, LecturerEmployeePostViewModel, LecturerEmployeePostBusinessLogic>,
IGenericControlEntityList<LecturerEmployeePostListViewModel, LecturerEmployeePostViewModel>
{
public ControlEmployeePostLecturerList()
{
InitializeComponent();
Title = "Связи преподавателей с должностями";
ControlId = new Guid("48764e13-2f14-4bd4-b07d-6cf55f4db4f2");
AccessOperation = AccessOperation.Преподаватели;
ControlViewEntityElement = new ControlLecturerEmployeePostElement();
_genericControlViewEntityList = this;
}
public IControl GetInstanceGenericControl() => new ControlEmployeePostLecturerList() { ControlId = Guid.NewGuid() };
public ControlViewEntityListConfiguration GetConfigControl() => new()
{
PaginationOn = false,
HideToolStripButton = new List<ToolStripButtonListNames>
{
ToolStripButtonListNames.toolStripButtonUpd,
ToolStripButtonListNames.toolStripButtonSearch
}
};
public LecturerEmployeePostListViewModel GetDataForControl() => throw new NotImplementedException();
public LecturerEmployeePostListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new LecturerEmployeePostGetBindingModel { EmployeePostId = id });
public LecturerEmployeePostListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public LecturerEmployeePostListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlEmployeePostList : public partial class ControlEmployeePostList :
GenericControlEntityList<EmployeePostGetBindingModel, EmployeePostSetBindingModel, EmployeePostListViewModel, EmployeePostViewModel, EmployeePostBusinessLogic>, GenericControlEntityList<EmployeePostGetBindingModel, EmployeePostSetBindingModel, EmployeePostListViewModel, EmployeePostViewModel, EmployeePostBusinessLogic>,
IGenericControlEntityList<EmployeePostListViewModel, EmployeePostViewModel> IGenericControlEntityList
{ {
public ControlEmployeePostList() public ControlEmployeePostList()
{ {
@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public EmployeePostListViewModel GetDataForControl() => _businessLogic.GetList(new EmployeePostGetBindingModel());
public EmployeePostListViewModel GetDataFromParentForControl(Guid id) => throw new NotImplementedException();
public EmployeePostListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public EmployeePostListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -13,7 +13,7 @@ namespace DepartmentWindowsDesktop.EntityControls
{ {
public partial class ControlLecturerList : public partial class ControlLecturerList :
GenericControlEntityList<LecturerGetBindingModel, LecturerSetBindingModel, LecturerListViewModel, LecturerViewModel, LecturerBusinessLogic>, GenericControlEntityList<LecturerGetBindingModel, LecturerSetBindingModel, LecturerListViewModel, LecturerViewModel, LecturerBusinessLogic>,
IGenericControlEntityList<LecturerListViewModel, LecturerViewModel> IGenericControlEntityList
{ {
public ControlLecturerList() public ControlLecturerList()
{ {
@ -21,7 +21,7 @@ namespace DepartmentWindowsDesktop.EntityControls
Title = "Преподаватели"; Title = "Преподаватели";
ControlId = new Guid("9e39dbb5-3b29-4971-9574-b4c13d5470c6"); ControlId = new Guid("9e39dbb5-3b29-4971-9574-b4c13d5470c6");
AccessOperation = AccessOperation.Преподаватели; AccessOperation = AccessOperation.Преподаватели;
ControlViewEntityElement = new ControlEmployeeElement(); ControlViewEntityElement = new ControlLecturerElement();
_genericControlViewEntityList = this; _genericControlViewEntityList = this;
} }
@ -35,13 +35,5 @@ namespace DepartmentWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public LecturerListViewModel GetDataForControl() => _businessLogic.GetList(new LecturerGetBindingModel());
public LecturerListViewModel GetDataFromParentForControl(Guid id) => throw new NotImplementedException();
public LecturerListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public LecturerListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlLecturerAcademicDegreeList : public partial class ControlLecturerAcademicDegreeList :
GenericControlEntityList<LecturerAcademicDegreeGetBindingModel, LecturerAcademicDegreeSetBindingModel, LecturerAcademicDegreeListViewModel, LecturerAcademicDegreeViewModel, LecturerAcademicDegreeBusinessLogic>, GenericControlEntityList<LecturerAcademicDegreeGetBindingModel, LecturerAcademicDegreeSetBindingModel, LecturerAcademicDegreeListViewModel, LecturerAcademicDegreeViewModel, LecturerAcademicDegreeBusinessLogic>,
IGenericControlEntityList<LecturerAcademicDegreeListViewModel, LecturerAcademicDegreeViewModel> IGenericControlEntityList
{ {
public ControlLecturerAcademicDegreeList() public ControlLecturerAcademicDegreeList()
{ {
@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public LecturerAcademicDegreeListViewModel GetDataForControl() => _businessLogic.GetList(new LecturerAcademicDegreeGetBindingModel());
public LecturerAcademicDegreeListViewModel GetDataFromParentForControl(Guid id) => throw new NotImplementedException();
public LecturerAcademicDegreeListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public LecturerAcademicDegreeListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -1,33 +0,0 @@

namespace DepartmentWindowsDesktop.EntityControls
{
partial class ControlLecturerLecturerAcademicDegreeList
{
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором компонентов
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@ -1,47 +0,0 @@
using DepartmentBusinessLogic.BindingModels;
using DepartmentBusinessLogic.BusinessLogics;
using DepartmentBusinessLogic.ViewModels;
using DesktopTools.Controls;
using DesktopTools.Enums;
using DesktopTools.Interfaces;
using DesktopTools.Models;
using ModuleTools.Enums;
using System;
using System.Collections.Generic;
namespace DepartmentWindowsDesktop.EntityControls
{
public partial class ControlLecturerLecturerAcademicDegreeList :
GenericControlEntityList<LecturerGetBindingModel, LecturerSetBindingModel, LecturerListViewModel, LecturerViewModel, LecturerBusinessLogic>,
IGenericControlEntityList<LecturerListViewModel, LecturerViewModel>
{
public ControlLecturerLecturerAcademicDegreeList()
{
InitializeComponent();
Title = "Преподаватели";
ControlId = new Guid("9ce105ee-3c10-44ff-ba51-9f8c9cef831a");
AccessOperation = AccessOperation.Преподаватели;
ControlViewEntityElement = new ControlEmployeeElement();
_genericControlViewEntityList = this;
}
public IControl GetInstanceGenericControl() => new ControlLecturerLecturerAcademicDegreeList() { ControlId = Guid.NewGuid() };
public ControlViewEntityListConfiguration GetConfigControl() => new()
{
PaginationOn = false,
HideToolStripButton = new List<ToolStripButtonListNames>
{
ToolStripButtonListNames.toolStripButtonSearch
}
};
public LecturerListViewModel GetDataForControl() => throw new NotImplementedException();
public LecturerListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new LecturerGetBindingModel { LecturerAcademicDegreeId = id });
public LecturerListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public LecturerListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlLecturerAcademicRankList : public partial class ControlLecturerAcademicRankList :
GenericControlEntityList<LecturerAcademicRankGetBindingModel, LecturerAcademicRankSetBindingModel, LecturerAcademicRankListViewModel, LecturerAcademicRankViewModel, LecturerAcademicRankBusinessLogic>, GenericControlEntityList<LecturerAcademicRankGetBindingModel, LecturerAcademicRankSetBindingModel, LecturerAcademicRankListViewModel, LecturerAcademicRankViewModel, LecturerAcademicRankBusinessLogic>,
IGenericControlEntityList<LecturerAcademicRankListViewModel, LecturerAcademicRankViewModel> IGenericControlEntityList
{ {
public ControlLecturerAcademicRankList() public ControlLecturerAcademicRankList()
{ {
@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public LecturerAcademicRankListViewModel GetDataForControl() => _businessLogic.GetList(new LecturerAcademicRankGetBindingModel());
public LecturerAcademicRankListViewModel GetDataFromParentForControl(Guid id) => throw new NotImplementedException();
public LecturerAcademicRankListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public LecturerAcademicRankListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -1,33 +0,0 @@

namespace DepartmentWindowsDesktop.EntityControls
{
partial class ControlLecturerLecturerAcademicRankList
{
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором компонентов
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@ -1,47 +0,0 @@
using DepartmentBusinessLogic.BindingModels;
using DepartmentBusinessLogic.BusinessLogics;
using DepartmentBusinessLogic.ViewModels;
using DesktopTools.Controls;
using DesktopTools.Enums;
using DesktopTools.Interfaces;
using DesktopTools.Models;
using ModuleTools.Enums;
using System;
using System.Collections.Generic;
namespace DepartmentWindowsDesktop.EntityControls
{
public partial class ControlLecturerLecturerAcademicRankList :
GenericControlEntityList<LecturerGetBindingModel, LecturerSetBindingModel, LecturerListViewModel, LecturerViewModel, LecturerBusinessLogic>,
IGenericControlEntityList<LecturerListViewModel, LecturerViewModel>
{
public ControlLecturerLecturerAcademicRankList()
{
InitializeComponent();
Title = "Преподаватели";
ControlId = new Guid("1bb5ddcc-7f5f-4c6e-a6ba-fe71852f9a47");
AccessOperation = AccessOperation.Преподаватели;
ControlViewEntityElement = new ControlEmployeeElement();
_genericControlViewEntityList = this;
}
public IControl GetInstanceGenericControl() => new ControlLecturerLecturerAcademicRankList() { ControlId = Guid.NewGuid() };
public ControlViewEntityListConfiguration GetConfigControl() => new()
{
PaginationOn = false,
HideToolStripButton = new List<ToolStripButtonListNames>
{
ToolStripButtonListNames.toolStripButtonSearch
}
};
public LecturerListViewModel GetDataForControl() => throw new NotImplementedException();
public LecturerListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new LecturerGetBindingModel { LecturerAcademicRankId = id });
public LecturerListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public LecturerListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -13,7 +13,7 @@ namespace DepartmentWindowsDesktop.EntityControls
{ {
public partial class ControlLecturerEmployeePostList : public partial class ControlLecturerEmployeePostList :
GenericControlEntityList<LecturerEmployeePostGetBindingModel, LecturerEmployeePostSetBindingModel, LecturerEmployeePostListViewModel, LecturerEmployeePostViewModel, LecturerEmployeePostBusinessLogic>, GenericControlEntityList<LecturerEmployeePostGetBindingModel, LecturerEmployeePostSetBindingModel, LecturerEmployeePostListViewModel, LecturerEmployeePostViewModel, LecturerEmployeePostBusinessLogic>,
IGenericControlEntityList<LecturerEmployeePostListViewModel, LecturerEmployeePostViewModel> IGenericControlEntityList
{ {
public ControlLecturerEmployeePostList() public ControlLecturerEmployeePostList()
{ {
@ -36,13 +36,5 @@ namespace DepartmentWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public LecturerEmployeePostListViewModel GetDataForControl() => throw new NotImplementedException();
public LecturerEmployeePostListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new LecturerEmployeePostGetBindingModel { LecturerId = id });
public LecturerEmployeePostListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public LecturerEmployeePostListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -1,33 +0,0 @@

namespace DepartmentWindowsDesktop.EntityControls
{
partial class ControlLecturerLecturerPostList
{
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором компонентов
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@ -1,47 +0,0 @@
using DepartmentBusinessLogic.BindingModels;
using DepartmentBusinessLogic.BusinessLogics;
using DepartmentBusinessLogic.ViewModels;
using DesktopTools.Controls;
using DesktopTools.Enums;
using DesktopTools.Interfaces;
using DesktopTools.Models;
using ModuleTools.Enums;
using System;
using System.Collections.Generic;
namespace DepartmentWindowsDesktop.EntityControls
{
public partial class ControlLecturerLecturerPostList :
GenericControlEntityList<LecturerGetBindingModel, LecturerSetBindingModel, LecturerListViewModel, LecturerViewModel, LecturerBusinessLogic>,
IGenericControlEntityList<LecturerListViewModel, LecturerViewModel>
{
public ControlLecturerLecturerPostList()
{
InitializeComponent();
Title = "Преподаватели";
ControlId = new Guid("0f85396c-f0a2-45ac-965b-49de16fed8eb");
AccessOperation = AccessOperation.Преподаватели;
ControlViewEntityElement = new ControlEmployeeElement();
_genericControlViewEntityList = this;
}
public IControl GetInstanceGenericControl() => new ControlLecturerLecturerPostList() { ControlId = Guid.NewGuid() };
public ControlViewEntityListConfiguration GetConfigControl() => new()
{
PaginationOn = false,
HideToolStripButton = new List<ToolStripButtonListNames>
{
ToolStripButtonListNames.toolStripButtonSearch
}
};
public LecturerListViewModel GetDataForControl() => throw new NotImplementedException();
public LecturerListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new LecturerGetBindingModel { LecturerPostId = id });
public LecturerListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public LecturerListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlLecturerPostList : public partial class ControlLecturerPostList :
GenericControlEntityList<LecturerPostGetBindingModel, LecturerPostSetBindingModel, LecturerPostListViewModel, LecturerPostViewModel, LecturerPostBusinessLogic>, GenericControlEntityList<LecturerPostGetBindingModel, LecturerPostSetBindingModel, LecturerPostListViewModel, LecturerPostViewModel, LecturerPostBusinessLogic>,
IGenericControlEntityList<LecturerPostListViewModel, LecturerPostViewModel> IGenericControlEntityList
{ {
public ControlLecturerPostList() public ControlLecturerPostList()
{ {
@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public LecturerPostListViewModel GetDataForControl() => _businessLogic.GetList(new LecturerPostGetBindingModel());
public LecturerPostListViewModel GetDataFromParentForControl(Guid id) => throw new NotImplementedException();
public LecturerPostListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public LecturerPostListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -16,7 +16,7 @@ namespace SecurityBusinessLogic.ViewModels
[ViewModelControlElementDependenceEntity(Title = "Доступы", Order = 1, ParentPropertyName = "RoleId", [ViewModelControlElementDependenceEntity(Title = "Доступы", Order = 1, ParentPropertyName = "RoleId",
ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlAccessList, SecurityWindowsDesktop")] ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlAccessList, SecurityWindowsDesktop")]
[ViewModelControlElementDependenceEntity(Title = "Пользователи", Order = 2, ParentPropertyName = "RoleId", [ViewModelControlElementDependenceEntity(Title = "Пользователи", Order = 2, ParentPropertyName = "RoleId",
ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlRoleUserList, SecurityWindowsDesktop")] ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlUserRoleList, SecurityWindowsDesktop")]
public class RoleViewModel : ElementViewModel public class RoleViewModel : ElementViewModel
{ {
[ViewModelControlListProperty("Название роли")] [ViewModelControlListProperty("Название роли")]

View File

@ -19,7 +19,7 @@ namespace SecurityWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlAccessList : public partial class ControlAccessList :
GenericControlEntityList<AccessGetBindingModel, AccessSetBindingModel, AccessListViewModel, AccessViewModel, AccessBusinessLogic>, GenericControlEntityList<AccessGetBindingModel, AccessSetBindingModel, AccessListViewModel, AccessViewModel, AccessBusinessLogic>,
IGenericControlEntityList<AccessListViewModel, AccessViewModel> IGenericControlEntityList
{ {
private readonly RoleBusinessLogic _roleBusinessLogic; private readonly RoleBusinessLogic _roleBusinessLogic;
@ -42,7 +42,7 @@ namespace SecurityWindowsDesktop.EntityControls
PageNamesForPagination = _roleBusinessLogic.GetList(new RoleGetBindingModel())?.List?.Select(x => PageNamesForPagination = _roleBusinessLogic.GetList(new RoleGetBindingModel())?.List?.Select(x =>
new PageNamesForPaginationModel new PageNamesForPaginationModel
{ {
Key = x.Id.ToString(), Key = x.Id,
Value = x.RoleName Value = x.RoleName
})?.ToList(), })?.ToList(),
ParentPropertyName = "RoleId", ParentPropertyName = "RoleId",
@ -51,13 +51,5 @@ namespace SecurityWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public AccessListViewModel GetDataForControl() => throw new NotImplementedException();
public AccessListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new AccessGetBindingModel { RoleId = id });
public AccessListViewModel GetDataWithPageNameForControl(string key) => _businessLogic.GetList(new AccessGetBindingModel { RoleId = new Guid(key) });
public AccessListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -16,7 +16,7 @@ namespace SecurityWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlEnviromentSettingList : public partial class ControlEnviromentSettingList :
GenericControlEntityList<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel, EnviromentSettingListViewModel, EnviromentSettingViewModel, EnviromentSettingBusinessLogic>, GenericControlEntityList<EnviromentSettingGetBindingModel, EnviromentSettingSetBindingModel, EnviromentSettingListViewModel, EnviromentSettingViewModel, EnviromentSettingBusinessLogic>,
IGenericControlEntityList<EnviromentSettingListViewModel, EnviromentSettingViewModel> IGenericControlEntityList
{ {
public ControlEnviromentSettingList() public ControlEnviromentSettingList()
{ {
@ -39,13 +39,5 @@ namespace SecurityWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public EnviromentSettingListViewModel GetDataForControl() => _businessLogic.GetList(new EnviromentSettingGetBindingModel());
public EnviromentSettingListViewModel GetDataFromParentForControl(Guid id) => throw new NotImplementedException();
public EnviromentSettingListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public EnviromentSettingListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -16,7 +16,7 @@ namespace SecurityWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlRoleList : public partial class ControlRoleList :
GenericControlEntityList<RoleGetBindingModel, RoleSetBindingModel, RoleListViewModel, RoleViewModel, RoleBusinessLogic>, GenericControlEntityList<RoleGetBindingModel, RoleSetBindingModel, RoleListViewModel, RoleViewModel, RoleBusinessLogic>,
IGenericControlEntityList<RoleListViewModel, RoleViewModel> IGenericControlEntityList
{ {
public ControlRoleList() : base() public ControlRoleList() : base()
{ {
@ -38,13 +38,5 @@ namespace SecurityWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public RoleListViewModel GetDataForControl() => _businessLogic.GetList(new RoleGetBindingModel());
public RoleListViewModel GetDataFromParentForControl(Guid id) => throw new NotImplementedException();
public RoleListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public RoleListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }

View File

@ -1,33 +0,0 @@

namespace SecurityWindowsDesktop.EntityControls
{
partial class ControlRoleUserList
{
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором компонентов
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}

View File

@ -1,51 +0,0 @@
using DesktopTools.Controls;
using DesktopTools.Enums;
using DesktopTools.Interfaces;
using DesktopTools.Models;
using ModuleTools.Enums;
using SecurityBusinessLogic.BindingModels;
using SecurityBusinessLogic.BusinessLogics;
using SecurityBusinessLogic.ViewModels;
using System;
using System.Collections.Generic;
namespace SecurityWindowsDesktop.EntityControls
{
/// <summary>
/// Реализация контрола для списка пользователей роли
/// </summary>
public partial class ControlRoleUserList :
GenericControlEntityList<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel, UserRoleBusinessLogic>,
IGenericControlEntityList<UserRoleListViewModel, UserRoleViewModel>
{
public ControlRoleUserList()
{
InitializeComponent();
Title = "Связи пользователей с ролями";
ControlId = new Guid("c5748925-c8ec-4d06-a256-c72b0983d332");
AccessOperation = AccessOperation.ПользователиРоли;
ControlViewEntityElement = new ControlUserRoleElement();
_genericControlViewEntityList = this;
}
public IControl GetInstanceGenericControl() => new ControlRoleUserList() { ControlId = Guid.NewGuid() };
public ControlViewEntityListConfiguration GetConfigControl() => new()
{
PaginationOn = false,
HideToolStripButton = new List<ToolStripButtonListNames>
{
ToolStripButtonListNames.toolStripButtonUpd,
ToolStripButtonListNames.toolStripButtonSearch
}
};
public UserRoleListViewModel GetDataForControl() => throw new NotImplementedException();
public UserRoleListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new UserRoleGetBindingModel { RoleId = id });
public UserRoleListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public UserRoleListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -7,8 +7,6 @@ using SecurityBusinessLogic.BindingModels;
using SecurityBusinessLogic.BusinessLogics; using SecurityBusinessLogic.BusinessLogics;
using SecurityBusinessLogic.ViewModels; using SecurityBusinessLogic.ViewModels;
using System; using System;
using System.Linq;
using System.Windows.Forms;
namespace SecurityWindowsDesktop.EntityControls namespace SecurityWindowsDesktop.EntityControls
{ {
@ -17,7 +15,7 @@ namespace SecurityWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlUserList : public partial class ControlUserList :
GenericControlEntityList<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel, UserBusinessLogic>, GenericControlEntityList<UserGetBindingModel, UserSetBindingModel, UserListViewModel, UserViewModel, UserBusinessLogic>,
IGenericControlEntityList<UserListViewModel, UserViewModel> IGenericControlEntityList
{ {
public ControlUserList() : base() public ControlUserList() : base()
{ {
@ -38,31 +36,6 @@ namespace SecurityWindowsDesktop.EntityControls
CountElementsOnPage = 40 CountElementsOnPage = 40
}; };
public UserListViewModel GetDataForControl() => throw new NotImplementedException();
public UserListViewModel GetDataFromParentForControl(Guid id) => throw new NotImplementedException();
public UserListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public UserListViewModel GetDataWithPageNumberForControl(int page, int count)
{
var model = new UserGetBindingModel
{
PageNumber = page,
PageSize = count
};
if (_searchValues != null)
{
var cntrl = _searchValues.FirstOrDefault(x => x.Name == "UserNameForSearch");
if (cntrl != default)
{
model.UserNameForSearch = cntrl.Value.ToString();
}
}
return _businessLogic.GetList(model);
}
private void FillSearchPanel() private void FillSearchPanel()
{ {
var control = new BaseControlString("UserNameForSearch", false, false, 0) var control = new BaseControlString("UserNameForSearch", false, false, 0)

View File

@ -16,7 +16,7 @@ namespace SecurityWindowsDesktop.EntityControls
/// </summary> /// </summary>
public partial class ControlUserRoleList : public partial class ControlUserRoleList :
GenericControlEntityList<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel, UserRoleBusinessLogic>, GenericControlEntityList<UserRoleGetBindingModel, UserRoleSetBindingModel, UserRoleListViewModel, UserRoleViewModel, UserRoleBusinessLogic>,
IGenericControlEntityList<UserRoleListViewModel, UserRoleViewModel> IGenericControlEntityList
{ {
public ControlUserRoleList() public ControlUserRoleList()
{ {
@ -39,13 +39,5 @@ namespace SecurityWindowsDesktop.EntityControls
ToolStripButtonListNames.toolStripButtonSearch ToolStripButtonListNames.toolStripButtonSearch
} }
}; };
public UserRoleListViewModel GetDataForControl() => throw new NotImplementedException();
public UserRoleListViewModel GetDataFromParentForControl(Guid id) => _businessLogic.GetList(new UserRoleGetBindingModel { UserId = id });
public UserRoleListViewModel GetDataWithPageNameForControl(string key) => throw new NotImplementedException();
public UserRoleListViewModel GetDataWithPageNumberForControl(int page, int count) => throw new NotImplementedException();
} }
} }