diff --git a/DepartmentPortal/AcademicProgressBusinessLogic/AcademicProgressBusinessLogic.csproj b/DepartmentPortal/AcademicProgressBusinessLogic/AcademicProgressBusinessLogic.csproj new file mode 100644 index 0000000..89056d5 --- /dev/null +++ b/DepartmentPortal/AcademicProgressBusinessLogic/AcademicProgressBusinessLogic.csproj @@ -0,0 +1,16 @@ + + + + net5.0 + + + + + + + + + + + + diff --git a/DepartmentPortal/AcademicProgressBusinessLogic/BindingModels/StudentAcademicProgressBindingModels.cs b/DepartmentPortal/AcademicProgressBusinessLogic/BindingModels/StudentAcademicProgressBindingModels.cs new file mode 100644 index 0000000..43c1640 --- /dev/null +++ b/DepartmentPortal/AcademicProgressBusinessLogic/BindingModels/StudentAcademicProgressBindingModels.cs @@ -0,0 +1,60 @@ +using AcademicProgressBusinessLogic.Enums; +using DepartmentBusinessLogic.Enums; +using ModuleTools.Attributes; +using ModuleTools.BindingModels; +using System; +using System.ComponentModel.DataAnnotations; + +namespace AcademicProgressBusinessLogic.BindingModels +{ + + /// + /// Получение записи успеваемости студента + /// + public class StudentAcademicProgressGetBindingModel : GetBindingModel + { + public Guid? StudentId { get; set; } + public Guid? DisciplineId { get; set; } + + } + + /// + /// Сохранение записи успеваемости студента + /// + public class StudentAcademicProgressSetBindingModel : SetBindingModel + { + [Required(ErrorMessage = "required")] + [MapConfiguration("StudentId")] + public Guid StudentId { get; set; } + + [Required(ErrorMessage = "required")] + [MapConfiguration("DisciplineId")] + public Guid DisciplineId { get; set; } + + [Required(ErrorMessage = "required")] + [MapConfiguration("Semester")] + public Semester Semester { get; set; } + + [Required(ErrorMessage = "required")] + [MapConfiguration("Score")] + public ExamScores Score { get; set; } + + + [Required(ErrorMessage = "required")] + [MapConfiguration("AffixingDate")] + public DateTime AffixingDate { get; set; } + + /// + /// Является повышением оценки + /// + [MapConfiguration("IsIncreaseScore")] + public bool IsIncreaseScore { get; set; } + + /// + /// Является сдачей по направлению + /// + [MapConfiguration("IsResit")] + public bool IsResit { get; set; } + + } +} diff --git a/DepartmentPortal/AcademicProgressBusinessLogic/BusinessLogic/ReportBusinessLogic.cs b/DepartmentPortal/AcademicProgressBusinessLogic/BusinessLogic/ReportBusinessLogic.cs new file mode 100644 index 0000000..fc4c7fc --- /dev/null +++ b/DepartmentPortal/AcademicProgressBusinessLogic/BusinessLogic/ReportBusinessLogic.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AcademicProgressBusinessLogic.BusinessLogics +{ + public class ReportBusinessLogic + { + } +} diff --git a/DepartmentPortal/AcademicProgressBusinessLogic/BusinessLogic/StudentAcademicProgressBusinessLogic.cs b/DepartmentPortal/AcademicProgressBusinessLogic/BusinessLogic/StudentAcademicProgressBusinessLogic.cs new file mode 100644 index 0000000..a1a20a1 --- /dev/null +++ b/DepartmentPortal/AcademicProgressBusinessLogic/BusinessLogic/StudentAcademicProgressBusinessLogic.cs @@ -0,0 +1,17 @@ +using AcademicProgressBusinessLogic.BindingModels; +using AcademicProgressBusinessLogic.Interfaces; +using AcademicProgressBusinessLogic.ViewModels; +using ModuleTools.BusinessLogics; +using ModuleTools.Enums; + +namespace AcademicProgressBusinessLogic.BusinessLogics +{ + /// + /// Логика работы с записями учебного прогресса + /// + public class StudentAcademicProgressBusinessLogic : GenericBusinessLogic + { + public StudentAcademicProgressBusinessLogic(IStudentAcademicProgress service) : base(service, "Записи учебного прогресса", AccessOperation.Записи_Учебного_Прогресса) { } + + } +} diff --git a/DepartmentPortal/AcademicProgressBusinessLogic/Enums/ExamScores.cs b/DepartmentPortal/AcademicProgressBusinessLogic/Enums/ExamScores.cs new file mode 100644 index 0000000..dcf2a00 --- /dev/null +++ b/DepartmentPortal/AcademicProgressBusinessLogic/Enums/ExamScores.cs @@ -0,0 +1,13 @@ +namespace AcademicProgressBusinessLogic.Enums +{ + public enum ExamScores + { + Зачет = 1, + + Удовлетворительно = 2, + + Хорошо = 3, + + Отлично = 4 + } +} diff --git a/DepartmentPortal/AcademicProgressBusinessLogic/Interfaces/IStudentAcademicProgress.cs b/DepartmentPortal/AcademicProgressBusinessLogic/Interfaces/IStudentAcademicProgress.cs new file mode 100644 index 0000000..1475e8d --- /dev/null +++ b/DepartmentPortal/AcademicProgressBusinessLogic/Interfaces/IStudentAcademicProgress.cs @@ -0,0 +1,11 @@ +using AcademicProgressBusinessLogic.BindingModels; +using ModuleTools.Interfaces; + + +namespace AcademicProgressBusinessLogic.Interfaces +{ + /// + /// Хранение учебного прогресса + /// + public interface IStudentAcademicProgress : IGenerticEntityService { } +} \ No newline at end of file diff --git a/DepartmentPortal/AcademicProgressBusinessLogic/ViewModels/StudentAcademicProgressViewModels.cs b/DepartmentPortal/AcademicProgressBusinessLogic/ViewModels/StudentAcademicProgressViewModels.cs new file mode 100644 index 0000000..3a6af99 --- /dev/null +++ b/DepartmentPortal/AcademicProgressBusinessLogic/ViewModels/StudentAcademicProgressViewModels.cs @@ -0,0 +1,85 @@ +using AcademicProgressBusinessLogic.Enums; +using DepartmentBusinessLogic.Enums; +using ModuleTools.Attributes; +using ModuleTools.Enums; +using ModuleTools.ViewModels; +using System; + + +namespace AcademicProgressBusinessLogic.ViewModels +{ + /// + /// Список успеваемости студентов + /// + public class StudentAcademicProgressListViewModel : ListViewModel { } + + /// + /// Элемент успеваемости студента + /// + [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 1200, Height = 800)] + [ViewModelControlElementDependenceEntity(Title = "Студенты", Order = 1, ParentPropertyName = "StudentAcademicProgressId", + ControlTypeObject = "AcademicProgressWindowsDesktop.EntityControls.ControlStudentList, AcademicProgressWindowsDesktop")] + [ViewModelControlElementDependenceEntity(Title = "Дисципилны", Order = 2, ParentPropertyName = "StudentAcademicProgressId", + ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineList, DepartmentWindowsDesktop")] + public class StudentAcademicProgressViewModels : ElementViewModel + { + [ViewModelControlElementProperty("Студент", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentList, DepartmentWindowsDesktop")] + [MapConfiguration("StudentId")] + public Guid StudentId { get; set; } + + [ViewModelControlListProperty("Имя", ColumnWidth = 200)] + [MapConfiguration("Student.FirstName", IsDifficle = true)] + public string FirstName { get; set; } + + [ViewModelControlListProperty("Фамилия", ColumnWidth = 250)] + [MapConfiguration("Student.LastName", IsDifficle = true)] + public string LastName { get; set; } + + + [ViewModelControlElementProperty("Дисциплина", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineList, DepartmentWindowsDesktop")] + [MapConfiguration("DisciplineId")] + public Guid DisciplineId { get; set; } + + [ViewModelControlListProperty("Дисциплина")] + [MapConfiguration("Discipline.ToString", IsDifficle = true)] + public string DisciplineName { get; set; } + + + + [ViewModelControlElementProperty("Семестр", ControlType.ControlEnum, MustHaveValue = true)] + [MapConfiguration("Semester")] + public Semester Semester { get; set; } + + [ViewModelControlListProperty("Семестр", ColumnWidth = 100)] + public string SemesterTitle => Semester.ToString("G"); + + + [ViewModelControlElementProperty("Оценка", ControlType.ControlEnum, MustHaveValue = true)] + [MapConfiguration("Score")] + public ExamScores Score { get; set; } + + [ViewModelControlListProperty("Оценка", ColumnWidth = 160)] + public string ExamScoresTitle => Score.ToString("G"); + + [ViewModelControlElementProperty("Является сдачей по направлению", ControlType.ControlBool, MustHaveValue = true)] + [MapConfiguration("IsResit")] + public bool IsResit { get; set; } + + [ViewModelControlListProperty("Cдача по направлению", ColumnWidth = 120)] + public string IsResitT => IsResit ? "Да" : "Нет"; + + [ViewModelControlElementProperty("Является повышением оценки", ControlType.ControlBool, MustHaveValue = true)] + [MapConfiguration("IsIncreaseScore")] + public bool IsIncreaseScore { get; set; } + + [ViewModelControlListProperty("Повышение оценки", ColumnWidth = 120)] + public string IsIncreaseScoreS => IsIncreaseScore ? "Да" : "Нет"; + + [ViewModelControlListProperty("Дата проставления", ColumnWidth = 120, DefaultCellStyleFormat = "dd.MM.yyyy")] + [ViewModelControlElementProperty("Дата проставления", ControlType.ControlDateTime, MustHaveValue = true)] + [MapConfiguration("AffixingDate")] + public DateTime AffixingDate { get; set; } + + + } +} diff --git a/DepartmentPortal/AcademicProgressDatabaseImplementation/AcademicProgressDatabaseImplementation.csproj b/DepartmentPortal/AcademicProgressDatabaseImplementation/AcademicProgressDatabaseImplementation.csproj new file mode 100644 index 0000000..74e723e --- /dev/null +++ b/DepartmentPortal/AcademicProgressDatabaseImplementation/AcademicProgressDatabaseImplementation.csproj @@ -0,0 +1,20 @@ + + + + net5.0 + + + + + + + + + + + + + + + + diff --git a/DepartmentPortal/AcademicProgressDatabaseImplementation/AcademicProgressImplementationExtensions.cs b/DepartmentPortal/AcademicProgressDatabaseImplementation/AcademicProgressImplementationExtensions.cs new file mode 100644 index 0000000..fc92a09 --- /dev/null +++ b/DepartmentPortal/AcademicProgressDatabaseImplementation/AcademicProgressImplementationExtensions.cs @@ -0,0 +1,17 @@ +using AcademicProgressBusinessLogic.Interfaces; +using AcademicProgressDatabaseImplementation.Implementations; +using ModuleTools.BusinessLogics; +using ModuleTools.Interfaces; +using System; + +namespace AcademicProgressDatabaseImplementation +{ + public class AcademicProgressImplementationExtensions : IImplementationExtension + { + public void RegisterServices() + { + DependencyManager.Instance.RegisterType(); + + } + } +} diff --git a/DepartmentPortal/AcademicProgressDatabaseImplementation/Implementations/StudentAcademicProgressService.cs b/DepartmentPortal/AcademicProgressDatabaseImplementation/Implementations/StudentAcademicProgressService.cs new file mode 100644 index 0000000..2f8e607 --- /dev/null +++ b/DepartmentPortal/AcademicProgressDatabaseImplementation/Implementations/StudentAcademicProgressService.cs @@ -0,0 +1,51 @@ +using AcademicProgressBusinessLogic.BindingModels; +using AcademicProgressBusinessLogic.Interfaces; +using AcademicProgressBusinessLogic.ViewModels; +using DatabaseCore; +using DatabaseCore.Models.AcademicProgress; +using Microsoft.EntityFrameworkCore; +using ModuleTools.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AcademicProgressDatabaseImplementation.Implementations +{ + /// + /// Реализация IStudentAcademicProgress + /// + public class StudentAcademicProgressService : + AbstractGenerticEntityService, + IStudentAcademicProgress + { + protected override OperationResultModel AdditionalCheckingWhenAdding(DbContext context, StudentAcademicProgressSetBindingModel model) => OperationResultModel.Success(null); + + protected override OperationResultModel AdditionalCheckingWhenDeleting(DbContext context, StudentAcademicProgress entity, StudentAcademicProgressGetBindingModel model) => OperationResultModel.Success(null); + + protected override IQueryable AdditionalCheckingWhenReadingList(IQueryable query, StudentAcademicProgressGetBindingModel model) + { + if (model.StudentId.HasValue) + { + query = query.Where(x => x.StudentId == model.StudentId.Value); + } + if (model.DisciplineId.HasValue) + { + query = query.Where(x => x.DisciplineId == model.DisciplineId.Value); + } + return query; + } + + protected override OperationResultModel AdditionalCheckingWhenUpdateing(DbContext context, StudentAcademicProgressSetBindingModel model) => OperationResultModel.Success(null); + + protected override void AdditionalDeleting(DbContext context, StudentAcademicProgress entity, StudentAcademicProgressGetBindingModel model) { } + + protected override StudentAcademicProgress GetUniqueEntity(StudentAcademicProgressSetBindingModel model, DbContext context) => context.Set().FirstOrDefault(x => x.StudentId == model.StudentId && x.Id != model.Id); + + protected override IQueryable IncludingWhenReading(IQueryable query) => query.Include(x => x.Student).Include(x => x.Discipline); + + protected override IQueryable OrderingWhenReading(IQueryable query) => query.OrderBy(x => x.Student.LastName).ThenBy(x => x.Student.FirstName); + + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/AcademicProgressWindowDesktopExtension.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/AcademicProgressWindowDesktopExtension.cs new file mode 100644 index 0000000..0fe093d --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/AcademicProgressWindowDesktopExtension.cs @@ -0,0 +1,97 @@ +using AcademicProgressWindowsDesktop.EntityControls.StudentAcademicProgress; +using AcademicProgressWindowsDesktop.SpecialControls; +using DesktopTools.Interfaces; +using DesktopTools.Models; +using ModuleTools.BindingModels; +using ModuleTools.BusinessLogics; +using ModuleTools.Enums; +using ModuleTools.Interfaces; +using ModuleTools.Models; +using System.Collections.Generic; + +namespace AcademicProgressWindowsDesktop +{ + public class AcademicProgressWindowDesktopExtension : IWindowDesktopExtension + { + public List GetListControlEntityList() + { + var manager = DependencyManager.Instance.Resolve(); + if (manager == null) + { + return null; + } + if (!manager.CheckAccess(new SecurityManagerCheckAccessModel(new AccessBindingModel { UserIdForAccess = manager.User }, + AccessOperation.Учет_успеваемости, AccessType.View, "Учет успеваемости"))) + { + return null; + } + + var list = new List + { + new WindowDesktopExtensionControlModel { Title = "Учет успеваемости" } + }; + List _controls = new() + { + new ControlStudentAcademicProgressList() + }; + + foreach (var cntrl in _controls) + { + if (manager.CheckAccess(new SecurityManagerCheckAccessModel(new AccessBindingModel { UserIdForAccess = manager.User }, + cntrl.AccessOperation, AccessType.View, cntrl.Title))) + { + list.Add(new WindowDesktopExtensionControlModel + { + Id = cntrl.ControlId, + Title = cntrl.Title, + Control = cntrl + }); + } + } + return list; + } + + public List GetListControlSpecialList() + { + var manager = DependencyManager.Instance.Resolve(); + if (manager == null) + { + return null; + } + + if (!manager.CheckAccess(new SecurityManagerCheckAccessModel(new AccessBindingModel { UserIdForAccess = manager.User }, + AccessOperation.Учет_успеваемости, AccessType.View, "Учет успеваемости"))) + { + return null; + } + + var list = new List + { + new WindowDesktopExtensionControlModel { Title = "Учет успеваемости" } + }; + List _controls = new() + { + new ControlStudentGraduate(), + new ControlReportPlanDisciplines(), + new ControlReportAcademicProgress() + + }; + + foreach (var cntrl in _controls) + { + if (manager.CheckAccess(new SecurityManagerCheckAccessModel(new AccessBindingModel { UserIdForAccess = manager.User }, + cntrl.AccessOperation, AccessType.View, cntrl.Title))) + { + list.Add(new WindowDesktopExtensionControlModel + { + Id = cntrl.ControlId, + Title = cntrl.Title, + Control = cntrl + }); + } + } + + return list; + } + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/AcademicProgressWindowsDesktop.csproj b/DepartmentPortal/AcademicProgressWindowsDesktop/AcademicProgressWindowsDesktop.csproj new file mode 100644 index 0000000..4cc48ec --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/AcademicProgressWindowsDesktop.csproj @@ -0,0 +1,34 @@ + + + + net5.0-windows7.0 + true + + + + + + + + + + + + Resources.resx + True + True + + + + + + Resources.Designer.cs + ResXFileCodeGenerator + + + + + + + + diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressElement.Designer.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressElement.Designer.cs new file mode 100644 index 0000000..ddd327a --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressElement.Designer.cs @@ -0,0 +1,33 @@ + +namespace AcademicProgressWindowsDesktop.EntityControls.StudentAcademicProgress +{ + partial class ControlStudentAcademicProgressElement + { + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + 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/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressElement.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressElement.cs new file mode 100644 index 0000000..21c8e91 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressElement.cs @@ -0,0 +1,32 @@ +using AcademicProgressBusinessLogic.BindingModels; +using AcademicProgressBusinessLogic.BusinessLogics; +using AcademicProgressBusinessLogic.ViewModels; +using DesktopTools.Controls; +using DesktopTools.Helpers; +using DesktopTools.Interfaces; +using DesktopTools.Models; +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace AcademicProgressWindowsDesktop.EntityControls.StudentAcademicProgress +{ + /// + /// Реализация контрола для успеваемости студентов + /// + public partial class ControlStudentAcademicProgressElement : GenericControlEntityElement, + IGenericControlEntityElement + { + public ControlStudentAcademicProgressElement() + { + InitializeComponent(); + Title = "Учет успеваемости студента"; + ControlId = new Guid("bdba2fca-4c38-33cf-89b0-4906c4aa7aa3"); + _genericControlViewEntityElement = this; + } + + public IControl GetInstanceGenericControl() => new ControlStudentAcademicProgressElement() { ControlId = Guid.NewGuid() }; + + public ControlViewEntityElementConfiguration GetConfigControl() => new(); + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressElement.resx b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressElement.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressElement.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressList.Designer.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressList.Designer.cs new file mode 100644 index 0000000..db913b1 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressList.Designer.cs @@ -0,0 +1,33 @@ + +namespace AcademicProgressWindowsDesktop.EntityControls.StudentAcademicProgress +{ + partial class ControlStudentAcademicProgressList + { + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + 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/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressList.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressList.cs new file mode 100644 index 0000000..24e0011 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressList.cs @@ -0,0 +1,50 @@ +using AcademicProgressBusinessLogic.BindingModels; +using AcademicProgressBusinessLogic.BusinessLogics; +using AcademicProgressBusinessLogic.ViewModels; +using DesktopTools.Controls; +using ModuleTools.Enums; +using DesktopTools.Interfaces; +using DesktopTools.Models; +using System; +using System.Collections.Generic; +using DesktopTools.Enums; + +namespace AcademicProgressWindowsDesktop.EntityControls.StudentAcademicProgress +{ + /// + /// Реализация контрола для списка успеваемости студентов + /// + public partial class ControlStudentAcademicProgressList : GenericControlEntityList, + IGenericControlEntityList + { + public ControlStudentAcademicProgressList() + { + InitializeComponent(); + Title = "Учет успеваемости студентов"; + ControlId = new Guid("9879dbb5-3b29-4971-9574-b4c13d5470c6"); + AccessOperation = AccessOperation.Учет_успеваемости; + ControlViewEntityElement = new ControlStudentAcademicProgressElement(); + _genericControlViewEntityList = this; + + } + public IControl GetInstanceGenericControl() => new ControlStudentAcademicProgressList() { ControlId = Guid.NewGuid() }; + + public ControlViewEntityListConfiguration GetConfigControl() => new() + { + PaginationOn = false, + HideToolStripButton = new List + { + ToolStripButtonListNames.toolStripButtonSearch + }, + ControlOnMoveElem = new Dictionary + { + { "ToolStripMenuItemLoadScore", ("Выгрузить оценки из 1С:Университет", (object sender, EventArgs e) => { LoadScore(); }) } + } + }; + + private void LoadScore() + { + //загрузка оценок + } + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressList.resx b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressList.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/EntityControls/StudentAcademicProgress/ControlStudentAcademicProgressList.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/AcademicProgressWindowsDesktop/Properties/Resources.Designer.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/Properties/Resources.Designer.cs new file mode 100644 index 0000000..676f7f7 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/Properties/Resources.Designer.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace AcademicProgressWindowsDesktop.Properties { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AcademicProgressWindowsDesktop.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Close { + get { + object obj = ResourceManager.GetObject("Close", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/Properties/Resources.resx b/DepartmentPortal/AcademicProgressWindowsDesktop/Properties/Resources.resx new file mode 100644 index 0000000..d77aec4 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + ..\Resources\Close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/Resources/Close.png b/DepartmentPortal/AcademicProgressWindowsDesktop/Resources/Close.png new file mode 100644 index 0000000..d88c7a0 Binary files /dev/null and b/DepartmentPortal/AcademicProgressWindowsDesktop/Resources/Close.png differ diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportAcademicProgress.Designer.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportAcademicProgress.Designer.cs new file mode 100644 index 0000000..e849c9b --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportAcademicProgress.Designer.cs @@ -0,0 +1,153 @@ + +namespace AcademicProgressWindowsDesktop.SpecialControls +{ + partial class ControlReportAcademicProgress + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором компонентов + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.toolStripHeader = new System.Windows.Forms.ToolStrip(); + this.toolStripButtonClose = new System.Windows.Forms.ToolStripButton(); + this.groupBoxReportInfo = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.buttonSave = new System.Windows.Forms.Button(); + this.textBoxSaveFolderName = new System.Windows.Forms.TextBox(); + this.labelSaveFolderName = new System.Windows.Forms.Label(); + this.buttonSaveSelectFolder = new System.Windows.Forms.Button(); + this.toolStripHeader.SuspendLayout(); + this.groupBoxReportInfo.SuspendLayout(); + this.SuspendLayout(); + // + // toolStripHeader + // + this.toolStripHeader.ImageScalingSize = new System.Drawing.Size(20, 20); + this.toolStripHeader.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripButtonClose}); + this.toolStripHeader.Location = new System.Drawing.Point(0, 0); + this.toolStripHeader.Name = "toolStripHeader"; + this.toolStripHeader.Size = new System.Drawing.Size(477, 27); + this.toolStripHeader.TabIndex = 3; + this.toolStripHeader.Text = "toolStrip1"; + // + // toolStripButtonClose + // + this.toolStripButtonClose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.toolStripButtonClose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButtonClose.Image = global::AcademicProgressWindowsDesktop.Properties.Resources.Close; + this.toolStripButtonClose.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonClose.Name = "toolStripButtonClose"; + this.toolStripButtonClose.Size = new System.Drawing.Size(29, 24); + this.toolStripButtonClose.Text = "Закрыть"; + // + // groupBoxReportInfo + // + this.groupBoxReportInfo.Controls.Add(this.label3); + this.groupBoxReportInfo.Location = new System.Drawing.Point(3, 112); + this.groupBoxReportInfo.Name = "groupBoxReportInfo"; + this.groupBoxReportInfo.Size = new System.Drawing.Size(460, 127); + this.groupBoxReportInfo.TabIndex = 18; + this.groupBoxReportInfo.TabStop = false; + this.groupBoxReportInfo.Text = "Информация для отчета"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(1519, 588); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(88, 20); + this.label3.TabIndex = 7; + this.label3.Text = "Семестр до"; + // + // buttonSave + // + this.buttonSave.Location = new System.Drawing.Point(330, 245); + this.buttonSave.Name = "buttonSave"; + this.buttonSave.Size = new System.Drawing.Size(133, 28); + this.buttonSave.TabIndex = 17; + this.buttonSave.Text = "Сохранить"; + this.buttonSave.UseVisualStyleBackColor = true; + this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click_1); + // + // textBoxSaveFolderName + // + this.textBoxSaveFolderName.Location = new System.Drawing.Point(119, 37); + this.textBoxSaveFolderName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.textBoxSaveFolderName.Name = "textBoxSaveFolderName"; + this.textBoxSaveFolderName.Size = new System.Drawing.Size(344, 27); + this.textBoxSaveFolderName.TabIndex = 15; + // + // labelSaveFolderName + // + this.labelSaveFolderName.AutoSize = true; + this.labelSaveFolderName.Location = new System.Drawing.Point(11, 40); + this.labelSaveFolderName.Name = "labelSaveFolderName"; + this.labelSaveFolderName.Size = new System.Drawing.Size(111, 20); + this.labelSaveFolderName.TabIndex = 14; + this.labelSaveFolderName.Text = "Путь до папки:"; + // + // buttonSaveSelectFolder + // + this.buttonSaveSelectFolder.Location = new System.Drawing.Point(330, 72); + this.buttonSaveSelectFolder.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonSaveSelectFolder.Name = "buttonSaveSelectFolder"; + this.buttonSaveSelectFolder.Size = new System.Drawing.Size(133, 31); + this.buttonSaveSelectFolder.TabIndex = 16; + this.buttonSaveSelectFolder.Text = "Выбрать папку"; + this.buttonSaveSelectFolder.UseVisualStyleBackColor = true; + // + // ControlReportAcademicProgress + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBoxReportInfo); + this.Controls.Add(this.buttonSaveSelectFolder); + this.Controls.Add(this.buttonSave); + this.Controls.Add(this.textBoxSaveFolderName); + this.Controls.Add(this.labelSaveFolderName); + this.Controls.Add(this.toolStripHeader); + this.Name = "ControlReportAcademicProgress"; + this.Size = new System.Drawing.Size(477, 300); + this.toolStripHeader.ResumeLayout(false); + this.toolStripHeader.PerformLayout(); + this.groupBoxReportInfo.ResumeLayout(false); + this.groupBoxReportInfo.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ToolStrip toolStripHeader; + private System.Windows.Forms.ToolStripButton toolStripButtonClose; + private System.Windows.Forms.GroupBox groupBoxReportInfo; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button buttonSave; + private System.Windows.Forms.TextBox textBoxSaveFolderName; + private System.Windows.Forms.Label labelSaveFolderName; + private System.Windows.Forms.Button buttonSaveSelectFolder; + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportAcademicProgress.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportAcademicProgress.cs new file mode 100644 index 0000000..083bc20 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportAcademicProgress.cs @@ -0,0 +1,149 @@ +using AcademicProgressBusinessLogic.BusinessLogics; +using DepartmentBusinessLogic.BindingModels; +using DepartmentBusinessLogic.BusinessLogics; +using DepartmentBusinessLogic.Interfaces; +using DepartmentWindowsDesktop.EntityControls; +using DesktopTools.BaseControls; +using DesktopTools.Interfaces; +using DesktopTools.Models; +using ModuleTools.BusinessLogics; +using ModuleTools.Enums; +using SecurityBusinessLogic.BindingModels; +using SecurityBusinessLogic.BusinessLogics; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Xml.Linq; + +namespace AcademicProgressWindowsDesktop.SpecialControls +{ + /// + /// Контрол для работы с отчетом об успеваемости + /// + public partial class ControlReportAcademicProgress : UserControl, IControl + { + /// + /// Класс с бизнес-логикой работы с отчетом + /// + private readonly ReportBusinessLogic _reportLogic; + + private IStudentService _studentLogic; + + /// + /// Событие, вызываемое при закрытии контрола + /// + /// + private event Action CloseEvent; + + /// + /// Контрол для работы с отчетом об успеваемости + /// + public ControlReportAcademicProgress() + { + InitializeComponent(); + _reportLogic = DependencyManager.Instance.Resolve(); + Title = "Отчет об успеваемости студентов"; + ControlId = new Guid("cc2244e6-5d92-4c89-b817-4c17ec382bc1"); + AccessOperation = AccessOperation.Учет_успеваемости; + toolStripButtonClose.Click += (object sender, EventArgs e) => + { + CloseEvent?.Invoke(ControlId); + Dispose(); + }; + LoadGroupBoxReportInfo(); + + } + + #region IControl + public Guid ControlId { get; private set; } + + public string Title { get; private set; } + + public AccessOperation AccessOperation { get; private set; } + + public IControl GetInstance() => new ControlReportAcademicProgress() { ControlId = Guid.NewGuid() }; + + public void Open(ControlOpenModel model) + { + if (model.CloseList != null) + { + CloseEvent += model.CloseList; + } + Dock = DockStyle.Fill; + } + + public string SaveToXml() => new XElement("Control", + new XAttribute("Type", GetType().FullName), + new XAttribute("ControlId", ControlId), + new XAttribute("Title", Title), + new XAttribute("AccessOperation", AccessOperation)).ToString(); + + public void LoadFromXml(string xml) + { + var control = XElement.Parse(xml); + ControlId = new Guid(control.Attribute("ControlId").Value.ToString()); + Title = control.Attribute("Title").Value.ToString(); + AccessOperation = (AccessOperation)Enum.Parse(typeof(AccessOperation), control.Attribute("AccessOperation").Value.ToString()); + } + #endregion + + + /// + /// Выбор пути для папки сохранения отчета + /// + /// + /// + private void buttonSaveSelectFolder_Click(object sender, EventArgs e) + { + var fbd = new FolderBrowserDialog(); + if (fbd.ShowDialog() == DialogResult.OK) + { + textBoxSaveFolderName.Text = fbd.SelectedPath; + } + } + + private void buttonSave_Click(object sender, EventArgs e) + { + + } + + private void buttonSave_Click_1(object sender, EventArgs e) + { + + } + + private void LoadGroupBoxReportInfo() + { + + int positionY = 40; + int interval = 15; + + var controlStudent = new BaseControlGuid("StudentId", true, false, new ControlStudentList(), null) + { + Location = new System.Drawing.Point(50, positionY), + Size = new System.Drawing.Size(410, 23) + + }; + controlStudent.SetTitleWidth(controlStudent.SetTitle("Cтудент:")); + groupBoxReportInfo.Controls.Add(controlStudent); + + positionY += controlStudent.Height + interval; + + var controlStudentGroup = new BaseControlGuid(" StudentGroupId", true, false, new ControlStudentGroupList(), null) + { + Location = new System.Drawing.Point(53, positionY), + Size = new System.Drawing.Size(407, 23) + + }; + controlStudentGroup.SetTitleWidth(controlStudentGroup.SetTitle("Группа:")); + groupBoxReportInfo.Controls.Add(controlStudentGroup); + } + + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportAcademicProgress.resx b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportAcademicProgress.resx new file mode 100644 index 0000000..5369054 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportAcademicProgress.resx @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + \ No newline at end of file diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportPlanDisciplines.Designer.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportPlanDisciplines.Designer.cs new file mode 100644 index 0000000..e0d7dab --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportPlanDisciplines.Designer.cs @@ -0,0 +1,154 @@ + +namespace AcademicProgressWindowsDesktop.SpecialControls +{ + partial class ControlReportPlanDisciplines + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором компонентов + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.toolStripHeader = new System.Windows.Forms.ToolStrip(); + this.toolStripButtonClose = new System.Windows.Forms.ToolStripButton(); + this.buttonSave = new System.Windows.Forms.Button(); + this.groupBoxReportInfo = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.buttonSaveSelectFolder = new System.Windows.Forms.Button(); + this.textBoxSaveFolderName = new System.Windows.Forms.TextBox(); + this.labelSaveFolderName = new System.Windows.Forms.Label(); + this.toolStripHeader.SuspendLayout(); + this.groupBoxReportInfo.SuspendLayout(); + this.SuspendLayout(); + // + // toolStripHeader + // + this.toolStripHeader.ImageScalingSize = new System.Drawing.Size(20, 20); + this.toolStripHeader.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripButtonClose}); + this.toolStripHeader.Location = new System.Drawing.Point(0, 0); + this.toolStripHeader.Name = "toolStripHeader"; + this.toolStripHeader.Size = new System.Drawing.Size(674, 27); + this.toolStripHeader.TabIndex = 4; + this.toolStripHeader.Text = "toolStrip1"; + // + // toolStripButtonClose + // + this.toolStripButtonClose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.toolStripButtonClose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButtonClose.Image = global::AcademicProgressWindowsDesktop.Properties.Resources.Close; + this.toolStripButtonClose.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonClose.Name = "toolStripButtonClose"; + this.toolStripButtonClose.Size = new System.Drawing.Size(29, 24); + this.toolStripButtonClose.Text = "Закрыть"; + // + // buttonSave + // + this.buttonSave.Location = new System.Drawing.Point(517, 275); + this.buttonSave.Name = "buttonSave"; + this.buttonSave.Size = new System.Drawing.Size(133, 28); + this.buttonSave.TabIndex = 6; + this.buttonSave.Text = "Сохранить"; + this.buttonSave.UseVisualStyleBackColor = true; + this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click); + // + // groupBoxReportInfo + // + this.groupBoxReportInfo.Controls.Add(this.label3); + this.groupBoxReportInfo.Location = new System.Drawing.Point(3, 80); + this.groupBoxReportInfo.Name = "groupBoxReportInfo"; + this.groupBoxReportInfo.Size = new System.Drawing.Size(651, 180); + this.groupBoxReportInfo.TabIndex = 8; + this.groupBoxReportInfo.TabStop = false; + this.groupBoxReportInfo.Text = "Информация для отчета"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(1519, 588); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(88, 20); + this.label3.TabIndex = 7; + this.label3.Text = "Семестр до"; + // + // buttonSaveSelectFolder + // + this.buttonSaveSelectFolder.Location = new System.Drawing.Point(517, 29); + this.buttonSaveSelectFolder.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonSaveSelectFolder.Name = "buttonSaveSelectFolder"; + this.buttonSaveSelectFolder.Size = new System.Drawing.Size(133, 31); + this.buttonSaveSelectFolder.TabIndex = 5; + this.buttonSaveSelectFolder.Text = "Выбрать папку"; + this.buttonSaveSelectFolder.UseVisualStyleBackColor = true; + this.buttonSaveSelectFolder.Click += new System.EventHandler(this.buttonSaveSelectFolder_Click); + // + // textBoxSaveFolderName + // + this.textBoxSaveFolderName.Location = new System.Drawing.Point(167, 31); + this.textBoxSaveFolderName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.textBoxSaveFolderName.Name = "textBoxSaveFolderName"; + this.textBoxSaveFolderName.Size = new System.Drawing.Size(344, 27); + this.textBoxSaveFolderName.TabIndex = 4; + // + // labelSaveFolderName + // + this.labelSaveFolderName.AutoSize = true; + this.labelSaveFolderName.Location = new System.Drawing.Point(50, 34); + this.labelSaveFolderName.Name = "labelSaveFolderName"; + this.labelSaveFolderName.Size = new System.Drawing.Size(111, 20); + this.labelSaveFolderName.TabIndex = 3; + this.labelSaveFolderName.Text = "Путь до папки:"; + // + // ControlReportPlanDisciplines + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBoxReportInfo); + this.Controls.Add(this.buttonSave); + this.Controls.Add(this.toolStripHeader); + this.Controls.Add(this.textBoxSaveFolderName); + this.Controls.Add(this.labelSaveFolderName); + this.Controls.Add(this.buttonSaveSelectFolder); + this.Name = "ControlReportPlanDisciplines"; + this.Size = new System.Drawing.Size(674, 317); + this.toolStripHeader.ResumeLayout(false); + this.toolStripHeader.PerformLayout(); + this.groupBoxReportInfo.ResumeLayout(false); + this.groupBoxReportInfo.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ToolStrip toolStripHeader; + private System.Windows.Forms.ToolStripButton toolStripButtonClose; + private System.Windows.Forms.Button buttonSave; + private System.Windows.Forms.GroupBox groupBoxReportInfo; + private System.Windows.Forms.Button buttonSaveSelectFolder; + private System.Windows.Forms.TextBox textBoxSaveFolderName; + private System.Windows.Forms.Label labelSaveFolderName; + private System.Windows.Forms.Label label3; + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportPlanDisciplines.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportPlanDisciplines.cs new file mode 100644 index 0000000..3698457 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportPlanDisciplines.cs @@ -0,0 +1,140 @@ +using DesktopTools.Interfaces; +using DesktopTools.Models; +using ModuleTools.Enums; +using System; +using System.Xml.Linq; +using System.Windows.Forms; +using DesktopTools.BaseControls; +using DepartmentWindowsDesktop.EntityControls; +using DepartmentBusinessLogic.Enums; + +namespace AcademicProgressWindowsDesktop.SpecialControls +{ + public partial class ControlReportPlanDisciplines : UserControl, IControl + { + /// + /// Событие, вызываемое при закрытии контрола + /// + private event Action CloseEvent; + public ControlReportPlanDisciplines() + { + InitializeComponent(); + Title = "План сдачи"; + //что за цифры тут откуда брать... + ControlId = new Guid("cc2234e6-5d92-4c89-b817-4c17ec382bc1"); + AccessOperation = AccessOperation.План_сдачи; + toolStripButtonClose.Click += (object sender, EventArgs e) => + { + CloseEvent?.Invoke(ControlId); + Dispose(); + }; + LoadGroupBoxReportInfo(); + + } + #region IControl + public Guid ControlId { get; private set; } + + public string Title { get; private set; } + + public AccessOperation AccessOperation { get; private set; } + + public IControl GetInstance() => new ControlReportPlanDisciplines() { ControlId = Guid.NewGuid() }; + + public void Open(ControlOpenModel model) + { + if (model.CloseList != null) + { + CloseEvent += model.CloseList; + } + Dock = DockStyle.Fill; + } + + public string SaveToXml() => new XElement("Control", + new XAttribute("Type", GetType().FullName), + new XAttribute("ControlId", ControlId), + new XAttribute("Title", Title), + new XAttribute("AccessOperation", AccessOperation)).ToString(); + + public void LoadFromXml(string xml) + { + var control = XElement.Parse(xml); + ControlId = new Guid(control.Attribute("ControlId").Value.ToString()); + Title = control.Attribute("Title").Value.ToString(); + AccessOperation = (AccessOperation)Enum.Parse(typeof(AccessOperation), control.Attribute("AccessOperation").Value.ToString()); + } + + #endregion + + private void buttonSave_Click(object sender, EventArgs e) + { + + } + + private void buttonSaveSelectFolder_Click(object sender, EventArgs e) + { + + } + + private void LoadGroupBoxReportInfo() + { + + int positionY = 40; + int interval = 15; + + var controlStudent = new BaseControlGuid("StudentId", true, false, new ControlStudentList(), null) + { + Location = new System.Drawing.Point(100, positionY), + Size = new System.Drawing.Size(545, 23) + + }; + controlStudent.SetTitleWidth(controlStudent.SetTitle("Cтудент:")); + groupBoxReportInfo.Controls.Add(controlStudent); + + positionY += controlStudent.Height + interval; + + var controlEducationDirectionUpTo = new BaseControlGuid("EducationDirectionViewModelId", true, false, new ControlEducationDirectionList(), null) + { + Location = new System.Drawing.Point(37, positionY), + Size = new System.Drawing.Size(356, 23) + + }; + controlEducationDirectionUpTo.SetTitleWidth(controlEducationDirectionUpTo.SetTitle("Направление до:")); + groupBoxReportInfo.Controls.Add(controlEducationDirectionUpTo); + + + + var controlSemesterUpTo = new BaseControlEnum("Semester", true, false, typeof(Semester)) + { + Location = new System.Drawing.Point(425, positionY), + Size = new System.Drawing.Size(220, 23) + + }; + controlSemesterUpTo.SetTitleWidth(controlSemesterUpTo.SetTitle("Семестр до:")); + groupBoxReportInfo.Controls.Add(controlSemesterUpTo); + + positionY += controlEducationDirectionUpTo.Height + interval; + + var controlEducationDirectionAfter = new BaseControlGuid("EducationDirectionViewModelId", true, false, new ControlEducationDirectionList(), null) + { + Location = new System.Drawing.Point(13, positionY), + Size = new System.Drawing.Size(380, 23) + + }; + controlEducationDirectionAfter.SetTitleWidth(controlEducationDirectionAfter.SetTitle("Направление после:")); + groupBoxReportInfo.Controls.Add(controlEducationDirectionAfter); + + + + var controlSemesterAfter = new BaseControlEnum("Semester", true, false, typeof(Semester)) + { + Location = new System.Drawing.Point(401, positionY), + Size = new System.Drawing.Size(245, 23) + + }; + controlSemesterAfter.SetTitleWidth(controlSemesterAfter.SetTitle("Семестр после:")); + groupBoxReportInfo.Controls.Add(controlSemesterAfter); + + + } + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportPlanDisciplines.resx b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportPlanDisciplines.resx new file mode 100644 index 0000000..e1e71f6 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlReportPlanDisciplines.resx @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + + 25 + + \ No newline at end of file diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlStudentGraduate.Designer.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlStudentGraduate.Designer.cs new file mode 100644 index 0000000..962628c --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlStudentGraduate.Designer.cs @@ -0,0 +1,152 @@ + +namespace AcademicProgressWindowsDesktop.SpecialControls +{ + partial class ControlStudentGraduate + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором компонентов + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.toolStripButtonClose = new System.Windows.Forms.ToolStripButton(); + this.toolStripHeader = new System.Windows.Forms.ToolStrip(); + this.groupBoxReportInfo = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.buttonSaveSelectFolder = new System.Windows.Forms.Button(); + this.buttonSave = new System.Windows.Forms.Button(); + this.textBoxSaveFolderName = new System.Windows.Forms.TextBox(); + this.labelSaveFolderName = new System.Windows.Forms.Label(); + this.toolStripHeader.SuspendLayout(); + this.groupBoxReportInfo.SuspendLayout(); + this.SuspendLayout(); + // + // toolStripButtonClose + // + this.toolStripButtonClose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.toolStripButtonClose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButtonClose.Image = global::AcademicProgressWindowsDesktop.Properties.Resources.Close; + this.toolStripButtonClose.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonClose.Name = "toolStripButtonClose"; + this.toolStripButtonClose.Size = new System.Drawing.Size(29, 24); + this.toolStripButtonClose.Text = "Закрыть"; + // + // toolStripHeader + // + this.toolStripHeader.ImageScalingSize = new System.Drawing.Size(20, 20); + this.toolStripHeader.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripButtonClose}); + this.toolStripHeader.Location = new System.Drawing.Point(0, 0); + this.toolStripHeader.Name = "toolStripHeader"; + this.toolStripHeader.Size = new System.Drawing.Size(478, 27); + this.toolStripHeader.TabIndex = 2; + this.toolStripHeader.Text = "toolStrip1"; + // + // groupBoxReportInfo + // + this.groupBoxReportInfo.Controls.Add(this.label3); + this.groupBoxReportInfo.Location = new System.Drawing.Point(3, 109); + this.groupBoxReportInfo.Name = "groupBoxReportInfo"; + this.groupBoxReportInfo.Size = new System.Drawing.Size(460, 127); + this.groupBoxReportInfo.TabIndex = 23; + this.groupBoxReportInfo.TabStop = false; + this.groupBoxReportInfo.Text = "Информация для отчета"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(1519, 588); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(88, 20); + this.label3.TabIndex = 7; + this.label3.Text = "Семестр до"; + // + // buttonSaveSelectFolder + // + this.buttonSaveSelectFolder.Location = new System.Drawing.Point(330, 69); + this.buttonSaveSelectFolder.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonSaveSelectFolder.Name = "buttonSaveSelectFolder"; + this.buttonSaveSelectFolder.Size = new System.Drawing.Size(133, 31); + this.buttonSaveSelectFolder.TabIndex = 21; + this.buttonSaveSelectFolder.Text = "Выбрать папку"; + this.buttonSaveSelectFolder.UseVisualStyleBackColor = true; + // + // buttonSave + // + this.buttonSave.Location = new System.Drawing.Point(330, 242); + this.buttonSave.Name = "buttonSave"; + this.buttonSave.Size = new System.Drawing.Size(133, 28); + this.buttonSave.TabIndex = 22; + this.buttonSave.Text = "Сохранить"; + this.buttonSave.UseVisualStyleBackColor = true; + // + // textBoxSaveFolderName + // + this.textBoxSaveFolderName.Location = new System.Drawing.Point(119, 34); + this.textBoxSaveFolderName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.textBoxSaveFolderName.Name = "textBoxSaveFolderName"; + this.textBoxSaveFolderName.Size = new System.Drawing.Size(344, 27); + this.textBoxSaveFolderName.TabIndex = 20; + // + // labelSaveFolderName + // + this.labelSaveFolderName.AutoSize = true; + this.labelSaveFolderName.Location = new System.Drawing.Point(11, 37); + this.labelSaveFolderName.Name = "labelSaveFolderName"; + this.labelSaveFolderName.Size = new System.Drawing.Size(111, 20); + this.labelSaveFolderName.TabIndex = 19; + this.labelSaveFolderName.Text = "Путь до папки:"; + // + // ControlStudentGraduate + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBoxReportInfo); + this.Controls.Add(this.buttonSaveSelectFolder); + this.Controls.Add(this.buttonSave); + this.Controls.Add(this.textBoxSaveFolderName); + this.Controls.Add(this.labelSaveFolderName); + this.Controls.Add(this.toolStripHeader); + this.Name = "ControlStudentGraduate"; + this.Size = new System.Drawing.Size(478, 279); + this.toolStripHeader.ResumeLayout(false); + this.toolStripHeader.PerformLayout(); + this.groupBoxReportInfo.ResumeLayout(false); + this.groupBoxReportInfo.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ToolStripButton toolStripButtonClose; + private System.Windows.Forms.ToolStrip toolStripHeader; + private System.Windows.Forms.GroupBox groupBoxReportInfo; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button buttonSaveSelectFolder; + private System.Windows.Forms.Button buttonSave; + private System.Windows.Forms.TextBox textBoxSaveFolderName; + private System.Windows.Forms.Label labelSaveFolderName; + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlStudentGraduate.cs b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlStudentGraduate.cs new file mode 100644 index 0000000..16c33d3 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlStudentGraduate.cs @@ -0,0 +1,104 @@ +using DepartmentWindowsDesktop.EntityControls; +using DesktopTools.BaseControls; +using DesktopTools.Interfaces; +using DesktopTools.Models; +using ModuleTools.Enums; +using System; +using System.Windows.Forms; +using System.Xml.Linq; + +namespace AcademicProgressWindowsDesktop.SpecialControls +{ + /// + /// Контрол для работы с выпускниками + /// + public partial class ControlStudentGraduate : UserControl, IControl + { + /// + /// Событие, вызываемое при закрытии контрола + /// + private event Action CloseEvent; + public ControlStudentGraduate() + { + InitializeComponent(); + Title = "Приложение к диплому"; + //что за цифры тут откуда брать... + ControlId = new Guid("cc3944e6-5d92-4c89-b817-4c17ec382bc1"); + AccessOperation = AccessOperation.Для_выпускников; + toolStripButtonClose.Click += (object sender, EventArgs e) => + { + CloseEvent?.Invoke(ControlId); + Dispose(); + }; + LoadGroupBoxReportInfo(); + + } + #region IControl + public Guid ControlId { get; private set; } + + public string Title { get; private set; } + + public AccessOperation AccessOperation { get; private set; } + + public IControl GetInstance() => new ControlStudentGraduate() { ControlId = Guid.NewGuid() }; + + public void Open(ControlOpenModel model) + { + if (model.CloseList != null) + { + CloseEvent += model.CloseList; + } + Dock = DockStyle.Fill; + } + + public string SaveToXml() => new XElement("Control", + new XAttribute("Type", GetType().FullName), + new XAttribute("ControlId", ControlId), + new XAttribute("Title", Title), + new XAttribute("AccessOperation", AccessOperation)).ToString(); + + public void LoadFromXml(string xml) + { + var control = XElement.Parse(xml); + ControlId = new Guid(control.Attribute("ControlId").Value.ToString()); + Title = control.Attribute("Title").Value.ToString(); + AccessOperation = (AccessOperation)Enum.Parse(typeof(AccessOperation), control.Attribute("AccessOperation").Value.ToString()); + } + #endregion + + + + private void buttonSave_Click_1(object sender, EventArgs e) + { + + } + + private void LoadGroupBoxReportInfo() + { + + int positionY = 40; + int interval = 15; + + var controlStudent = new BaseControlGuid("StudentId", true, false, new ControlStudentList(), null) + { + Location = new System.Drawing.Point(50, positionY), + Size = new System.Drawing.Size(410, 23) + + }; + controlStudent.SetTitleWidth(controlStudent.SetTitle("Cтудент:")); + groupBoxReportInfo.Controls.Add(controlStudent); + + positionY += controlStudent.Height + interval; + + var controlStudentGroup = new BaseControlGuid(" StudentGroupId", true, false, new ControlStudentGroupList(), null) + { + Location = new System.Drawing.Point(53, positionY), + Size = new System.Drawing.Size(407, 23) + + }; + controlStudentGroup.SetTitleWidth(controlStudentGroup.SetTitle("Группа:")); + groupBoxReportInfo.Controls.Add(controlStudentGroup); + } + + } +} diff --git a/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlStudentGraduate.resx b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlStudentGraduate.resx new file mode 100644 index 0000000..5369054 --- /dev/null +++ b/DepartmentPortal/AcademicProgressWindowsDesktop/SpecialControls/ControlStudentGraduate.resx @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + \ No newline at end of file diff --git a/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs b/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs index 046e6a7..ef72dc1 100644 --- a/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs +++ b/DepartmentPortal/Common/DatabaseCore/DatabaseContext.cs @@ -1,4 +1,5 @@ -using DatabaseCore.Models.Department; +using DatabaseCore.Models.AcademicProgress; +using DatabaseCore.Models.Department; using DatabaseCore.Models.Security; using Microsoft.EntityFrameworkCore; @@ -18,7 +19,7 @@ namespace DatabaseCore #endif #if DEBUG - optionsBuilder.UseSqlServer(@"Data Source=CHESHIR\SQLEXPRESS;Initial Catalog=DepartmentDatabasePortal;persist security info=True;user id=admin;password=cheshirSA123;MultipleActiveResultSets=True;"); + optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-V8MOBH6\SQLEXPRESS;Initial Catalog=DepartmentDBPortal2;Integrated Security=True;MultipleActiveResultSets=True;"); #endif } base.OnConfiguring(optionsBuilder); @@ -70,6 +71,8 @@ namespace DatabaseCore modelBuilder.Entity().HasIndex(d => new { d.OrderNumber }).IsUnique(); + modelBuilder.Entity().HasIndex(d => new { d.StudentId, d.DisciplineId, d.Semester }).IsUnique(); + modelBuilder.Entity().HasIndex(d => new { d.StudentId, d.OrderId }).IsUnique(); modelBuilder.Entity() diff --git a/DepartmentPortal/Common/DatabaseCore/DatabaseCore.csproj b/DepartmentPortal/Common/DatabaseCore/DatabaseCore.csproj index b72d084..c7b25ac 100644 --- a/DepartmentPortal/Common/DatabaseCore/DatabaseCore.csproj +++ b/DepartmentPortal/Common/DatabaseCore/DatabaseCore.csproj @@ -5,9 +5,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20220215123039_AddStudentAcademicProgress.Designer.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20220215123039_AddStudentAcademicProgress.Designer.cs new file mode 100644 index 0000000..e237323 --- /dev/null +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20220215123039_AddStudentAcademicProgress.Designer.cs @@ -0,0 +1,1526 @@ +// +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("20220215123039_AddStudentAcademicProgress")] + partial class AddStudentAcademicProgress + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.5") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("DatabaseCore.Models.AcademicProgress.StudentAcademicProgress", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AffixingDate") + .HasColumnType("datetime2"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsIncreaseScore") + .HasColumnType("bit"); + + b.Property("IsResit") + .HasColumnType("bit"); + + b.Property("Score") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Semester") + .HasColumnType("int"); + + b.Property("StudentAcademicProgressId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DisciplineId"); + + b.HasIndex("StudentId", "DisciplineId", "Semester") + .IsUnique(); + + b.ToTable("StudentAcademicProgress"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EducationDirectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("YearEntrance") + .HasColumnType("int"); + + b.Property("YearFinish") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EducationDirectionId", "YearEntrance") + .IsUnique() + .HasFilter("[EducationDirectionId] IS NOT NULL"); + + b.ToTable("AcademicPlans"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicPlanId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicPlanRecordParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineId") + .HasColumnType("uniqueidentifier"); + + b.Property("InDepartment") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFacultative") + .HasColumnType("bit"); + + b.Property("IsParent") + .HasColumnType("bit"); + + b.Property("Semester") + .HasColumnType("int"); + + b.Property("Zet") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DisciplineId"); + + b.HasIndex("AcademicPlanId", "DisciplineId", "Semester") + .IsUnique(); + + b.ToTable("AcademicPlanRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecordTimeNormHour", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicPlanRecordId") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("PlanHours") + .HasColumnType("decimal(18,2)"); + + b.Property("TimeNormId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TimeNormId"); + + b.HasIndex("AcademicPlanRecordId", "TimeNormId") + .IsUnique(); + + b.ToTable("AcademicPlanRecordTimeNormHours"); + }); + + 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") + .IsRequired() + .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(); + + 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.EducationDirection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Cipher") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LecturerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Profile") + .HasColumnType("nvarchar(450)"); + + b.Property("Qualification") + .HasColumnType("int"); + + b.Property("ShortName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("LecturerId"); + + b.HasIndex("Title", "Profile") + .IsUnique() + .HasFilter("[Profile] IS NOT NULL"); + + b.ToTable("EducationDirections"); + }); + + 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.EmployeePost", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsExternalCombination") + .HasColumnType("bit"); + + b.Property("IsInternalCombination") + .HasColumnType("bit"); + + b.Property("PostId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("PostId"); + + 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("GroupElectricalSafety") + .HasColumnType("nvarchar(max)"); + + 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("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("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.LecturerPost", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsExternalCombination") + .HasColumnType("bit"); + + b.Property("IsInternalCombination") + .HasColumnType("bit"); + + b.Property("LecturerId") + .HasColumnType("uniqueidentifier"); + + b.Property("PostId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("LecturerId"); + + b.HasIndex("PostId"); + + b.ToTable("LecturerPosts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Order", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("OrderDate") + .HasColumnType("datetime2"); + + b.Property("OrderNumber") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("OrderType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("OrderNumber") + .IsUnique(); + + b.ToTable("Orders"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderStudentRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Info") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("OrderId") + .HasColumnType("uniqueidentifier"); + + b.Property("OrderStudentMoveType") + .HasColumnType("int"); + + b.Property("StudentGroupFromId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudentGroupToId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("OrderId"); + + b.HasIndex("StudentGroupFromId"); + + b.HasIndex("StudentGroupToId"); + + b.HasIndex("StudentId", "OrderId") + .IsUnique(); + + b.ToTable("OrderStudentRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("SyncDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("OrderSyncHistories"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistoryRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Information") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OrderSyncHistoryId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("OrderSyncHistoryId"); + + b.ToTable("OrderSyncHistoryRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Post", 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("Order") + .HasColumnType("int"); + + b.Property("PostName") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("PostName") + .IsUnique() + .HasFilter("[PostName] IS NOT NULL"); + + b.ToTable("Posts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Student", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + 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(max)"); + + b.Property("Iduniv") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsSteward") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfBook") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Patronymic") + .HasColumnType("nvarchar(max)"); + + b.Property("Photo") + .HasColumnType("varbinary(max)"); + + b.Property("StudentGroupId") + .IsRequired() + .HasColumnType("uniqueidentifier"); + + b.Property("StudentState") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NumberOfBook") + .IsUnique(); + + b.HasIndex("StudentGroupId"); + + b.HasIndex("UserId"); + + b.ToTable("Students"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.StudentGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicCourse") + .HasColumnType("int"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EducationDirectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("GroupNumber") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LecturerId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("LecturerId"); + + b.HasIndex("EducationDirectionId", "AcademicCourse", "GroupNumber") + .IsUnique(); + + b.ToTable("StudentGroups"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineBlockId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("KindOfLoadAttributeName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadBlueAsteriskAttributeName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadBlueAsteriskName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadBlueAsteriskPracticName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TimeNormEducationDirectionQualification") + .HasColumnType("int"); + + b.Property("TimeNormName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("TimeNormOrder") + .HasColumnType("int"); + + b.Property("TimeNormShortName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("UseInLearningProgress") + .HasColumnType("bit"); + + b.Property("UseInSite") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("DisciplineBlockId"); + + b.HasIndex("TimeNormName", "TimeNormShortName") + .IsUnique(); + + b.ToTable("TimeNorms"); + }); + + 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("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + 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.AcademicProgress.StudentAcademicProgress", b => + { + b.HasOne("DatabaseCore.Models.Department.Discipline", "Discipline") + .WithMany("StudentAcademicProgress") + .HasForeignKey("DisciplineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Student", "Student") + .WithMany("StudentAcademicProgress") + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Discipline"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b => + { + b.HasOne("DatabaseCore.Models.Department.EducationDirection", "EducationDirection") + .WithMany("AcademicPlans") + .HasForeignKey("EducationDirectionId"); + + b.Navigation("EducationDirection"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b => + { + b.HasOne("DatabaseCore.Models.Department.AcademicPlan", "AcademicPlan") + .WithMany("AcademicPlanRecords") + .HasForeignKey("AcademicPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Discipline", "Discipline") + .WithMany("AcademicPlanRecords") + .HasForeignKey("DisciplineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicPlan"); + + b.Navigation("Discipline"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecordTimeNormHour", b => + { + b.HasOne("DatabaseCore.Models.Department.AcademicPlanRecord", "AcademicPlanRecord") + .WithMany("AcademicPlanRecordTimeNormHours") + .HasForeignKey("AcademicPlanRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.TimeNorm", "TimeNorm") + .WithMany("AcademicPlanRecordTimeNormHours") + .HasForeignKey("TimeNormId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("AcademicPlanRecord"); + + b.Navigation("TimeNorm"); + }); + + 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.EducationDirection", b => + { + b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer") + .WithMany("EducationDirections") + .HasForeignKey("LecturerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Lecturer"); + }); + + 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.EmployeePost", b => + { + b.HasOne("DatabaseCore.Models.Department.Employee", "Employee") + .WithMany("EmployeePosts") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Post", "Post") + .WithMany("EmployeePosts") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Post"); + }); + + 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.Security.User", "User") + .WithMany("Lecturers") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LecturerAcademicDegree"); + + b.Navigation("LecturerAcademicRank"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.LecturerPost", b => + { + b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer") + .WithMany("LecturerPosts") + .HasForeignKey("LecturerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Post", "Post") + .WithMany("LecturerPosts") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Lecturer"); + + b.Navigation("Post"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderStudentRecord", b => + { + b.HasOne("DatabaseCore.Models.Department.Order", "Order") + .WithMany("OrderStudentRecords") + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.StudentGroup", "StudentGroupFrom") + .WithMany("OrderStudentRecordFroms") + .HasForeignKey("StudentGroupFromId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("DatabaseCore.Models.Department.StudentGroup", "StudentGroupTo") + .WithMany("OrderStudentRecordTos") + .HasForeignKey("StudentGroupToId") + .OnDelete(DeleteBehavior.NoAction); + + b.HasOne("DatabaseCore.Models.Department.Student", "Student") + .WithMany("OrderStudentRecords") + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("Order"); + + b.Navigation("Student"); + + b.Navigation("StudentGroupFrom"); + + b.Navigation("StudentGroupTo"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistoryRecord", b => + { + b.HasOne("DatabaseCore.Models.Department.OrderSyncHistory", "OrderSyncHistory") + .WithMany("OrderSyncHistoryRecords") + .HasForeignKey("OrderSyncHistoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrderSyncHistory"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Student", b => + { + b.HasOne("DatabaseCore.Models.Department.StudentGroup", "StudentGroup") + .WithMany("Students") + .HasForeignKey("StudentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Security.User", "User") + .WithMany("Students") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StudentGroup"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.StudentGroup", b => + { + b.HasOne("DatabaseCore.Models.Department.EducationDirection", "EducationDirection") + .WithMany("StudentGroups") + .HasForeignKey("EducationDirectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer") + .WithMany("StudentGroups") + .HasForeignKey("LecturerId"); + + b.Navigation("EducationDirection"); + + b.Navigation("Lecturer"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b => + { + b.HasOne("DatabaseCore.Models.Department.DisciplineBlock", "DisciplineBlock") + .WithMany("TimeNorms") + .HasForeignKey("DisciplineBlockId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DisciplineBlock"); + }); + + 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.AcademicPlan", b => + { + b.Navigation("AcademicPlanRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b => + { + b.Navigation("AcademicPlanRecordTimeNormHours"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Discipline", b => + { + b.Navigation("AcademicPlanRecords"); + + b.Navigation("StudentAcademicProgress"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b => + { + b.Navigation("Disciplines"); + + b.Navigation("TimeNorms"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.EducationDirection", b => + { + b.Navigation("AcademicPlans"); + + b.Navigation("StudentGroups"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b => + { + b.Navigation("Classrooms"); + + b.Navigation("EmployeePosts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Lecturer", b => + { + b.Navigation("EducationDirections"); + + b.Navigation("LecturerPosts"); + + b.Navigation("StudentGroups"); + }); + + 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.Order", b => + { + b.Navigation("OrderStudentRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistory", b => + { + b.Navigation("OrderSyncHistoryRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Post", b => + { + b.Navigation("EmployeePosts"); + + b.Navigation("LecturerPosts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Student", b => + { + b.Navigation("OrderStudentRecords"); + + b.Navigation("StudentAcademicProgress"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.StudentGroup", b => + { + b.Navigation("OrderStudentRecordFroms"); + + b.Navigation("OrderStudentRecordTos"); + + b.Navigation("Students"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b => + { + b.Navigation("AcademicPlanRecordTimeNormHours"); + }); + + 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("Students"); + + b.Navigation("UserRoles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20220215123039_AddStudentAcademicProgress.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20220215123039_AddStudentAcademicProgress.cs new file mode 100644 index 0000000..dec5089 --- /dev/null +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20220215123039_AddStudentAcademicProgress.cs @@ -0,0 +1,62 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace DatabaseCore.Migrations +{ + public partial class AddStudentAcademicProgress : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "StudentAcademicProgress", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + StudentId = table.Column(type: "uniqueidentifier", nullable: false), + DisciplineId = table.Column(type: "uniqueidentifier", nullable: false), + Semester = table.Column(type: "int", nullable: false), + StudentAcademicProgressId = table.Column(type: "uniqueidentifier", nullable: true), + Score = table.Column(type: "nvarchar(max)", nullable: false), + AffixingDate = table.Column(type: "datetime2", nullable: false), + IsIncreaseScore = table.Column(type: "bit", nullable: false), + IsResit = table.Column(type: "bit", nullable: false), + DateCreate = table.Column(type: "datetime2", nullable: false), + DateDelete = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_StudentAcademicProgress", x => x.Id); + table.ForeignKey( + name: "FK_StudentAcademicProgress_Disciplines_DisciplineId", + column: x => x.DisciplineId, + principalTable: "Disciplines", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_StudentAcademicProgress_Students_StudentId", + column: x => x.StudentId, + principalTable: "Students", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_StudentAcademicProgress_DisciplineId", + table: "StudentAcademicProgress", + column: "DisciplineId"); + + migrationBuilder.CreateIndex( + name: "IX_StudentAcademicProgress_StudentId_DisciplineId_Semester", + table: "StudentAcademicProgress", + columns: new[] { "StudentId", "DisciplineId", "Semester" }, + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "StudentAcademicProgress"); + } + } +} diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20220314082116_ChangeDisciplinesAndAcademicProgress.Designer.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20220314082116_ChangeDisciplinesAndAcademicProgress.Designer.cs new file mode 100644 index 0000000..d1601d3 --- /dev/null +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20220314082116_ChangeDisciplinesAndAcademicProgress.Designer.cs @@ -0,0 +1,1525 @@ +// +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("20220314082116_ChangeDisciplinesAndAcademicProgress")] + partial class ChangeDisciplinesAndAcademicProgress + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.5") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("DatabaseCore.Models.AcademicProgress.StudentAcademicProgress", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AffixingDate") + .HasColumnType("datetime2"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsIncreaseScore") + .HasColumnType("bit"); + + b.Property("IsResit") + .HasColumnType("bit"); + + b.Property("Score") + .HasColumnType("int"); + + b.Property("Semester") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DisciplineId"); + + b.HasIndex("StudentId", "DisciplineId", "Semester") + .IsUnique(); + + b.ToTable("StudentAcademicProgress"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EducationDirectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("YearEntrance") + .HasColumnType("int"); + + b.Property("YearFinish") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EducationDirectionId", "YearEntrance") + .IsUnique() + .HasFilter("[EducationDirectionId] IS NOT NULL"); + + b.ToTable("AcademicPlans"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicPlanId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicPlanRecordParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineId") + .HasColumnType("uniqueidentifier"); + + b.Property("InDepartment") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFacultative") + .HasColumnType("bit"); + + b.Property("IsParent") + .HasColumnType("bit"); + + b.Property("Semester") + .HasColumnType("int"); + + b.Property("Zet") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DisciplineId"); + + b.HasIndex("AcademicPlanId", "DisciplineId", "Semester") + .IsUnique(); + + b.ToTable("AcademicPlanRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecordTimeNormHour", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicPlanRecordId") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("PlanHours") + .HasColumnType("decimal(18,2)"); + + b.Property("TimeNormId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TimeNormId"); + + b.HasIndex("AcademicPlanRecordId", "TimeNormId") + .IsUnique(); + + b.ToTable("AcademicPlanRecordTimeNormHours"); + }); + + 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") + .IsRequired() + .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(); + + 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("Discipline1CName") + .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.EducationDirection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Cipher") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LecturerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Profile") + .HasColumnType("nvarchar(450)"); + + b.Property("Qualification") + .HasColumnType("int"); + + b.Property("ShortName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("LecturerId"); + + b.HasIndex("Title", "Profile") + .IsUnique() + .HasFilter("[Profile] IS NOT NULL"); + + b.ToTable("EducationDirections"); + }); + + 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.EmployeePost", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsExternalCombination") + .HasColumnType("bit"); + + b.Property("IsInternalCombination") + .HasColumnType("bit"); + + b.Property("PostId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("PostId"); + + 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("GroupElectricalSafety") + .HasColumnType("nvarchar(max)"); + + 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("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("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.LecturerPost", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsExternalCombination") + .HasColumnType("bit"); + + b.Property("IsInternalCombination") + .HasColumnType("bit"); + + b.Property("LecturerId") + .HasColumnType("uniqueidentifier"); + + b.Property("PostId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("LecturerId"); + + b.HasIndex("PostId"); + + b.ToTable("LecturerPosts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Order", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("OrderDate") + .HasColumnType("datetime2"); + + b.Property("OrderNumber") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("OrderType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("OrderNumber") + .IsUnique(); + + b.ToTable("Orders"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderStudentRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Info") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("OrderId") + .HasColumnType("uniqueidentifier"); + + b.Property("OrderStudentMoveType") + .HasColumnType("int"); + + b.Property("StudentGroupFromId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudentGroupToId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("OrderId"); + + b.HasIndex("StudentGroupFromId"); + + b.HasIndex("StudentGroupToId"); + + b.HasIndex("StudentId", "OrderId") + .IsUnique(); + + b.ToTable("OrderStudentRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("SyncDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("OrderSyncHistories"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistoryRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Information") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OrderSyncHistoryId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("OrderSyncHistoryId"); + + b.ToTable("OrderSyncHistoryRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Post", 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("Order") + .HasColumnType("int"); + + b.Property("PostName") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("PostName") + .IsUnique() + .HasFilter("[PostName] IS NOT NULL"); + + b.ToTable("Posts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Student", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + 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(max)"); + + b.Property("Iduniv") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsSteward") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfBook") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Patronymic") + .HasColumnType("nvarchar(max)"); + + b.Property("Photo") + .HasColumnType("varbinary(max)"); + + b.Property("StudentGroupId") + .IsRequired() + .HasColumnType("uniqueidentifier"); + + b.Property("StudentState") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NumberOfBook") + .IsUnique(); + + b.HasIndex("StudentGroupId"); + + b.HasIndex("UserId"); + + b.ToTable("Students"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.StudentGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicCourse") + .HasColumnType("int"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EducationDirectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("GroupNumber") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LecturerId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("LecturerId"); + + b.HasIndex("EducationDirectionId", "AcademicCourse", "GroupNumber") + .IsUnique(); + + b.ToTable("StudentGroups"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineBlockId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("KindOfLoadAttributeName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadBlueAsteriskAttributeName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadBlueAsteriskName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadBlueAsteriskPracticName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TimeNormEducationDirectionQualification") + .HasColumnType("int"); + + b.Property("TimeNormName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("TimeNormOrder") + .HasColumnType("int"); + + b.Property("TimeNormShortName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("UseInLearningProgress") + .HasColumnType("bit"); + + b.Property("UseInSite") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("DisciplineBlockId"); + + b.HasIndex("TimeNormName", "TimeNormShortName") + .IsUnique(); + + b.ToTable("TimeNorms"); + }); + + 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("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + 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.AcademicProgress.StudentAcademicProgress", b => + { + b.HasOne("DatabaseCore.Models.Department.Discipline", "Discipline") + .WithMany("StudentAcademicProgress") + .HasForeignKey("DisciplineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Student", "Student") + .WithMany("StudentAcademicProgress") + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Discipline"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b => + { + b.HasOne("DatabaseCore.Models.Department.EducationDirection", "EducationDirection") + .WithMany("AcademicPlans") + .HasForeignKey("EducationDirectionId"); + + b.Navigation("EducationDirection"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b => + { + b.HasOne("DatabaseCore.Models.Department.AcademicPlan", "AcademicPlan") + .WithMany("AcademicPlanRecords") + .HasForeignKey("AcademicPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Discipline", "Discipline") + .WithMany("AcademicPlanRecords") + .HasForeignKey("DisciplineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicPlan"); + + b.Navigation("Discipline"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecordTimeNormHour", b => + { + b.HasOne("DatabaseCore.Models.Department.AcademicPlanRecord", "AcademicPlanRecord") + .WithMany("AcademicPlanRecordTimeNormHours") + .HasForeignKey("AcademicPlanRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.TimeNorm", "TimeNorm") + .WithMany("AcademicPlanRecordTimeNormHours") + .HasForeignKey("TimeNormId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("AcademicPlanRecord"); + + b.Navigation("TimeNorm"); + }); + + 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.EducationDirection", b => + { + b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer") + .WithMany("EducationDirections") + .HasForeignKey("LecturerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Lecturer"); + }); + + 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.EmployeePost", b => + { + b.HasOne("DatabaseCore.Models.Department.Employee", "Employee") + .WithMany("EmployeePosts") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Post", "Post") + .WithMany("EmployeePosts") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Post"); + }); + + 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.Security.User", "User") + .WithMany("Lecturers") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LecturerAcademicDegree"); + + b.Navigation("LecturerAcademicRank"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.LecturerPost", b => + { + b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer") + .WithMany("LecturerPosts") + .HasForeignKey("LecturerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Post", "Post") + .WithMany("LecturerPosts") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Lecturer"); + + b.Navigation("Post"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderStudentRecord", b => + { + b.HasOne("DatabaseCore.Models.Department.Order", "Order") + .WithMany("OrderStudentRecords") + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.StudentGroup", "StudentGroupFrom") + .WithMany("OrderStudentRecordFroms") + .HasForeignKey("StudentGroupFromId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("DatabaseCore.Models.Department.StudentGroup", "StudentGroupTo") + .WithMany("OrderStudentRecordTos") + .HasForeignKey("StudentGroupToId") + .OnDelete(DeleteBehavior.NoAction); + + b.HasOne("DatabaseCore.Models.Department.Student", "Student") + .WithMany("OrderStudentRecords") + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("Order"); + + b.Navigation("Student"); + + b.Navigation("StudentGroupFrom"); + + b.Navigation("StudentGroupTo"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistoryRecord", b => + { + b.HasOne("DatabaseCore.Models.Department.OrderSyncHistory", "OrderSyncHistory") + .WithMany("OrderSyncHistoryRecords") + .HasForeignKey("OrderSyncHistoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrderSyncHistory"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Student", b => + { + b.HasOne("DatabaseCore.Models.Department.StudentGroup", "StudentGroup") + .WithMany("Students") + .HasForeignKey("StudentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Security.User", "User") + .WithMany("Students") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StudentGroup"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.StudentGroup", b => + { + b.HasOne("DatabaseCore.Models.Department.EducationDirection", "EducationDirection") + .WithMany("StudentGroups") + .HasForeignKey("EducationDirectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer") + .WithMany("StudentGroups") + .HasForeignKey("LecturerId"); + + b.Navigation("EducationDirection"); + + b.Navigation("Lecturer"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b => + { + b.HasOne("DatabaseCore.Models.Department.DisciplineBlock", "DisciplineBlock") + .WithMany("TimeNorms") + .HasForeignKey("DisciplineBlockId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DisciplineBlock"); + }); + + 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.AcademicPlan", b => + { + b.Navigation("AcademicPlanRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b => + { + b.Navigation("AcademicPlanRecordTimeNormHours"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Discipline", b => + { + b.Navigation("AcademicPlanRecords"); + + b.Navigation("StudentAcademicProgress"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b => + { + b.Navigation("Disciplines"); + + b.Navigation("TimeNorms"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.EducationDirection", b => + { + b.Navigation("AcademicPlans"); + + b.Navigation("StudentGroups"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b => + { + b.Navigation("Classrooms"); + + b.Navigation("EmployeePosts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Lecturer", b => + { + b.Navigation("EducationDirections"); + + b.Navigation("LecturerPosts"); + + b.Navigation("StudentGroups"); + }); + + 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.Order", b => + { + b.Navigation("OrderStudentRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistory", b => + { + b.Navigation("OrderSyncHistoryRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Post", b => + { + b.Navigation("EmployeePosts"); + + b.Navigation("LecturerPosts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Student", b => + { + b.Navigation("OrderStudentRecords"); + + b.Navigation("StudentAcademicProgress"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.StudentGroup", b => + { + b.Navigation("OrderStudentRecordFroms"); + + b.Navigation("OrderStudentRecordTos"); + + b.Navigation("Students"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b => + { + b.Navigation("AcademicPlanRecordTimeNormHours"); + }); + + 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("Students"); + + b.Navigation("UserRoles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20220314082116_ChangeDisciplinesAndAcademicProgress.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20220314082116_ChangeDisciplinesAndAcademicProgress.cs new file mode 100644 index 0000000..638fbaf --- /dev/null +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20220314082116_ChangeDisciplinesAndAcademicProgress.cs @@ -0,0 +1,50 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace DatabaseCore.Migrations +{ + public partial class ChangeDisciplinesAndAcademicProgress : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "StudentAcademicProgressId", + table: "StudentAcademicProgress"); + + migrationBuilder.AlterColumn( + name: "Score", + table: "StudentAcademicProgress", + type: "int", + nullable: false, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AddColumn( + name: "Discipline1CName", + table: "Disciplines", + type: "nvarchar(max)", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Discipline1CName", + table: "Disciplines"); + + migrationBuilder.AlterColumn( + name: "Score", + table: "StudentAcademicProgress", + type: "nvarchar(max)", + nullable: false, + oldClrType: typeof(int), + oldType: "int"); + + migrationBuilder.AddColumn( + name: "StudentAcademicProgressId", + table: "StudentAcademicProgress", + type: "uniqueidentifier", + nullable: true); + } + } +} diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20220314112223_ChangeAcademicProgress.Designer.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20220314112223_ChangeAcademicProgress.Designer.cs new file mode 100644 index 0000000..65809c9 --- /dev/null +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20220314112223_ChangeAcademicProgress.Designer.cs @@ -0,0 +1,1525 @@ +// +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("20220314112223_ChangeAcademicProgress")] + partial class ChangeAcademicProgress + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.5") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("DatabaseCore.Models.AcademicProgress.StudentAcademicProgress", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AffixingDate") + .HasColumnType("datetime2"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsIncreaseScore") + .HasColumnType("bit"); + + b.Property("IsResit") + .HasColumnType("bit"); + + b.Property("Score") + .HasColumnType("int"); + + b.Property("Semester") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DisciplineId"); + + b.HasIndex("StudentId", "DisciplineId", "Semester") + .IsUnique(); + + b.ToTable("StudentAcademicProgress"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EducationDirectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("YearEntrance") + .HasColumnType("int"); + + b.Property("YearFinish") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EducationDirectionId", "YearEntrance") + .IsUnique() + .HasFilter("[EducationDirectionId] IS NOT NULL"); + + b.ToTable("AcademicPlans"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicPlanId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicPlanRecordParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineId") + .HasColumnType("uniqueidentifier"); + + b.Property("InDepartment") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsFacultative") + .HasColumnType("bit"); + + b.Property("IsParent") + .HasColumnType("bit"); + + b.Property("Semester") + .HasColumnType("int"); + + b.Property("Zet") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DisciplineId"); + + b.HasIndex("AcademicPlanId", "DisciplineId", "Semester") + .IsUnique(); + + b.ToTable("AcademicPlanRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecordTimeNormHour", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicPlanRecordId") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("PlanHours") + .HasColumnType("decimal(18,2)"); + + b.Property("TimeNormId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TimeNormId"); + + b.HasIndex("AcademicPlanRecordId", "TimeNormId") + .IsUnique(); + + b.ToTable("AcademicPlanRecordTimeNormHours"); + }); + + 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") + .IsRequired() + .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(); + + 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("Discipline1CName") + .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.EducationDirection", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Cipher") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LecturerId") + .HasColumnType("uniqueidentifier"); + + b.Property("Profile") + .HasColumnType("nvarchar(450)"); + + b.Property("Qualification") + .HasColumnType("int"); + + b.Property("ShortName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("LecturerId"); + + b.HasIndex("Title", "Profile") + .IsUnique() + .HasFilter("[Profile] IS NOT NULL"); + + b.ToTable("EducationDirections"); + }); + + 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.EmployeePost", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsExternalCombination") + .HasColumnType("bit"); + + b.Property("IsInternalCombination") + .HasColumnType("bit"); + + b.Property("PostId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("PostId"); + + 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("GroupElectricalSafety") + .HasColumnType("nvarchar(max)"); + + 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("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("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.LecturerPost", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsExternalCombination") + .HasColumnType("bit"); + + b.Property("IsInternalCombination") + .HasColumnType("bit"); + + b.Property("LecturerId") + .HasColumnType("uniqueidentifier"); + + b.Property("PostId") + .HasColumnType("uniqueidentifier"); + + b.Property("Rate") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("LecturerId"); + + b.HasIndex("PostId"); + + b.ToTable("LecturerPosts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Order", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("OrderDate") + .HasColumnType("datetime2"); + + b.Property("OrderNumber") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("OrderType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("OrderNumber") + .IsUnique(); + + b.ToTable("Orders"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderStudentRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Info") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("OrderId") + .HasColumnType("uniqueidentifier"); + + b.Property("OrderStudentMoveType") + .HasColumnType("int"); + + b.Property("StudentGroupFromId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudentGroupToId") + .HasColumnType("uniqueidentifier"); + + b.Property("StudentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("OrderId"); + + b.HasIndex("StudentGroupFromId"); + + b.HasIndex("StudentGroupToId"); + + b.HasIndex("StudentId", "OrderId") + .IsUnique(); + + b.ToTable("OrderStudentRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("SyncDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("OrderSyncHistories"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistoryRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Information") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OrderSyncHistoryId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("OrderSyncHistoryId"); + + b.ToTable("OrderSyncHistoryRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Post", 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("Order") + .HasColumnType("int"); + + b.Property("PostName") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("PostName") + .IsUnique() + .HasFilter("[PostName] IS NOT NULL"); + + b.ToTable("Posts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Student", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + 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(max)"); + + b.Property("Iduniv") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsSteward") + .HasColumnType("bit"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NumberOfBook") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Patronymic") + .HasColumnType("nvarchar(max)"); + + b.Property("Photo") + .HasColumnType("varbinary(max)"); + + b.Property("StudentGroupId") + .IsRequired() + .HasColumnType("uniqueidentifier"); + + b.Property("StudentState") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NumberOfBook") + .IsUnique(); + + b.HasIndex("StudentGroupId"); + + b.HasIndex("UserId"); + + b.ToTable("Students"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.StudentGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcademicCourse") + .HasColumnType("int"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("EducationDirectionId") + .HasColumnType("uniqueidentifier"); + + b.Property("GroupNumber") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LecturerId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("LecturerId"); + + b.HasIndex("EducationDirectionId", "AcademicCourse", "GroupNumber") + .IsUnique(); + + b.ToTable("StudentGroups"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineBlockId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("KindOfLoadAttributeName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadBlueAsteriskAttributeName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadBlueAsteriskName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadBlueAsteriskPracticName") + .HasColumnType("nvarchar(max)"); + + b.Property("KindOfLoadName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TimeNormEducationDirectionQualification") + .HasColumnType("int"); + + b.Property("TimeNormName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("TimeNormOrder") + .HasColumnType("int"); + + b.Property("TimeNormShortName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("UseInLearningProgress") + .HasColumnType("bit"); + + b.Property("UseInSite") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("DisciplineBlockId"); + + b.HasIndex("TimeNormName", "TimeNormShortName") + .IsUnique(); + + b.ToTable("TimeNorms"); + }); + + 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("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + 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.AcademicProgress.StudentAcademicProgress", b => + { + b.HasOne("DatabaseCore.Models.Department.Discipline", "Discipline") + .WithMany("StudentAcademicProgress") + .HasForeignKey("DisciplineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Student", "Student") + .WithMany("StudentAcademicProgress") + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Discipline"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b => + { + b.HasOne("DatabaseCore.Models.Department.EducationDirection", "EducationDirection") + .WithMany("AcademicPlans") + .HasForeignKey("EducationDirectionId"); + + b.Navigation("EducationDirection"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b => + { + b.HasOne("DatabaseCore.Models.Department.AcademicPlan", "AcademicPlan") + .WithMany("AcademicPlanRecords") + .HasForeignKey("AcademicPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Discipline", "Discipline") + .WithMany("AcademicPlanRecords") + .HasForeignKey("DisciplineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicPlan"); + + b.Navigation("Discipline"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecordTimeNormHour", b => + { + b.HasOne("DatabaseCore.Models.Department.AcademicPlanRecord", "AcademicPlanRecord") + .WithMany("AcademicPlanRecordTimeNormHours") + .HasForeignKey("AcademicPlanRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.TimeNorm", "TimeNorm") + .WithMany("AcademicPlanRecordTimeNormHours") + .HasForeignKey("TimeNormId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("AcademicPlanRecord"); + + b.Navigation("TimeNorm"); + }); + + 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.EducationDirection", b => + { + b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer") + .WithMany("EducationDirections") + .HasForeignKey("LecturerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Lecturer"); + }); + + 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.EmployeePost", b => + { + b.HasOne("DatabaseCore.Models.Department.Employee", "Employee") + .WithMany("EmployeePosts") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Post", "Post") + .WithMany("EmployeePosts") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Post"); + }); + + 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.Security.User", "User") + .WithMany("Lecturers") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("LecturerAcademicDegree"); + + b.Navigation("LecturerAcademicRank"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.LecturerPost", b => + { + b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer") + .WithMany("LecturerPosts") + .HasForeignKey("LecturerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Post", "Post") + .WithMany("LecturerPosts") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Lecturer"); + + b.Navigation("Post"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderStudentRecord", b => + { + b.HasOne("DatabaseCore.Models.Department.Order", "Order") + .WithMany("OrderStudentRecords") + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.StudentGroup", "StudentGroupFrom") + .WithMany("OrderStudentRecordFroms") + .HasForeignKey("StudentGroupFromId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("DatabaseCore.Models.Department.StudentGroup", "StudentGroupTo") + .WithMany("OrderStudentRecordTos") + .HasForeignKey("StudentGroupToId") + .OnDelete(DeleteBehavior.NoAction); + + b.HasOne("DatabaseCore.Models.Department.Student", "Student") + .WithMany("OrderStudentRecords") + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("Order"); + + b.Navigation("Student"); + + b.Navigation("StudentGroupFrom"); + + b.Navigation("StudentGroupTo"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistoryRecord", b => + { + b.HasOne("DatabaseCore.Models.Department.OrderSyncHistory", "OrderSyncHistory") + .WithMany("OrderSyncHistoryRecords") + .HasForeignKey("OrderSyncHistoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OrderSyncHistory"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Student", b => + { + b.HasOne("DatabaseCore.Models.Department.StudentGroup", "StudentGroup") + .WithMany("Students") + .HasForeignKey("StudentGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Security.User", "User") + .WithMany("Students") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StudentGroup"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.StudentGroup", b => + { + b.HasOne("DatabaseCore.Models.Department.EducationDirection", "EducationDirection") + .WithMany("StudentGroups") + .HasForeignKey("EducationDirectionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer") + .WithMany("StudentGroups") + .HasForeignKey("LecturerId"); + + b.Navigation("EducationDirection"); + + b.Navigation("Lecturer"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b => + { + b.HasOne("DatabaseCore.Models.Department.DisciplineBlock", "DisciplineBlock") + .WithMany("TimeNorms") + .HasForeignKey("DisciplineBlockId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DisciplineBlock"); + }); + + 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.AcademicPlan", b => + { + b.Navigation("AcademicPlanRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b => + { + b.Navigation("AcademicPlanRecordTimeNormHours"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Discipline", b => + { + b.Navigation("AcademicPlanRecords"); + + b.Navigation("StudentAcademicProgress"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b => + { + b.Navigation("Disciplines"); + + b.Navigation("TimeNorms"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.EducationDirection", b => + { + b.Navigation("AcademicPlans"); + + b.Navigation("StudentGroups"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b => + { + b.Navigation("Classrooms"); + + b.Navigation("EmployeePosts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Lecturer", b => + { + b.Navigation("EducationDirections"); + + b.Navigation("LecturerPosts"); + + b.Navigation("StudentGroups"); + }); + + 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.Order", b => + { + b.Navigation("OrderStudentRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.OrderSyncHistory", b => + { + b.Navigation("OrderSyncHistoryRecords"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Post", b => + { + b.Navigation("EmployeePosts"); + + b.Navigation("LecturerPosts"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.Student", b => + { + b.Navigation("OrderStudentRecords"); + + b.Navigation("StudentAcademicProgress"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.StudentGroup", b => + { + b.Navigation("OrderStudentRecordFroms"); + + b.Navigation("OrderStudentRecordTos"); + + b.Navigation("Students"); + }); + + modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b => + { + b.Navigation("AcademicPlanRecordTimeNormHours"); + }); + + 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("Students"); + + b.Navigation("UserRoles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20220314112223_ChangeAcademicProgress.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20220314112223_ChangeAcademicProgress.cs new file mode 100644 index 0000000..1567d95 --- /dev/null +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20220314112223_ChangeAcademicProgress.cs @@ -0,0 +1,17 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace DatabaseCore.Migrations +{ + public partial class ChangeAcademicProgress : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs index ebdae6d..e6a89f3 100644 --- a/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs +++ b/DepartmentPortal/Common/DatabaseCore/Migrations/DatabaseContextModelSnapshot.cs @@ -19,6 +19,51 @@ namespace DatabaseCore.Migrations .HasAnnotation("ProductVersion", "5.0.5") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + modelBuilder.Entity("DatabaseCore.Models.AcademicProgress.StudentAcademicProgress", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AffixingDate") + .HasColumnType("datetime2"); + + b.Property("DateCreate") + .HasColumnType("datetime2"); + + b.Property("DateDelete") + .HasColumnType("datetime2"); + + b.Property("DisciplineId") + .HasColumnType("uniqueidentifier"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IsIncreaseScore") + .HasColumnType("bit"); + + b.Property("IsResit") + .HasColumnType("bit"); + + b.Property("Score") + .HasColumnType("int"); + + b.Property("Semester") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("DisciplineId"); + + b.HasIndex("StudentId", "DisciplineId", "Semester") + .IsUnique(); + + b.ToTable("StudentAcademicProgress"); + }); + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b => { b.Property("Id") @@ -201,6 +246,9 @@ namespace DatabaseCore.Migrations b.Property("Description") .HasColumnType("nvarchar(max)"); + b.Property("Discipline1CName") + .HasColumnType("nvarchar(max)"); + b.Property("DisciplineBlockId") .HasColumnType("uniqueidentifier"); @@ -1065,6 +1113,25 @@ namespace DatabaseCore.Migrations b.ToTable("UserRoles"); }); + modelBuilder.Entity("DatabaseCore.Models.AcademicProgress.StudentAcademicProgress", b => + { + b.HasOne("DatabaseCore.Models.Department.Discipline", "Discipline") + .WithMany("StudentAcademicProgress") + .HasForeignKey("DisciplineId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("DatabaseCore.Models.Department.Student", "Student") + .WithMany("StudentAcademicProgress") + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Discipline"); + + b.Navigation("Student"); + }); + modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b => { b.HasOne("DatabaseCore.Models.Department.EducationDirection", "EducationDirection") @@ -1351,6 +1418,8 @@ namespace DatabaseCore.Migrations modelBuilder.Entity("DatabaseCore.Models.Department.Discipline", b => { b.Navigation("AcademicPlanRecords"); + + b.Navigation("StudentAcademicProgress"); }); modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b => @@ -1413,6 +1482,8 @@ namespace DatabaseCore.Migrations modelBuilder.Entity("DatabaseCore.Models.Department.Student", b => { b.Navigation("OrderStudentRecords"); + + b.Navigation("StudentAcademicProgress"); }); modelBuilder.Entity("DatabaseCore.Models.Department.StudentGroup", b => diff --git a/DepartmentPortal/Common/DatabaseCore/Models/AcademicProgress/StudentAcademicProgress.cs b/DepartmentPortal/Common/DatabaseCore/Models/AcademicProgress/StudentAcademicProgress.cs new file mode 100644 index 0000000..68f125e --- /dev/null +++ b/DepartmentPortal/Common/DatabaseCore/Models/AcademicProgress/StudentAcademicProgress.cs @@ -0,0 +1,66 @@ +using DatabaseCore.Models.Department; +using ModuleTools.Attributes; +using ModuleTools.Interfaces; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Runtime.Serialization; + +namespace DatabaseCore.Models.AcademicProgress +{ + /// + /// Класс, описывающий запись успеваемости студента + /// + [DataContract] + [EntityDescription("StudentAcademicProgress", "Запись успеваемости студента")] + [EntityDependency("Discipline", "DisciplineId", "Дисциплина, которая указана в записи успеваемости")] + [EntityDependency("Student", "StudentId", "Студент, для которого запрашивается успеваемость")] + public class StudentAcademicProgress : BaseEntity, IEntitySecurityExtenstion + { + [DataMember] + [Required(ErrorMessage = "required")] + [MapConfiguration("StudentId")] + public Guid StudentId { get; set; } + + [DataMember] + [Required(ErrorMessage = "required")] + [MapConfiguration("DisciplineId")] + public Guid DisciplineId { get; set; } + + [DataMember] + [Required] + [MapConfiguration("Semester")] + public int Semester { get; set; } + + [DataMember] + [Required(ErrorMessage = "required")] + [MapConfiguration("Score")] + public int Score { get; set; } + + [DataMember] + [Required] + [MapConfiguration("AffixingDate")] + public DateTime AffixingDate { get; set; } + + [DataMember] + [MapConfiguration("IsIncreaseScore")] + public bool IsIncreaseScore { get; set; } + + [DataMember] + [MapConfiguration("IsResit")] + public bool IsResit { get; set; } + + //------------------------------------------------------------------------- + public virtual Student Student { get; set; } + + public virtual Discipline Discipline { get; set; } + + //------------------------------------------------------------------------- + + public StudentAcademicProgress SecurityCheck(StudentAcademicProgress entity, bool allowFullData) => entity; + + public override string ToString() => $"{Student}-{Discipline}"; + + } +} diff --git a/DepartmentPortal/Common/DatabaseCore/Models/Department/Discipline.cs b/DepartmentPortal/Common/DatabaseCore/Models/Department/Discipline.cs index caa0e62..75ed2bc 100644 --- a/DepartmentPortal/Common/DatabaseCore/Models/Department/Discipline.cs +++ b/DepartmentPortal/Common/DatabaseCore/Models/Department/Discipline.cs @@ -1,4 +1,5 @@ -using ModuleTools.Attributes; +using DatabaseCore.Models.AcademicProgress; +using ModuleTools.Attributes; using ModuleTools.Interfaces; using System; using System.Collections.Generic; @@ -30,6 +31,10 @@ namespace DatabaseCore.Models.Department [MapConfiguration("DisciplineShortName")] public string DisciplineShortName { get; set; } + [DataMember] + [MapConfiguration("Discipline1CName")] + public string Discipline1CName { get; set; } + [DataMember] [MapConfiguration("Description")] public string Description { get; set; } @@ -46,6 +51,8 @@ namespace DatabaseCore.Models.Department [ForeignKey("DisciplineId")] public virtual List AcademicPlanRecords { get; set; } + [ForeignKey("DisciplineId")] + public virtual List StudentAcademicProgress { get; set; } //------------------------------------------------------------------------- public Discipline SecurityCheck(Discipline entity, bool allowFullData) => entity; diff --git a/DepartmentPortal/Common/DatabaseCore/Models/Department/Student.cs b/DepartmentPortal/Common/DatabaseCore/Models/Department/Student.cs index a24d2d6..1d74a5d 100644 --- a/DepartmentPortal/Common/DatabaseCore/Models/Department/Student.cs +++ b/DepartmentPortal/Common/DatabaseCore/Models/Department/Student.cs @@ -1,4 +1,5 @@ -using DatabaseCore.Models.Security; +using DatabaseCore.Models.AcademicProgress; +using DatabaseCore.Models.Security; using ModuleTools.Attributes; using ModuleTools.Extensions; using ModuleTools.Interfaces; @@ -85,6 +86,9 @@ namespace DatabaseCore.Models.Department [ForeignKey("StudentId")] public virtual List OrderStudentRecords { get; set; } + [ForeignKey("StudentId")] + public virtual List StudentAcademicProgress { get; set; } + //------------------------------------------------------------------------- public Student SecurityCheck(Student entity, bool allowFullData) diff --git a/DepartmentPortal/Common/DesktopTools/BaseControls/AbstractBaseControl.Designer.cs b/DepartmentPortal/Common/DesktopTools/BaseControls/AbstractBaseControl.Designer.cs index 2e1282a..129f752 100644 --- a/DepartmentPortal/Common/DesktopTools/BaseControls/AbstractBaseControl.Designer.cs +++ b/DepartmentPortal/Common/DesktopTools/BaseControls/AbstractBaseControl.Designer.cs @@ -29,37 +29,39 @@ namespace DesktopTools.BaseControls /// private void InitializeComponent() { - this.labelTitle = new System.Windows.Forms.Label(); - this.panelControl = new System.Windows.Forms.Panel(); - this.SuspendLayout(); - // - // labelTitle - // - this.labelTitle.Dock = System.Windows.Forms.DockStyle.Left; - this.labelTitle.Location = new System.Drawing.Point(0, 0); - this.labelTitle.Name = "labelTitle"; - this.labelTitle.Size = new System.Drawing.Size(93, 25); - this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "Наименование:"; - this.labelTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // panelControl - // - this.panelControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelControl.Location = new System.Drawing.Point(93, 0); - this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(407, 25); - this.panelControl.TabIndex = 1; - // - // AbstractBaseControl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.panelControl); - this.Controls.Add(this.labelTitle); - this.Name = "AbstractBaseControl"; - this.Size = new System.Drawing.Size(500, 25); - this.ResumeLayout(false); + this.labelTitle = new System.Windows.Forms.Label(); + this.panelControl = new System.Windows.Forms.Panel(); + this.SuspendLayout(); + // + // labelTitle + // + this.labelTitle.Dock = System.Windows.Forms.DockStyle.Left; + this.labelTitle.Location = new System.Drawing.Point(0, 0); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(123, 33); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "Наименование:"; + this.labelTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // panelControl + // + this.panelControl.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelControl.Location = new System.Drawing.Point(123, 0); + this.panelControl.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.panelControl.Name = "panelControl"; + this.panelControl.Size = new System.Drawing.Size(524, 33); + this.panelControl.TabIndex = 1; + // + // AbstractBaseControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.panelControl); + this.Controls.Add(this.labelTitle); + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.Name = "AbstractBaseControl"; + this.Size = new System.Drawing.Size(647, 33); + this.ResumeLayout(false); } diff --git a/DepartmentPortal/Common/ModuleTools/Enums/AccessOperation.cs b/DepartmentPortal/Common/ModuleTools/Enums/AccessOperation.cs index d75d4a3..392e1be 100644 --- a/DepartmentPortal/Common/ModuleTools/Enums/AccessOperation.cs +++ b/DepartmentPortal/Common/ModuleTools/Enums/AccessOperation.cs @@ -51,6 +51,19 @@ СинхронизацияПриказов = 150, #endregion + #region Успеваемость + Учет_успеваемости = 700, + + План_сдачи = 701, + + Прогресс = 702, + + Для_выпускников = 703, + + Академическая_разница = 704, + #endregion + + // Меню Учебный процесс Учебный_процесс = 150, @@ -107,6 +120,8 @@ // Web-портал Новости = 600, - Комментарии = 601 + Комментарии = 601, + + Записи_Учебного_Прогресса = 602 } } \ No newline at end of file diff --git a/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeElement.resx b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeElement.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/DepartmentPortal/Department/DepartmentWindowsDesktop/EntityControls/Employee/ControlEmployeeElement.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/DepartmentPortal.sln b/DepartmentPortal/DepartmentPortal.sln index 8e646f0..21597fc 100644 --- a/DepartmentPortal/DepartmentPortal.sln +++ b/DepartmentPortal/DepartmentPortal.sln @@ -23,11 +23,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModuleTools", "Common\Modul EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Department", "Department", "{A19E7709-6AD8-4E9B-B3AB-4339C67D9F39}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DepartmentBusinessLogic", "Department\DepartmentBusinessLogic\DepartmentBusinessLogic.csproj", "{69B94DB1-D1BE-4905-81AC-A5D49D0C9719}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DepartmentBusinessLogic", "Department\DepartmentBusinessLogic\DepartmentBusinessLogic.csproj", "{69B94DB1-D1BE-4905-81AC-A5D49D0C9719}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DepartmentDatabaseImplementation", "Department\DepartmentDatabaseImplementation.csproj\DepartmentDatabaseImplementation.csproj", "{1A9E20FE-6324-4839-A3AD-5726305122A5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DepartmentDatabaseImplementation", "Department\DepartmentDatabaseImplementation.csproj\DepartmentDatabaseImplementation.csproj", "{1A9E20FE-6324-4839-A3AD-5726305122A5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DepartmentWindowsDesktop", "Department\DepartmentWindowsDesktop\DepartmentWindowsDesktop.csproj", "{8E12DE14-0D83-48D8-964D-8B2BB06DB129}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DepartmentWindowsDesktop", "Department\DepartmentWindowsDesktop\DepartmentWindowsDesktop.csproj", "{8E12DE14-0D83-48D8-964D-8B2BB06DB129}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AcademicProgress", "AcademicProgress", "{DDBE45C6-7A51-4578-9661-B5F2BB60D7C1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AcademicProgressBusinessLogic", "AcademicProgressBusinessLogic\AcademicProgressBusinessLogic.csproj", "{A4BDED59-D9A6-46BA-972A-36078AFC7EC8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AcademicProgressDatabaseImplementation", "AcademicProgressDatabaseImplementation\AcademicProgressDatabaseImplementation.csproj", "{0BC13743-FB52-45BB-B919-D425A00B15BC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AcademicProgressWindowsDesktop", "AcademicProgressWindowsDesktop\AcademicProgressWindowsDesktop.csproj", "{BEBE6200-ECA2-470C-AA4F-8E2ACDA4B9BE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -75,6 +83,18 @@ Global {8E12DE14-0D83-48D8-964D-8B2BB06DB129}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E12DE14-0D83-48D8-964D-8B2BB06DB129}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E12DE14-0D83-48D8-964D-8B2BB06DB129}.Release|Any CPU.Build.0 = Release|Any CPU + {A4BDED59-D9A6-46BA-972A-36078AFC7EC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4BDED59-D9A6-46BA-972A-36078AFC7EC8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4BDED59-D9A6-46BA-972A-36078AFC7EC8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4BDED59-D9A6-46BA-972A-36078AFC7EC8}.Release|Any CPU.Build.0 = Release|Any CPU + {0BC13743-FB52-45BB-B919-D425A00B15BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0BC13743-FB52-45BB-B919-D425A00B15BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0BC13743-FB52-45BB-B919-D425A00B15BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0BC13743-FB52-45BB-B919-D425A00B15BC}.Release|Any CPU.Build.0 = Release|Any CPU + {BEBE6200-ECA2-470C-AA4F-8E2ACDA4B9BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BEBE6200-ECA2-470C-AA4F-8E2ACDA4B9BE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BEBE6200-ECA2-470C-AA4F-8E2ACDA4B9BE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BEBE6200-ECA2-470C-AA4F-8E2ACDA4B9BE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -89,6 +109,9 @@ Global {69B94DB1-D1BE-4905-81AC-A5D49D0C9719} = {A19E7709-6AD8-4E9B-B3AB-4339C67D9F39} {1A9E20FE-6324-4839-A3AD-5726305122A5} = {A19E7709-6AD8-4E9B-B3AB-4339C67D9F39} {8E12DE14-0D83-48D8-964D-8B2BB06DB129} = {A19E7709-6AD8-4E9B-B3AB-4339C67D9F39} + {A4BDED59-D9A6-46BA-972A-36078AFC7EC8} = {DDBE45C6-7A51-4578-9661-B5F2BB60D7C1} + {0BC13743-FB52-45BB-B919-D425A00B15BC} = {DDBE45C6-7A51-4578-9661-B5F2BB60D7C1} + {BEBE6200-ECA2-470C-AA4F-8E2ACDA4B9BE} = {DDBE45C6-7A51-4578-9661-B5F2BB60D7C1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FBA0CB49-EF2D-4538-9D00-FCEDA24879A9} diff --git a/DepartmentPortal/DepartmentPortalDesctop/FormEnter.Designer.cs b/DepartmentPortal/DepartmentPortalDesctop/FormEnter.Designer.cs index 88bffc0..efdff1b 100644 --- a/DepartmentPortal/DepartmentPortalDesctop/FormEnter.Designer.cs +++ b/DepartmentPortal/DepartmentPortalDesctop/FormEnter.Designer.cs @@ -53,6 +53,7 @@ namespace DepartmentPortalDesctop this.textBoxLogin.Name = "textBoxLogin"; this.textBoxLogin.Size = new System.Drawing.Size(242, 23); this.textBoxLogin.TabIndex = 1; + this.textBoxLogin.Text = "admin"; // // labelPassword // @@ -72,6 +73,8 @@ namespace DepartmentPortalDesctop this.textBoxPassword.Size = new System.Drawing.Size(242, 23); this.textBoxPassword.TabIndex = 3; this.textBoxPassword.UseSystemPasswordChar = true; + this.textBoxPassword.Text = "qwerty"; + // // buttonEnter // diff --git a/DepartmentPortal/DepartmentPortalDesctop/FormMain.Designer.cs b/DepartmentPortal/DepartmentPortalDesctop/FormMain.Designer.cs index 0106e8e..8b5d15a 100644 --- a/DepartmentPortal/DepartmentPortalDesctop/FormMain.Designer.cs +++ b/DepartmentPortal/DepartmentPortalDesctop/FormMain.Designer.cs @@ -29,110 +29,121 @@ namespace DepartmentPortalDesctop /// private void InitializeComponent() { - this.menuMain = new System.Windows.Forms.MenuStrip(); - this.panelControls = new System.Windows.Forms.Panel(); - this.dataGridViewControls = new System.Windows.Forms.DataGridView(); - this.ColumnControlId = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColumnControlName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ButtonShowHideControlList = new System.Windows.Forms.Button(); - this.panelControl = new System.Windows.Forms.Panel(); - this.panelControls.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewControls)).BeginInit(); - this.SuspendLayout(); - // - // menuMain - // - this.menuMain.Location = new System.Drawing.Point(0, 0); - this.menuMain.Name = "menuMain"; - this.menuMain.Size = new System.Drawing.Size(800, 24); - this.menuMain.TabIndex = 0; - this.menuMain.Text = "Главное меню"; - // - // panelControls - // - this.panelControls.Controls.Add(this.dataGridViewControls); - this.panelControls.Dock = System.Windows.Forms.DockStyle.Left; - this.panelControls.Location = new System.Drawing.Point(0, 24); - this.panelControls.Name = "panelControls"; - this.panelControls.Size = new System.Drawing.Size(191, 426); - this.panelControls.TabIndex = 1; - // - // dataGridViewControls - // - this.dataGridViewControls.AllowUserToAddRows = false; - this.dataGridViewControls.AllowUserToDeleteRows = false; - this.dataGridViewControls.AllowUserToResizeColumns = false; - this.dataGridViewControls.AllowUserToResizeRows = false; - this.dataGridViewControls.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; - this.dataGridViewControls.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewControls.ColumnHeadersVisible = false; - this.dataGridViewControls.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.menuMain = new System.Windows.Forms.MenuStrip(); + this.panelControls = new System.Windows.Forms.Panel(); + this.dataGridViewControls = new System.Windows.Forms.DataGridView(); + this.ColumnControlId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColumnControlName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ButtonShowHideControlList = new System.Windows.Forms.Button(); + this.panelControl = new System.Windows.Forms.Panel(); + this.panelControls.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridViewControls)).BeginInit(); + this.SuspendLayout(); + // + // menuMain + // + this.menuMain.ImageScalingSize = new System.Drawing.Size(20, 20); + this.menuMain.Location = new System.Drawing.Point(0, 0); + this.menuMain.Name = "menuMain"; + this.menuMain.Padding = new System.Windows.Forms.Padding(7, 3, 0, 3); + this.menuMain.Size = new System.Drawing.Size(914, 30); + this.menuMain.TabIndex = 0; + this.menuMain.Text = "Главное меню"; + // + // panelControls + // + this.panelControls.Controls.Add(this.dataGridViewControls); + this.panelControls.Dock = System.Windows.Forms.DockStyle.Left; + this.panelControls.Location = new System.Drawing.Point(0, 30); + this.panelControls.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.panelControls.Name = "panelControls"; + this.panelControls.Size = new System.Drawing.Size(218, 570); + this.panelControls.TabIndex = 1; + // + // dataGridViewControls + // + this.dataGridViewControls.AllowUserToAddRows = false; + this.dataGridViewControls.AllowUserToDeleteRows = false; + this.dataGridViewControls.AllowUserToResizeColumns = false; + this.dataGridViewControls.AllowUserToResizeRows = false; + this.dataGridViewControls.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; + this.dataGridViewControls.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridViewControls.ColumnHeadersVisible = false; + this.dataGridViewControls.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.ColumnControlId, this.ColumnControlName}); - this.dataGridViewControls.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewControls.Location = new System.Drawing.Point(0, 0); - this.dataGridViewControls.MultiSelect = false; - this.dataGridViewControls.Name = "dataGridViewControls"; - this.dataGridViewControls.ReadOnly = true; - this.dataGridViewControls.RowHeadersVisible = false; - this.dataGridViewControls.RowTemplate.Height = 25; - this.dataGridViewControls.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridViewControls.Size = new System.Drawing.Size(191, 426); - this.dataGridViewControls.TabIndex = 0; - this.dataGridViewControls.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridViewControls_CellClick); - // - // ColumnControlId - // - this.ColumnControlId.HeaderText = "Id"; - this.ColumnControlId.Name = "ColumnControlId"; - this.ColumnControlId.ReadOnly = true; - this.ColumnControlId.Visible = false; - // - // ColumnControlName - // - this.ColumnControlName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.ColumnControlName.HeaderText = "ControlName"; - this.ColumnControlName.Name = "ColumnControlName"; - this.ColumnControlName.ReadOnly = true; - // - // ButtonShowHideControlList - // - this.ButtonShowHideControlList.Dock = System.Windows.Forms.DockStyle.Left; - this.ButtonShowHideControlList.Location = new System.Drawing.Point(191, 24); - this.ButtonShowHideControlList.Name = "ButtonShowHideControlList"; - this.ButtonShowHideControlList.Size = new System.Drawing.Size(25, 426); - this.ButtonShowHideControlList.TabIndex = 3; - this.ButtonShowHideControlList.Text = ">"; - this.ButtonShowHideControlList.UseVisualStyleBackColor = true; - this.ButtonShowHideControlList.Click += new System.EventHandler(this.ButtonShowHideControlList_Click); - // - // panelControl - // - this.panelControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelControl.Location = new System.Drawing.Point(216, 24); - this.panelControl.Name = "panelControl"; - this.panelControl.Size = new System.Drawing.Size(584, 426); - this.panelControl.TabIndex = 4; - // - // FormMain - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Controls.Add(this.panelControl); - this.Controls.Add(this.ButtonShowHideControlList); - this.Controls.Add(this.panelControls); - this.Controls.Add(this.menuMain); - this.MainMenuStrip = this.menuMain; - this.Name = "FormMain"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Кафедральный портал"; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormMain_FormClosing); - this.panelControls.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewControls)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); + this.dataGridViewControls.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataGridViewControls.Location = new System.Drawing.Point(0, 0); + this.dataGridViewControls.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.dataGridViewControls.MultiSelect = false; + this.dataGridViewControls.Name = "dataGridViewControls"; + this.dataGridViewControls.ReadOnly = true; + this.dataGridViewControls.RowHeadersVisible = false; + this.dataGridViewControls.RowHeadersWidth = 51; + this.dataGridViewControls.RowTemplate.Height = 25; + this.dataGridViewControls.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridViewControls.Size = new System.Drawing.Size(218, 570); + this.dataGridViewControls.TabIndex = 0; + this.dataGridViewControls.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridViewControls_CellClick); + // + // ColumnControlId + // + this.ColumnControlId.HeaderText = "Id"; + this.ColumnControlId.MinimumWidth = 6; + this.ColumnControlId.Name = "ColumnControlId"; + this.ColumnControlId.ReadOnly = true; + this.ColumnControlId.Visible = false; + this.ColumnControlId.Width = 125; + // + // ColumnControlName + // + this.ColumnControlName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.ColumnControlName.HeaderText = "ControlName"; + this.ColumnControlName.MinimumWidth = 6; + this.ColumnControlName.Name = "ColumnControlName"; + this.ColumnControlName.ReadOnly = true; + // + // ButtonShowHideControlList + // + this.ButtonShowHideControlList.Dock = System.Windows.Forms.DockStyle.Left; + this.ButtonShowHideControlList.Location = new System.Drawing.Point(218, 30); + this.ButtonShowHideControlList.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.ButtonShowHideControlList.Name = "ButtonShowHideControlList"; + this.ButtonShowHideControlList.Size = new System.Drawing.Size(29, 570); + this.ButtonShowHideControlList.TabIndex = 3; + this.ButtonShowHideControlList.Text = ">"; + this.ButtonShowHideControlList.UseVisualStyleBackColor = true; + this.ButtonShowHideControlList.Click += new System.EventHandler(this.ButtonShowHideControlList_Click); + // + // panelControl + // + this.panelControl.Dock = System.Windows.Forms.DockStyle.Fill; + this.panelControl.Location = new System.Drawing.Point(247, 30); + this.panelControl.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.panelControl.Name = "panelControl"; + this.panelControl.Size = new System.Drawing.Size(667, 570); + this.panelControl.TabIndex = 4; + // + // FormMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(914, 600); + this.Controls.Add(this.panelControl); + this.Controls.Add(this.ButtonShowHideControlList); + this.Controls.Add(this.panelControls); + this.Controls.Add(this.menuMain); + this.MainMenuStrip = this.menuMain; + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.Name = "FormMain"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Кафедральный портал"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormMain_FormClosing); + this.panelControls.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridViewControls)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/DepartmentPortal/DepartmentPortalDesctop/FormMain.resx b/DepartmentPortal/DepartmentPortalDesctop/FormMain.resx index 3f841b6..41e0a51 100644 --- a/DepartmentPortal/DepartmentPortalDesctop/FormMain.resx +++ b/DepartmentPortal/DepartmentPortalDesctop/FormMain.resx @@ -57,10 +57,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + 17, 17 + + True - + True \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.Designer.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.Designer.cs index c762c45..0441419 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.Designer.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.Designer.cs @@ -29,214 +29,232 @@ namespace SecurityWindowsDesktop.SpecialControls /// private void InitializeComponent() { - this.groupBoxSaveBackup = new System.Windows.Forms.GroupBox(); - this.buttonCreateBackup = new System.Windows.Forms.Button(); - this.checkBoxCreateArchive = new System.Windows.Forms.CheckBox(); - this.checkBoxFullLoad = new System.Windows.Forms.CheckBox(); - this.buttonSaveSelectFolder = new System.Windows.Forms.Button(); - this.textBoxSaveFolderName = new System.Windows.Forms.TextBox(); - this.labelSaveFolderName = new System.Windows.Forms.Label(); - this.toolStripHeader = new System.Windows.Forms.ToolStrip(); - this.toolStripButtonClose = new System.Windows.Forms.ToolStripButton(); - this.groupBoxLoadBackup = new System.Windows.Forms.GroupBox(); - this.buttonRestoreBackup = new System.Windows.Forms.Button(); - this.buttonLoadArchiveSelect = new System.Windows.Forms.Button(); - this.textBoxLoadArchiveName = new System.Windows.Forms.TextBox(); - this.labelLoadArchiveName = new System.Windows.Forms.Label(); - this.buttonLoadSelectFolder = new System.Windows.Forms.Button(); - this.textBoxLoadFolderName = new System.Windows.Forms.TextBox(); - this.labelLoadFolderName = new System.Windows.Forms.Label(); - this.groupBoxSaveBackup.SuspendLayout(); - this.toolStripHeader.SuspendLayout(); - this.groupBoxLoadBackup.SuspendLayout(); - this.SuspendLayout(); - // - // groupBoxSaveBackup - // - this.groupBoxSaveBackup.Controls.Add(this.buttonCreateBackup); - this.groupBoxSaveBackup.Controls.Add(this.checkBoxCreateArchive); - this.groupBoxSaveBackup.Controls.Add(this.checkBoxFullLoad); - this.groupBoxSaveBackup.Controls.Add(this.buttonSaveSelectFolder); - this.groupBoxSaveBackup.Controls.Add(this.textBoxSaveFolderName); - this.groupBoxSaveBackup.Controls.Add(this.labelSaveFolderName); - this.groupBoxSaveBackup.Location = new System.Drawing.Point(0, 28); - this.groupBoxSaveBackup.Name = "groupBoxSaveBackup"; - this.groupBoxSaveBackup.Size = new System.Drawing.Size(496, 100); - this.groupBoxSaveBackup.TabIndex = 0; - this.groupBoxSaveBackup.TabStop = false; - this.groupBoxSaveBackup.Text = "Сохранение в бекап"; - // - // buttonCreateBackup - // - this.buttonCreateBackup.Location = new System.Drawing.Point(385, 71); - this.buttonCreateBackup.Name = "buttonCreateBackup"; - this.buttonCreateBackup.Size = new System.Drawing.Size(99, 23); - this.buttonCreateBackup.TabIndex = 5; - this.buttonCreateBackup.Text = "Выгрузить"; - this.buttonCreateBackup.UseVisualStyleBackColor = true; - this.buttonCreateBackup.Click += new System.EventHandler(this.ButtonCreateBackup_Click); - // - // checkBoxCreateArchive - // - this.checkBoxCreateArchive.AutoSize = true; - this.checkBoxCreateArchive.Location = new System.Drawing.Point(262, 55); - this.checkBoxCreateArchive.Name = "checkBoxCreateArchive"; - this.checkBoxCreateArchive.Size = new System.Drawing.Size(104, 19); - this.checkBoxCreateArchive.TabIndex = 4; - this.checkBoxCreateArchive.Text = "Создать архив"; - this.checkBoxCreateArchive.UseVisualStyleBackColor = true; - // - // checkBoxFullLoad - // - this.checkBoxFullLoad.AutoSize = true; - this.checkBoxFullLoad.Location = new System.Drawing.Point(120, 55); - this.checkBoxFullLoad.Name = "checkBoxFullLoad"; - this.checkBoxFullLoad.Size = new System.Drawing.Size(121, 19); - this.checkBoxFullLoad.TabIndex = 3; - this.checkBoxFullLoad.Text = "Полная выгрузка"; - this.checkBoxFullLoad.UseVisualStyleBackColor = true; - // - // buttonSaveSelectFolder - // - this.buttonSaveSelectFolder.Location = new System.Drawing.Point(385, 26); - this.buttonSaveSelectFolder.Name = "buttonSaveSelectFolder"; - this.buttonSaveSelectFolder.Size = new System.Drawing.Size(99, 23); - this.buttonSaveSelectFolder.TabIndex = 2; - this.buttonSaveSelectFolder.Text = "Выбрать папку"; - this.buttonSaveSelectFolder.UseVisualStyleBackColor = true; - this.buttonSaveSelectFolder.Click += new System.EventHandler(this.ButtonSaveSelectFolder_Click); - // - // textBoxSaveFolderName - // - this.textBoxSaveFolderName.Location = new System.Drawing.Point(110, 26); - this.textBoxSaveFolderName.Name = "textBoxSaveFolderName"; - this.textBoxSaveFolderName.Size = new System.Drawing.Size(269, 23); - this.textBoxSaveFolderName.TabIndex = 1; - // - // labelSaveFolderName - // - this.labelSaveFolderName.AutoSize = true; - this.labelSaveFolderName.Location = new System.Drawing.Point(16, 29); - this.labelSaveFolderName.Name = "labelSaveFolderName"; - this.labelSaveFolderName.Size = new System.Drawing.Size(85, 15); - this.labelSaveFolderName.TabIndex = 0; - this.labelSaveFolderName.Text = "Путь до папки"; - // - // toolStripHeader - // - this.toolStripHeader.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.groupBoxSaveBackup = new System.Windows.Forms.GroupBox(); + this.buttonCreateBackup = new System.Windows.Forms.Button(); + this.checkBoxCreateArchive = new System.Windows.Forms.CheckBox(); + this.checkBoxFullLoad = new System.Windows.Forms.CheckBox(); + this.buttonSaveSelectFolder = new System.Windows.Forms.Button(); + this.textBoxSaveFolderName = new System.Windows.Forms.TextBox(); + this.labelSaveFolderName = new System.Windows.Forms.Label(); + this.toolStripHeader = new System.Windows.Forms.ToolStrip(); + this.toolStripButtonClose = new System.Windows.Forms.ToolStripButton(); + this.groupBoxLoadBackup = new System.Windows.Forms.GroupBox(); + this.buttonRestoreBackup = new System.Windows.Forms.Button(); + this.buttonLoadArchiveSelect = new System.Windows.Forms.Button(); + this.textBoxLoadArchiveName = new System.Windows.Forms.TextBox(); + this.labelLoadArchiveName = new System.Windows.Forms.Label(); + this.buttonLoadSelectFolder = new System.Windows.Forms.Button(); + this.textBoxLoadFolderName = new System.Windows.Forms.TextBox(); + this.labelLoadFolderName = new System.Windows.Forms.Label(); + this.groupBoxSaveBackup.SuspendLayout(); + this.toolStripHeader.SuspendLayout(); + this.groupBoxLoadBackup.SuspendLayout(); + this.SuspendLayout(); + // + // groupBoxSaveBackup + // + this.groupBoxSaveBackup.Controls.Add(this.buttonCreateBackup); + this.groupBoxSaveBackup.Controls.Add(this.checkBoxCreateArchive); + this.groupBoxSaveBackup.Controls.Add(this.checkBoxFullLoad); + this.groupBoxSaveBackup.Controls.Add(this.buttonSaveSelectFolder); + this.groupBoxSaveBackup.Controls.Add(this.textBoxSaveFolderName); + this.groupBoxSaveBackup.Controls.Add(this.labelSaveFolderName); + this.groupBoxSaveBackup.Location = new System.Drawing.Point(0, 37); + this.groupBoxSaveBackup.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.groupBoxSaveBackup.Name = "groupBoxSaveBackup"; + this.groupBoxSaveBackup.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.groupBoxSaveBackup.Size = new System.Drawing.Size(567, 133); + this.groupBoxSaveBackup.TabIndex = 0; + this.groupBoxSaveBackup.TabStop = false; + this.groupBoxSaveBackup.Text = "Сохранение в бекап"; + // + // buttonCreateBackup + // + this.buttonCreateBackup.Location = new System.Drawing.Point(440, 95); + this.buttonCreateBackup.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonCreateBackup.Name = "buttonCreateBackup"; + this.buttonCreateBackup.Size = new System.Drawing.Size(113, 31); + this.buttonCreateBackup.TabIndex = 5; + this.buttonCreateBackup.Text = "Выгрузить"; + this.buttonCreateBackup.UseVisualStyleBackColor = true; + this.buttonCreateBackup.Click += new System.EventHandler(this.ButtonCreateBackup_Click); + // + // checkBoxCreateArchive + // + this.checkBoxCreateArchive.AutoSize = true; + this.checkBoxCreateArchive.Location = new System.Drawing.Point(299, 73); + this.checkBoxCreateArchive.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.checkBoxCreateArchive.Name = "checkBoxCreateArchive"; + this.checkBoxCreateArchive.Size = new System.Drawing.Size(131, 24); + this.checkBoxCreateArchive.TabIndex = 4; + this.checkBoxCreateArchive.Text = "Создать архив"; + this.checkBoxCreateArchive.UseVisualStyleBackColor = true; + // + // checkBoxFullLoad + // + this.checkBoxFullLoad.AutoSize = true; + this.checkBoxFullLoad.Location = new System.Drawing.Point(137, 73); + this.checkBoxFullLoad.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.checkBoxFullLoad.Name = "checkBoxFullLoad"; + this.checkBoxFullLoad.Size = new System.Drawing.Size(151, 24); + this.checkBoxFullLoad.TabIndex = 3; + this.checkBoxFullLoad.Text = "Полная выгрузка"; + this.checkBoxFullLoad.UseVisualStyleBackColor = true; + // + // buttonSaveSelectFolder + // + this.buttonSaveSelectFolder.Location = new System.Drawing.Point(440, 35); + this.buttonSaveSelectFolder.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonSaveSelectFolder.Name = "buttonSaveSelectFolder"; + this.buttonSaveSelectFolder.Size = new System.Drawing.Size(113, 31); + this.buttonSaveSelectFolder.TabIndex = 2; + this.buttonSaveSelectFolder.Text = "Выбрать папку"; + this.buttonSaveSelectFolder.UseVisualStyleBackColor = true; + this.buttonSaveSelectFolder.Click += new System.EventHandler(this.ButtonSaveSelectFolder_Click); + // + // textBoxSaveFolderName + // + this.textBoxSaveFolderName.Location = new System.Drawing.Point(126, 35); + this.textBoxSaveFolderName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.textBoxSaveFolderName.Name = "textBoxSaveFolderName"; + this.textBoxSaveFolderName.Size = new System.Drawing.Size(307, 27); + this.textBoxSaveFolderName.TabIndex = 1; + this.textBoxSaveFolderName.TextChanged += new System.EventHandler(this.textBoxSaveFolderName_TextChanged); + // + // labelSaveFolderName + // + this.labelSaveFolderName.AutoSize = true; + this.labelSaveFolderName.Location = new System.Drawing.Point(18, 39); + this.labelSaveFolderName.Name = "labelSaveFolderName"; + this.labelSaveFolderName.Size = new System.Drawing.Size(108, 20); + this.labelSaveFolderName.TabIndex = 0; + this.labelSaveFolderName.Text = "Путь до папки"; + this.labelSaveFolderName.Click += new System.EventHandler(this.labelSaveFolderName_Click); + // + // toolStripHeader + // + this.toolStripHeader.ImageScalingSize = new System.Drawing.Size(20, 20); + this.toolStripHeader.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripButtonClose}); - this.toolStripHeader.Location = new System.Drawing.Point(0, 0); - this.toolStripHeader.Name = "toolStripHeader"; - this.toolStripHeader.Size = new System.Drawing.Size(708, 25); - this.toolStripHeader.TabIndex = 1; - this.toolStripHeader.Text = "toolStrip1"; - // - // toolStripButtonClose - // - this.toolStripButtonClose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; - this.toolStripButtonClose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.toolStripButtonClose.Image = global::SecurityWindowsDesktop.Properties.Resources.Close; - this.toolStripButtonClose.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButtonClose.Name = "toolStripButtonClose"; - this.toolStripButtonClose.Size = new System.Drawing.Size(23, 22); - this.toolStripButtonClose.Text = "Закрыть"; - // - // groupBoxLoadBackup - // - this.groupBoxLoadBackup.Controls.Add(this.buttonRestoreBackup); - this.groupBoxLoadBackup.Controls.Add(this.buttonLoadArchiveSelect); - this.groupBoxLoadBackup.Controls.Add(this.textBoxLoadArchiveName); - this.groupBoxLoadBackup.Controls.Add(this.labelLoadArchiveName); - this.groupBoxLoadBackup.Controls.Add(this.buttonLoadSelectFolder); - this.groupBoxLoadBackup.Controls.Add(this.textBoxLoadFolderName); - this.groupBoxLoadBackup.Controls.Add(this.labelLoadFolderName); - this.groupBoxLoadBackup.Location = new System.Drawing.Point(0, 134); - this.groupBoxLoadBackup.Name = "groupBoxLoadBackup"; - this.groupBoxLoadBackup.Size = new System.Drawing.Size(496, 137); - this.groupBoxLoadBackup.TabIndex = 2; - this.groupBoxLoadBackup.TabStop = false; - this.groupBoxLoadBackup.Text = "Загрузка из бекапа"; - // - // buttonRestoreBackup - // - this.buttonRestoreBackup.Location = new System.Drawing.Point(383, 99); - this.buttonRestoreBackup.Name = "buttonRestoreBackup"; - this.buttonRestoreBackup.Size = new System.Drawing.Size(99, 23); - this.buttonRestoreBackup.TabIndex = 9; - this.buttonRestoreBackup.Text = "Загрузить"; - this.buttonRestoreBackup.UseVisualStyleBackColor = true; - this.buttonRestoreBackup.Click += new System.EventHandler(this.ButtonRestoreBackup_Click); - // - // buttonLoadArchiveSelect - // - this.buttonLoadArchiveSelect.Location = new System.Drawing.Point(383, 64); - this.buttonLoadArchiveSelect.Name = "buttonLoadArchiveSelect"; - this.buttonLoadArchiveSelect.Size = new System.Drawing.Size(99, 23); - this.buttonLoadArchiveSelect.TabIndex = 8; - this.buttonLoadArchiveSelect.Text = "Выбрать файл"; - this.buttonLoadArchiveSelect.UseVisualStyleBackColor = true; - this.buttonLoadArchiveSelect.Click += new System.EventHandler(this.ButtonLoadArchiveSelect_Click); - // - // textBoxLoadArchiveName - // - this.textBoxLoadArchiveName.Location = new System.Drawing.Point(110, 64); - this.textBoxLoadArchiveName.Name = "textBoxLoadArchiveName"; - this.textBoxLoadArchiveName.Size = new System.Drawing.Size(267, 23); - this.textBoxLoadArchiveName.TabIndex = 7; - // - // labelLoadArchiveName - // - this.labelLoadArchiveName.AutoSize = true; - this.labelLoadArchiveName.Location = new System.Drawing.Point(14, 67); - this.labelLoadArchiveName.Name = "labelLoadArchiveName"; - this.labelLoadArchiveName.Size = new System.Drawing.Size(90, 15); - this.labelLoadArchiveName.TabIndex = 6; - this.labelLoadArchiveName.Text = "Путь до архива"; - // - // buttonLoadSelectFolder - // - this.buttonLoadSelectFolder.Location = new System.Drawing.Point(385, 28); - this.buttonLoadSelectFolder.Name = "buttonLoadSelectFolder"; - this.buttonLoadSelectFolder.Size = new System.Drawing.Size(99, 23); - this.buttonLoadSelectFolder.TabIndex = 5; - this.buttonLoadSelectFolder.Text = "Выбрать папку"; - this.buttonLoadSelectFolder.UseVisualStyleBackColor = true; - this.buttonLoadSelectFolder.Click += new System.EventHandler(this.ButtonLoadSelectFolder_Click); - // - // textBoxLoadFolderName - // - this.textBoxLoadFolderName.Location = new System.Drawing.Point(110, 28); - this.textBoxLoadFolderName.Name = "textBoxLoadFolderName"; - this.textBoxLoadFolderName.Size = new System.Drawing.Size(269, 23); - this.textBoxLoadFolderName.TabIndex = 4; - // - // labelLoadFolderName - // - this.labelLoadFolderName.AutoSize = true; - this.labelLoadFolderName.Location = new System.Drawing.Point(16, 31); - this.labelLoadFolderName.Name = "labelLoadFolderName"; - this.labelLoadFolderName.Size = new System.Drawing.Size(85, 15); - this.labelLoadFolderName.TabIndex = 3; - this.labelLoadFolderName.Text = "Путь до папки"; - // - // BackupControl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.groupBoxLoadBackup); - this.Controls.Add(this.toolStripHeader); - this.Controls.Add(this.groupBoxSaveBackup); - this.Name = "BackupControl"; - this.Size = new System.Drawing.Size(708, 486); - this.groupBoxSaveBackup.ResumeLayout(false); - this.groupBoxSaveBackup.PerformLayout(); - this.toolStripHeader.ResumeLayout(false); - this.toolStripHeader.PerformLayout(); - this.groupBoxLoadBackup.ResumeLayout(false); - this.groupBoxLoadBackup.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.toolStripHeader.Location = new System.Drawing.Point(0, 0); + this.toolStripHeader.Name = "toolStripHeader"; + this.toolStripHeader.Size = new System.Drawing.Size(809, 27); + this.toolStripHeader.TabIndex = 1; + this.toolStripHeader.Text = "toolStrip1"; + // + // toolStripButtonClose + // + this.toolStripButtonClose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.toolStripButtonClose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButtonClose.Image = global::SecurityWindowsDesktop.Properties.Resources.Close; + this.toolStripButtonClose.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonClose.Name = "toolStripButtonClose"; + this.toolStripButtonClose.Size = new System.Drawing.Size(29, 24); + this.toolStripButtonClose.Text = "Закрыть"; + // + // groupBoxLoadBackup + // + this.groupBoxLoadBackup.Controls.Add(this.buttonRestoreBackup); + this.groupBoxLoadBackup.Controls.Add(this.buttonLoadArchiveSelect); + this.groupBoxLoadBackup.Controls.Add(this.textBoxLoadArchiveName); + this.groupBoxLoadBackup.Controls.Add(this.labelLoadArchiveName); + this.groupBoxLoadBackup.Controls.Add(this.buttonLoadSelectFolder); + this.groupBoxLoadBackup.Controls.Add(this.textBoxLoadFolderName); + this.groupBoxLoadBackup.Controls.Add(this.labelLoadFolderName); + this.groupBoxLoadBackup.Location = new System.Drawing.Point(0, 179); + this.groupBoxLoadBackup.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.groupBoxLoadBackup.Name = "groupBoxLoadBackup"; + this.groupBoxLoadBackup.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.groupBoxLoadBackup.Size = new System.Drawing.Size(567, 183); + this.groupBoxLoadBackup.TabIndex = 2; + this.groupBoxLoadBackup.TabStop = false; + this.groupBoxLoadBackup.Text = "Загрузка из бекапа"; + // + // buttonRestoreBackup + // + this.buttonRestoreBackup.Location = new System.Drawing.Point(438, 132); + this.buttonRestoreBackup.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonRestoreBackup.Name = "buttonRestoreBackup"; + this.buttonRestoreBackup.Size = new System.Drawing.Size(113, 31); + this.buttonRestoreBackup.TabIndex = 9; + this.buttonRestoreBackup.Text = "Загрузить"; + this.buttonRestoreBackup.UseVisualStyleBackColor = true; + this.buttonRestoreBackup.Click += new System.EventHandler(this.ButtonRestoreBackup_Click); + // + // buttonLoadArchiveSelect + // + this.buttonLoadArchiveSelect.Location = new System.Drawing.Point(438, 85); + this.buttonLoadArchiveSelect.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonLoadArchiveSelect.Name = "buttonLoadArchiveSelect"; + this.buttonLoadArchiveSelect.Size = new System.Drawing.Size(113, 31); + this.buttonLoadArchiveSelect.TabIndex = 8; + this.buttonLoadArchiveSelect.Text = "Выбрать файл"; + this.buttonLoadArchiveSelect.UseVisualStyleBackColor = true; + this.buttonLoadArchiveSelect.Click += new System.EventHandler(this.ButtonLoadArchiveSelect_Click); + // + // textBoxLoadArchiveName + // + this.textBoxLoadArchiveName.Location = new System.Drawing.Point(126, 85); + this.textBoxLoadArchiveName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.textBoxLoadArchiveName.Name = "textBoxLoadArchiveName"; + this.textBoxLoadArchiveName.Size = new System.Drawing.Size(305, 27); + this.textBoxLoadArchiveName.TabIndex = 7; + // + // labelLoadArchiveName + // + this.labelLoadArchiveName.AutoSize = true; + this.labelLoadArchiveName.Location = new System.Drawing.Point(16, 89); + this.labelLoadArchiveName.Name = "labelLoadArchiveName"; + this.labelLoadArchiveName.Size = new System.Drawing.Size(115, 20); + this.labelLoadArchiveName.TabIndex = 6; + this.labelLoadArchiveName.Text = "Путь до архива"; + // + // buttonLoadSelectFolder + // + this.buttonLoadSelectFolder.Location = new System.Drawing.Point(440, 37); + this.buttonLoadSelectFolder.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonLoadSelectFolder.Name = "buttonLoadSelectFolder"; + this.buttonLoadSelectFolder.Size = new System.Drawing.Size(113, 31); + this.buttonLoadSelectFolder.TabIndex = 5; + this.buttonLoadSelectFolder.Text = "Выбрать папку"; + this.buttonLoadSelectFolder.UseVisualStyleBackColor = true; + this.buttonLoadSelectFolder.Click += new System.EventHandler(this.ButtonLoadSelectFolder_Click); + // + // textBoxLoadFolderName + // + this.textBoxLoadFolderName.Location = new System.Drawing.Point(126, 37); + this.textBoxLoadFolderName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.textBoxLoadFolderName.Name = "textBoxLoadFolderName"; + this.textBoxLoadFolderName.Size = new System.Drawing.Size(307, 27); + this.textBoxLoadFolderName.TabIndex = 4; + // + // labelLoadFolderName + // + this.labelLoadFolderName.AutoSize = true; + this.labelLoadFolderName.Location = new System.Drawing.Point(18, 41); + this.labelLoadFolderName.Name = "labelLoadFolderName"; + this.labelLoadFolderName.Size = new System.Drawing.Size(108, 20); + this.labelLoadFolderName.TabIndex = 3; + this.labelLoadFolderName.Text = "Путь до папки"; + // + // BackupControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBoxLoadBackup); + this.Controls.Add(this.toolStripHeader); + this.Controls.Add(this.groupBoxSaveBackup); + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.Name = "BackupControl"; + this.Size = new System.Drawing.Size(809, 648); + this.groupBoxSaveBackup.ResumeLayout(false); + this.groupBoxSaveBackup.PerformLayout(); + this.toolStripHeader.ResumeLayout(false); + this.toolStripHeader.PerformLayout(); + this.groupBoxLoadBackup.ResumeLayout(false); + this.groupBoxLoadBackup.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.cs b/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.cs index 60395bd..85dc1c1 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.cs +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.cs @@ -166,5 +166,15 @@ namespace SecurityWindowsDesktop.SpecialControls } Cursor.Current = cursor; } - } + + private void textBoxSaveFolderName_TextChanged(object sender, EventArgs e) + { + + } + + private void labelSaveFolderName_Click(object sender, EventArgs e) + { + + } + } } \ No newline at end of file diff --git a/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.resx b/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.resx index f298a7b..5369054 100644 --- a/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.resx +++ b/DepartmentPortal/Security/SecurityWindowsDesktop/SpecialControls/BackupControl.resx @@ -57,4 +57,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file