diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20210404170518_RemLecturerField.Designer.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20210404170518_RemLecturerField.Designer.cs new file mode 100644 index 0000000..d78bf63 --- /dev/null +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20210404170518_RemLecturerField.Designer.cs @@ -0,0 +1,845 @@ +// +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("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Capacity") + .HasColumnType("int"); + + b.Property("ClassroomType") + .HasColumnType("int"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("HaveProjector") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Number") + .HasColumnType("nvarchar(450)"); + + b.Property("Photo") + .HasColumnType("varbinary(max)"); + + b.Property("SecurityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Square") + .HasColumnType("decimal(18,2)"); + + b.Property("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("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisciplineBlockId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisciplineBlueAsteriskName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisciplineName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("DisciplineShortName") + .HasColumnType("nvarchar(max)"); + + b.Property("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("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineBlockBlueAsteriskName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisciplineBlockOrder") + .HasColumnType("int"); + + b.Property("DisciplineBlockUseForGrouping") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("Title") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("Title") + .IsUnique(); + + b.ToTable("DisciplineBlocks"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasColumnType("nvarchar(max)"); + + b.Property("DateBirth") + .HasColumnType("datetime2"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("FirstName") + .HasColumnType("nvarchar(450)"); + + b.Property("GroupElectricalSafety") + .HasColumnType("nvarchar(max)"); + + b.Property("HomeNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastName") + .HasColumnType("nvarchar(450)"); + + b.Property("MobileNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Patronymic") + .HasColumnType("nvarchar(450)"); + + b.Property("Photo") + .HasColumnType("varbinary(max)"); + + b.Property("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("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("EmployeePostId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsExternalCombination") + .HasColumnType("bit"); + + b.Property("IsInternalCombination") + .HasColumnType("bit"); + + b.Property("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("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EmployeePostName") + .HasColumnType("nvarchar(450)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("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("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Abbreviation") + .HasColumnType("nvarchar(max)"); + + b.Property("Address") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DateBirth") + .HasColumnType("datetime2"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("HomeNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("LecturerAcademicDegreeId") + .HasColumnType("uniqueidentifier"); + + b.Property("LecturerAcademicRankId") + .HasColumnType("uniqueidentifier"); + + b.Property("LecturerPostId") + .HasColumnType("uniqueidentifier"); + + b.Property("LecturerPostRate") + .HasColumnType("decimal(18,2)"); + + b.Property("MobileNumber") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OnlyForPrivate") + .HasColumnType("bit"); + + b.Property("Patronymic") + .HasColumnType("nvarchar(450)"); + + b.Property("Photo") + .HasColumnType("varbinary(max)"); + + b.Property("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("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LecturerAcademicDegreeName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("LecturerAcademicDegreeName") + .IsUnique(); + + b.ToTable("LecturerAcademicDegrees"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicRank", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LecturerAcademicRankName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("LecturerAcademicRankName") + .IsUnique(); + + b.ToTable("LecturerAcademicRanks"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.LecturerEmployeePost", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EmployeePostId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsExternalCombination") + .HasColumnType("bit"); + + b.Property("IsInternalCombination") + .HasColumnType("bit"); + + b.Property("LecturerId") + .HasColumnType("uniqueidentifier"); + + b.Property("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("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Hours") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LecturerPostName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("LecturerPostName") + .IsUnique(); + + b.ToTable("LecturerPosts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Security.Access", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessOperation") + .HasColumnType("int"); + + b.Property("AccessType") + .HasColumnType("int"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("Accesses"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Security.EnviromentSetting", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Key") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Key") + .IsUnique(); + + b.ToTable("EnviromentSettings"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Security.Role", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("RoleName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("RolePriority") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("RoleName") + .IsUnique(); + + b.ToTable("Roles"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Security.User", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Avatar") + .HasColumnType("varbinary(max)"); + + b.Property("CountAttempt") + .HasColumnType("int"); + + b.Property("DateBanned") + .HasColumnType("datetime2"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DateLastVisit") + .HasColumnType("datetime2"); + + b.Property("IsBanned") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserName"); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Security.UserRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("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 + } + } +} diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20210404170518_RemLecturerField.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20210404170518_RemLecturerField.cs new file mode 100644 index 0000000..7cccdd2 --- /dev/null +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20210404170518_RemLecturerField.cs @@ -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( + name: "GroupElectricalSafety", + table: "Lecturers", + type: "nvarchar(max)", + nullable: true); + } + } +} diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs index 46f286a..df4cbbd 100644 --- a/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs @@ -309,9 +309,6 @@ namespace DatabaseCore.Migrations .IsRequired() .HasColumnType("nvarchar(450)"); - b.Property("GroupElectricalSafety") - .HasColumnType("nvarchar(max)"); - b.Property("HomeNumber") .HasColumnType("nvarchar(max)"); diff --git a/DepartmentPortal/Common/DatabaseCore/Models/Department/Lecturer.cs b/DepartmentPortal/Common/DatabaseCore/Models/Department/Lecturer.cs index d6cbc1f..3dff614 100644 --- a/DepartmentPortal/Common/DatabaseCore/Models/Department/Lecturer.cs +++ b/DepartmentPortal/Common/DatabaseCore/Models/Department/Lecturer.cs @@ -93,10 +93,6 @@ namespace DatabaseCore.Models.Department [MapConfiguration("Photo")] public byte[] Photo { get; set; } - [DataMember] - [MapConfiguration("GroupElectricalSafety")] - public string GroupElectricalSafety { get; set; } - [DataMember] [MapConfiguration("OnlyForPrivate")] public bool OnlyForPrivate { get; set; } diff --git a/DepartmentPortal/Common/DesktopTools/BaseControls/BaseControlImage.cs b/DepartmentPortal/Common/DesktopTools/BaseControls/BaseControlImage.cs index 3935ca9..7571b0c 100644 --- a/DepartmentPortal/Common/DesktopTools/BaseControls/BaseControlImage.cs +++ b/DepartmentPortal/Common/DesktopTools/BaseControls/BaseControlImage.cs @@ -99,7 +99,7 @@ namespace DesktopTools.BaseControls throw new ArgumentNullException($"Поле свойства '{labelTitle.Text}' должно быть заполнено"); } 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; diff --git a/DepartmentPortal/Common/DesktopTools/Interfaces/IGenericControlEntityList.cs b/DepartmentPortal/Common/DesktopTools/Interfaces/IGenericControlEntityList.cs index 179e103..51f2786 100644 --- a/DepartmentPortal/Common/DesktopTools/Interfaces/IGenericControlEntityList.cs +++ b/DepartmentPortal/Common/DesktopTools/Interfaces/IGenericControlEntityList.cs @@ -1,15 +1,11 @@ using DesktopTools.Models; -using ModuleTools.ViewModels; -using System; namespace DesktopTools.Interfaces { /// /// Работа с generic-контролом списка /// - public interface IGenericControlEntityList - where L : ListViewModel - where E : ElementViewModel + public interface IGenericControlEntityList { /// /// Новый экземпляр контрола @@ -22,33 +18,5 @@ namespace DesktopTools.Interfaces /// /// ControlViewEntityListConfiguration GetConfigControl(); - - /// - /// Получение полного списка - /// - /// - L GetDataForControl(); - - /// - /// Получение списка с пагинацией по названиям - /// - /// - /// - L GetDataWithPageNameForControl(string key); - - /// - /// Получение списка с пагинацией по страницам - /// - /// - /// - /// - L GetDataWithPageNumberForControl(int page, int count); - - /// - /// Получение списка от родителя - /// - /// - /// - L GetDataFromParentForControl(Guid id); } } \ No newline at end of file diff --git a/DepartmentPortal/Common/DesktopTools/MainControls/GenericControlEntityList.cs b/DepartmentPortal/Common/DesktopTools/MainControls/GenericControlEntityList.cs index d819591..632d200 100644 --- a/DepartmentPortal/Common/DesktopTools/MainControls/GenericControlEntityList.cs +++ b/DepartmentPortal/Common/DesktopTools/MainControls/GenericControlEntityList.cs @@ -50,12 +50,7 @@ namespace DesktopTools.Controls /// /// Методы для реализации в generic-контроле /// - protected IGenericControlEntityList _genericControlViewEntityList; - - /// - /// Список значений с контролов с панели поиска - /// - protected List<(string Name, object Value)> _searchValues; + protected IGenericControlEntityList _genericControlViewEntityList; /// /// Констркутор @@ -283,7 +278,7 @@ namespace DesktopTools.Controls toolStripButtonAdd.Click += (object sender, EventArgs e) => { AddElement(); }; toolStripButtonUpd.Click += (object sender, EventArgs e) => { UpdElement(); }; 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(); }; toolStripButtonSelect.Click += (object sender, EventArgs e) => { SelectElement(); }; toolStripButtonClose.Click += (object sender, EventArgs e) => @@ -294,7 +289,7 @@ namespace DesktopTools.Controls }; 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) => { @@ -380,18 +375,17 @@ namespace DesktopTools.Controls try { Cursor.Current = Cursors.WaitCursor; + var model = new G(); if (panelSearch.Visible) { var controls = panelSearchControls.Controls.Cast(); - if (_searchValues == null) - { - _searchValues = new(); - } - _searchValues.Clear(); - 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) { - await Task.Run(() => data = GetDataFromParent(ParentId.Value)); + var prop = typeof(G).GetProperty(ParentPropertyName); + if (prop != null) + { + prop.SetValue(model, ParentId); + } Visible = true; } else @@ -415,7 +413,8 @@ namespace DesktopTools.Controls { 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) { - 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 = GetData()); - } - + await Task.Run(() => data = _businessLogic.GetList(model)); toolStripLabelCountPages.Text = $"из {data?.MaxCount}"; } catch (Exception ex) @@ -567,7 +566,7 @@ namespace DesktopTools.Controls { if (toolStripComboBoxPageNames.SelectedItem is PageNamesForPaginationModel key) { - control.ParentId = new Guid(key.Key); + control.ParentId = new Guid(key.Key.ToString()); control.ParentPropertyName = toolStripComboBoxPageNames.Tag?.ToString(); } } @@ -600,13 +599,5 @@ namespace DesktopTools.Controls } 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); } } \ No newline at end of file diff --git a/DepartmentPortal/Common/DesktopTools/Models/PageNamesForPaginationModel.cs b/DepartmentPortal/Common/DesktopTools/Models/PageNamesForPaginationModel.cs index 000f521..190706f 100644 --- a/DepartmentPortal/Common/DesktopTools/Models/PageNamesForPaginationModel.cs +++ b/DepartmentPortal/Common/DesktopTools/Models/PageNamesForPaginationModel.cs @@ -5,11 +5,11 @@ /// 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/EmployeePostViewModels.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/EmployeePostViewModels.cs index 714b089..d3b3589 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/EmployeePostViewModels.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/EmployeePostViewModels.cs @@ -14,9 +14,9 @@ namespace DepartmentBusinessLogic.ViewModels /// [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] [ViewModelControlElementDependenceEntity(Title = "Сотрудники", Order = 1, ParentPropertyName = "EmployeePostId", - ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeePostEmployeeList, DepartmentWindowsDesktop")] + ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeeEmployeePostList, DepartmentWindowsDesktop")] [ViewModelControlElementDependenceEntity(Title = "Сотрудники", Order = 1, ParentPropertyName = "EmployeePostId", - ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeePostLecturerList, DepartmentWindowsDesktop")] + ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerEmployeePostList, DepartmentWindowsDesktop")] public class EmployeePostViewModel : ElementViewModel { [ViewModelControlListProperty("Название должности")] diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerAcademicDegreeViewModels.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerAcademicDegreeViewModels.cs index 2b9d55b..327d126 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerAcademicDegreeViewModels.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerAcademicDegreeViewModels.cs @@ -13,8 +13,8 @@ namespace DepartmentBusinessLogic.ViewModels /// Элемент должности преподавателей /// [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] - [ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerPostId", - ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerLecturerAcademicDegreeList, DepartmentWindowsDesktop")] + [ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerAcademicDegreeId", + ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")] public class LecturerAcademicDegreeViewModel : ElementViewModel { [ViewModelControlListProperty("Ученая степень")] diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerAcademicRankViewModels.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerAcademicRankViewModels.cs index 50fd34a..aa8f46c 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerAcademicRankViewModels.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerAcademicRankViewModels.cs @@ -13,8 +13,8 @@ namespace DepartmentBusinessLogic.ViewModels /// Элемент должности преподавателей /// [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] - [ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerPostId", - ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerLecturerAcademicRankList, DepartmentWindowsDesktop")] + [ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerAcademicRankId", + ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")] public class LecturerAcademicRankViewModel : ElementViewModel { [ViewModelControlListProperty("Ученая степень")] diff --git a/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerPostViewModels.cs b/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerPostViewModels.cs index e50bcdc..3578cc7 100644 --- a/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerPostViewModels.cs +++ b/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/LecturerPostViewModels.cs @@ -14,7 +14,7 @@ namespace DepartmentBusinessLogic.ViewModels /// [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] [ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "LecturerPostId", - ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerLecturerPostList, DepartmentWindowsDesktop")] + ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")] public class LecturerPostViewModel : ElementViewModel { [ViewModelControlListProperty("Название должности")] diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Classroom/ControlClassroomList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Classroom/ControlClassroomList.cs index a2f9824..bd1c302 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Classroom/ControlClassroomList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Classroom/ControlClassroomList.cs @@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls /// public partial class ControlClassroomList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlClassroomList() { @@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineList.cs index fc1c2ce..94a18ac 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineList.cs @@ -14,7 +14,7 @@ namespace DepartmentWindowsDesktop.EntityControls { public partial class ControlDisciplineList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { private readonly DisciplineBlockBusinessLogic _disciplineBlockBusinessLogic; @@ -38,44 +38,12 @@ namespace DepartmentWindowsDesktop.EntityControls PageNamesForPagination = _disciplineBlockBusinessLogic.GetList(new DisciplineBlockGetBindingModel())?.List?.Select(x => new PageNamesForPaginationModel { - Key = x.Id.ToString(), + Key = x.Id, Value = x.Title })?.ToList(), 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() { var control = new BaseControlString("DisciplineNameForSearch", false, false, 0) diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockElement.Designer.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockElement.Designer.cs similarity index 100% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockElement.Designer.cs rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockElement.Designer.cs diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockElement.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockElement.cs similarity index 100% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockElement.cs rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockElement.cs diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockElement.resx b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockElement.resx similarity index 100% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockElement.resx rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockElement.resx diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockList.Designer.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockList.Designer.cs similarity index 100% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockList.Designer.cs rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockList.Designer.cs diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockList.cs similarity index 71% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockList.cs rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockList.cs index d313ce8..1045982 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockList.cs @@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls /// public partial class ControlDisciplineBlockList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlDisciplineBlockList() { @@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockList.resx b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockList.resx similarity index 100% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Discipline/ControlDisciplineBlockList.resx rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/DisciplineBlock/ControlDisciplineBlockList.resx diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeList.cs index 45a0027..b8eb2f6 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeList.cs @@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls /// public partial class ControlEmployeeList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlEmployeeList() { @@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeEmployeePostList.Designer.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeeEmployeePost/ControlEmployeeEmployeePostList.Designer.cs similarity index 100% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeEmployeePostList.Designer.cs rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeeEmployeePost/ControlEmployeeEmployeePostList.Designer.cs diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeEmployeePostList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeeEmployeePost/ControlEmployeeEmployeePostList.cs similarity index 71% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeEmployeePostList.cs rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeeEmployeePost/ControlEmployeeEmployeePostList.cs index d2a625e..8b1057c 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeEmployeePostList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeeEmployeePost/ControlEmployeeEmployeePostList.cs @@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls /// public partial class ControlEmployeeEmployeePostList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlEmployeeEmployeePostList() { @@ -39,13 +39,5 @@ namespace DepartmentWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeEmployeePostList.resx b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeeEmployeePost/ControlEmployeeEmployeePostList.resx similarity index 100% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeEmployeePostList.resx rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeeEmployeePost/ControlEmployeeEmployeePostList.resx diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostEmployeeList.Designer.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostEmployeeList.Designer.cs deleted file mode 100644 index dca9032..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostEmployeeList.Designer.cs +++ /dev/null @@ -1,33 +0,0 @@ - -namespace DepartmentWindowsDesktop.EntityControls -{ - partial class ControlEmployeePostEmployeeList - { - /// - /// Освободить все используемые ресурсы. - /// - /// истинно, если управляемый ресурс должен быть удален; иначе ложно. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Код, автоматически созданный конструктором компонентов - - /// - /// Требуемый метод для поддержки конструктора — не изменяйте - /// содержимое этого метода с помощью редактора кода. - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - } - - #endregion - } -} diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostEmployeeList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostEmployeeList.cs deleted file mode 100644 index 16bfbc4..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostEmployeeList.cs +++ /dev/null @@ -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 -{ - /// - /// Реализация контрола для списка сотрудников должности - /// - public partial class ControlEmployeePostEmployeeList : - GenericControlEntityList, - IGenericControlEntityList - { - 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.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(); - } -} \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostEmployeeList.resx b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostEmployeeList.resx deleted file mode 100644 index 1af7de1..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostEmployeeList.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostLecturerList.Designer.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostLecturerList.Designer.cs deleted file mode 100644 index 28fb8ae..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostLecturerList.Designer.cs +++ /dev/null @@ -1,33 +0,0 @@ - -namespace DepartmentWindowsDesktop.EntityControls -{ - partial class ControlEmployeePostLecturerList - { - /// - /// Освободить все используемые ресурсы. - /// - /// истинно, если управляемый ресурс должен быть удален; иначе ложно. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Код, автоматически созданный конструктором компонентов - - /// - /// Требуемый метод для поддержки конструктора — не изменяйте - /// содержимое этого метода с помощью редактора кода. - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - } - - #endregion - } -} diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostLecturerList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostLecturerList.cs deleted file mode 100644 index b4114b7..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostLecturerList.cs +++ /dev/null @@ -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, - IGenericControlEntityList - { - 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.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(); - } -} \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostLecturerList.resx b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostLecturerList.resx deleted file mode 100644 index 1af7de1..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostLecturerList.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostList.cs index e047234..0a54e3b 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/EmployeePost/ControlEmployeePostList.cs @@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls /// public partial class ControlEmployeePostList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlEmployeePostList() { @@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerList.cs index 1223835..b76f033 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerList.cs @@ -13,7 +13,7 @@ namespace DepartmentWindowsDesktop.EntityControls { public partial class ControlLecturerList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlLecturerList() { @@ -21,7 +21,7 @@ namespace DepartmentWindowsDesktop.EntityControls Title = "Преподаватели"; ControlId = new Guid("9e39dbb5-3b29-4971-9574-b4c13d5470c6"); AccessOperation = AccessOperation.Преподаватели; - ControlViewEntityElement = new ControlEmployeeElement(); + ControlViewEntityElement = new ControlLecturerElement(); _genericControlViewEntityList = this; } @@ -35,13 +35,5 @@ namespace DepartmentWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerAcademicDegreeList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerAcademicDegreeList.cs index 39f5a4d..fe53990 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerAcademicDegreeList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerAcademicDegreeList.cs @@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls /// public partial class ControlLecturerAcademicDegreeList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlLecturerAcademicDegreeList() { @@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerLecturerAcademicDegreeList.Designer.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerLecturerAcademicDegreeList.Designer.cs deleted file mode 100644 index 3c325f2..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerLecturerAcademicDegreeList.Designer.cs +++ /dev/null @@ -1,33 +0,0 @@ - -namespace DepartmentWindowsDesktop.EntityControls -{ - partial class ControlLecturerLecturerAcademicDegreeList - { - /// - /// Освободить все используемые ресурсы. - /// - /// истинно, если управляемый ресурс должен быть удален; иначе ложно. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Код, автоматически созданный конструктором компонентов - - /// - /// Требуемый метод для поддержки конструктора — не изменяйте - /// содержимое этого метода с помощью редактора кода. - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - } - - #endregion - } -} diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerLecturerAcademicDegreeList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerLecturerAcademicDegreeList.cs deleted file mode 100644 index 054f7ae..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerLecturerAcademicDegreeList.cs +++ /dev/null @@ -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, - IGenericControlEntityList - { - 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.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(); - } -} \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerLecturerAcademicDegreeList.resx b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerLecturerAcademicDegreeList.resx deleted file mode 100644 index 1af7de1..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicDegree/ControlLecturerLecturerAcademicDegreeList.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerAcademicRankList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerAcademicRankList.cs index 1aa6911..2a39dfc 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerAcademicRankList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerAcademicRankList.cs @@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls /// public partial class ControlLecturerAcademicRankList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlLecturerAcademicRankList() { @@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerLecturerAcademicRankList.Designer.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerLecturerAcademicRankList.Designer.cs deleted file mode 100644 index 38d4d1d..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerLecturerAcademicRankList.Designer.cs +++ /dev/null @@ -1,33 +0,0 @@ - -namespace DepartmentWindowsDesktop.EntityControls -{ - partial class ControlLecturerLecturerAcademicRankList - { - /// - /// Освободить все используемые ресурсы. - /// - /// истинно, если управляемый ресурс должен быть удален; иначе ложно. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Код, автоматически созданный конструктором компонентов - - /// - /// Требуемый метод для поддержки конструктора — не изменяйте - /// содержимое этого метода с помощью редактора кода. - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - } - - #endregion - } -} diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerLecturerAcademicRankList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerLecturerAcademicRankList.cs deleted file mode 100644 index 4622629..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerLecturerAcademicRankList.cs +++ /dev/null @@ -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, - IGenericControlEntityList - { - 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.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(); - } -} \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerLecturerAcademicRankList.resx b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerLecturerAcademicRankList.resx deleted file mode 100644 index 1af7de1..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerAcademicRank/ControlLecturerLecturerAcademicRankList.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerEmployeePostList.Designer.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerEmployeePost/ControlLecturerEmployeePostList.Designer.cs similarity index 100% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerEmployeePostList.Designer.cs rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerEmployeePost/ControlLecturerEmployeePostList.Designer.cs diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerEmployeePostList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerEmployeePost/ControlLecturerEmployeePostList.cs similarity index 69% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerEmployeePostList.cs rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerEmployeePost/ControlLecturerEmployeePostList.cs index 839c3bb..eb1133e 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerEmployeePostList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerEmployeePost/ControlLecturerEmployeePostList.cs @@ -13,7 +13,7 @@ namespace DepartmentWindowsDesktop.EntityControls { public partial class ControlLecturerEmployeePostList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlLecturerEmployeePostList() { @@ -36,13 +36,5 @@ namespace DepartmentWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerEmployeePostList.resx b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerEmployeePost/ControlLecturerEmployeePostList.resx similarity index 100% rename from DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Lecturer/ControlLecturerEmployeePostList.resx rename to DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerEmployeePost/ControlLecturerEmployeePostList.resx diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerLecturerPostList.Designer.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerLecturerPostList.Designer.cs deleted file mode 100644 index 33e9f09..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerLecturerPostList.Designer.cs +++ /dev/null @@ -1,33 +0,0 @@ - -namespace DepartmentWindowsDesktop.EntityControls -{ - partial class ControlLecturerLecturerPostList - { - /// - /// Освободить все используемые ресурсы. - /// - /// истинно, если управляемый ресурс должен быть удален; иначе ложно. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Код, автоматически созданный конструктором компонентов - - /// - /// Требуемый метод для поддержки конструктора — не изменяйте - /// содержимое этого метода с помощью редактора кода. - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - } - - #endregion - } -} diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerLecturerPostList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerLecturerPostList.cs deleted file mode 100644 index 502a6fb..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerLecturerPostList.cs +++ /dev/null @@ -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, - IGenericControlEntityList - { - 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.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(); - } -} \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerLecturerPostList.resx b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerLecturerPostList.resx deleted file mode 100644 index 1af7de1..0000000 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerLecturerPostList.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerPostList.cs b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerPostList.cs index 7b33c32..a922447 100644 --- a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerPostList.cs +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/LecturerPost/ControlLecturerPostList.cs @@ -16,7 +16,7 @@ namespace DepartmentWindowsDesktop.EntityControls /// public partial class ControlLecturerPostList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlLecturerPostList() { @@ -38,13 +38,5 @@ namespace DepartmentWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/RoleViewModels.cs b/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/RoleViewModels.cs index 62bb806..df21b2b 100644 --- a/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/RoleViewModels.cs +++ b/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/RoleViewModels.cs @@ -16,7 +16,7 @@ namespace SecurityBusinessLogic.ViewModels [ViewModelControlElementDependenceEntity(Title = "Доступы", Order = 1, ParentPropertyName = "RoleId", ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlAccessList, SecurityWindowsDesktop")] [ViewModelControlElementDependenceEntity(Title = "Пользователи", Order = 2, ParentPropertyName = "RoleId", - ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlRoleUserList, SecurityWindowsDesktop")] + ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlUserRoleList, SecurityWindowsDesktop")] public class RoleViewModel : ElementViewModel { [ViewModelControlListProperty("Название роли")] diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessList.cs index 9aba467..b350bc7 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessList.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Access/ControlAccessList.cs @@ -19,7 +19,7 @@ namespace SecurityWindowsDesktop.EntityControls /// public partial class ControlAccessList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { private readonly RoleBusinessLogic _roleBusinessLogic; @@ -42,7 +42,7 @@ namespace SecurityWindowsDesktop.EntityControls PageNamesForPagination = _roleBusinessLogic.GetList(new RoleGetBindingModel())?.List?.Select(x => new PageNamesForPaginationModel { - Key = x.Id.ToString(), + Key = x.Id, Value = x.RoleName })?.ToList(), ParentPropertyName = "RoleId", @@ -51,13 +51,5 @@ namespace SecurityWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingList.cs index 0ebdc73..7bd7862 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingList.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/EnviromentSetting/ControlEnviromentSettingList.cs @@ -16,7 +16,7 @@ namespace SecurityWindowsDesktop.EntityControls /// public partial class ControlEnviromentSettingList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlEnviromentSettingList() { @@ -39,13 +39,5 @@ namespace SecurityWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleList.cs index feb6cdb..02076be 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleList.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleList.cs @@ -16,7 +16,7 @@ namespace SecurityWindowsDesktop.EntityControls /// public partial class ControlRoleList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlRoleList() : base() { @@ -38,13 +38,5 @@ namespace SecurityWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleUserList.Designer.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleUserList.Designer.cs deleted file mode 100644 index c397bc4..0000000 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleUserList.Designer.cs +++ /dev/null @@ -1,33 +0,0 @@ - -namespace SecurityWindowsDesktop.EntityControls -{ - partial class ControlRoleUserList - { - /// - /// Освободить все используемые ресурсы. - /// - /// истинно, если управляемый ресурс должен быть удален; иначе ложно. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Код, автоматически созданный конструктором компонентов - - /// - /// Требуемый метод для поддержки конструктора — не изменяйте - /// содержимое этого метода с помощью редактора кода. - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - } - - #endregion - } -} diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleUserList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleUserList.cs deleted file mode 100644 index 1378d28..0000000 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleUserList.cs +++ /dev/null @@ -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 -{ - /// - /// Реализация контрола для списка пользователей роли - /// - public partial class ControlRoleUserList : - GenericControlEntityList, - IGenericControlEntityList - { - 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.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(); - } -} \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleUserList.resx b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleUserList.resx deleted file mode 100644 index 1af7de1..0000000 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/Role/ControlRoleUserList.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserList.cs index de6f5e2..0365d27 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserList.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserList.cs @@ -7,8 +7,6 @@ using SecurityBusinessLogic.BindingModels; using SecurityBusinessLogic.BusinessLogics; using SecurityBusinessLogic.ViewModels; using System; -using System.Linq; -using System.Windows.Forms; namespace SecurityWindowsDesktop.EntityControls { @@ -17,7 +15,7 @@ namespace SecurityWindowsDesktop.EntityControls /// public partial class ControlUserList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlUserList() : base() { @@ -38,31 +36,6 @@ namespace SecurityWindowsDesktop.EntityControls 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() { var control = new BaseControlString("UserNameForSearch", false, false, 0) diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserRoleList.Designer.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.Designer.cs similarity index 100% rename from DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserRoleList.Designer.cs rename to DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.Designer.cs diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserRoleList.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.cs similarity index 72% rename from DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserRoleList.cs rename to DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.cs index 51ff9f7..4c36d1a 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserRoleList.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.cs @@ -16,7 +16,7 @@ namespace SecurityWindowsDesktop.EntityControls /// public partial class ControlUserRoleList : GenericControlEntityList, - IGenericControlEntityList + IGenericControlEntityList { public ControlUserRoleList() { @@ -39,13 +39,5 @@ namespace SecurityWindowsDesktop.EntityControls 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(); } } \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserRoleList.resx b/DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.resx similarity index 100% rename from DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/User/ControlUserRoleList.resx rename to DepartmentPortal/Security/SecurityWindowsDesktop/EntityControls/UserRole/ControlUserRoleList.resx