diff --git a/University/UniversityContracts/BindingModels/DisciplineBindingModel.cs b/University/UniversityContracts/BindingModels/DisciplineBindingModel.cs index 806a25f..8865ef1 100644 --- a/University/UniversityContracts/BindingModels/DisciplineBindingModel.cs +++ b/University/UniversityContracts/BindingModels/DisciplineBindingModel.cs @@ -7,5 +7,6 @@ namespace UniversityContracts.BindingModels public int Id { get; set; } public string Name { get; set; } = String.Empty; public string Department { get; set; } = String.Empty; + public Dictionary DisciplineStatements { get; set; } = new(); } } diff --git a/University/UniversityContracts/BindingModels/ExaminationResultBindingModel.cs b/University/UniversityContracts/BindingModels/ExaminationResultBindingModel.cs index 8fbd495..372056d 100644 --- a/University/UniversityContracts/BindingModels/ExaminationResultBindingModel.cs +++ b/University/UniversityContracts/BindingModels/ExaminationResultBindingModel.cs @@ -9,5 +9,6 @@ namespace UniversityContracts.BindingModels public string ExaminationForm { get; set; } = String.Empty; public MarkType Mark { get; set; } = MarkType.Неизвестен; public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); + public Dictionary Students { get; set; } = new(); } } diff --git a/University/UniversityContracts/BindingModels/ReportBindingModel.cs b/University/UniversityContracts/BindingModels/ReportBindingModel.cs new file mode 100644 index 0000000..38b7fbe --- /dev/null +++ b/University/UniversityContracts/BindingModels/ReportBindingModel.cs @@ -0,0 +1,12 @@ +using UniversityContracts.ViewModels; + +namespace UniversityContracts.BindingModels +{ + public class ReportBindingModel + { + public string? FileName { get; set; } = string.Empty; + public DateTime? From { get; set; } + public DateTime? To { get; set; } + public List Students { get; set; } = new(); + } +} diff --git a/University/UniversityContracts/BindingModels/StudentBindingModel.cs b/University/UniversityContracts/BindingModels/StudentBindingModel.cs index 03cf631..884775e 100644 --- a/University/UniversityContracts/BindingModels/StudentBindingModel.cs +++ b/University/UniversityContracts/BindingModels/StudentBindingModel.cs @@ -7,5 +7,6 @@ namespace UniversityContracts.BindingModels public int Id { get; set; } public string Name { get; set; } = String.Empty; public string RecordCardNumber { get; set; } = String.Empty; + public Dictionary Statements { get; set; } = new(); } } diff --git a/University/UniversityContracts/BindingModels/UserBindingModel.cs b/University/UniversityContracts/BindingModels/UserBindingModel.cs new file mode 100644 index 0000000..9b144d7 --- /dev/null +++ b/University/UniversityContracts/BindingModels/UserBindingModel.cs @@ -0,0 +1,14 @@ +using UniversityDataModels.Models; +namespace UniversityContracts.BindingModels +{ + public class UserBindingModel : IUserModel + { + public int Id { get; set; } + public string Name { get; set; } = String.Empty; + public string Surname { get; set; } = String.Empty; + public string PhoneNumber { get; set; } = String.Empty; + public string Position { get; set; } = String.Empty; + public string Login { get; set; } = String.Empty; + public string Password { get; set; } = String.Empty; + } +} diff --git a/University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs b/University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs new file mode 100644 index 0000000..1a418ed --- /dev/null +++ b/University/UniversityContracts/BuisnessLogicContracts/IReportLogic.cs @@ -0,0 +1,15 @@ + +using UniversityContracts.BindingModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.BuisnessLogicContracts +{ + public interface IReportLogic + { + List GetStudentDiscipline(ReportBindingModel model); + List GetStudens(ReportBindingModel model); + void SaveStudentsToWord(); + void SaveStudentsToExcel(); + void SaveStudentsToPdf(); + } +} diff --git a/University/UniversityContracts/BuisnessLogicContracts/IUserLogic.cs b/University/UniversityContracts/BuisnessLogicContracts/IUserLogic.cs new file mode 100644 index 0000000..218c1df --- /dev/null +++ b/University/UniversityContracts/BuisnessLogicContracts/IUserLogic.cs @@ -0,0 +1,15 @@ +using UniversityContracts.BindingModels; +using UniversityContracts.SearchModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.BuisnessLogicContracts +{ + public interface IUserLogic + { + List? ReadList(UserSearchModel? model); + UserViewModel? ReadElement(UserSearchModel model); + bool Create(UserBindingModel model); + bool Update(UserBindingModel model); + bool Delete(UserBindingModel model); + } +} diff --git a/University/UniversityContracts/SearchModels/ExaminationResultSearchModel.cs b/University/UniversityContracts/SearchModels/ExaminationResultSearchModel.cs index 4f27f9f..53c1f00 100644 --- a/University/UniversityContracts/SearchModels/ExaminationResultSearchModel.cs +++ b/University/UniversityContracts/SearchModels/ExaminationResultSearchModel.cs @@ -6,5 +6,7 @@ namespace UniversityContracts.SearchModels public class ExaminationResultSearchModel { public int? Id { get; set; } + public DateTime? From { get; set; } + public DateTime? To { get; set; } } } diff --git a/University/UniversityContracts/SearchModels/StatementSearchModel.cs b/University/UniversityContracts/SearchModels/StatementSearchModel.cs index 7c3ca9d..6e807ad 100644 --- a/University/UniversityContracts/SearchModels/StatementSearchModel.cs +++ b/University/UniversityContracts/SearchModels/StatementSearchModel.cs @@ -5,5 +5,7 @@ namespace UniversityContracts.SearchModels public class StatementSearchModel { public int? Id { get; set; } + public DateTime? From { get; set; } + public DateTime? To { get; set; } } } diff --git a/University/UniversityContracts/SearchModels/UserSearchModel.cs b/University/UniversityContracts/SearchModels/UserSearchModel.cs new file mode 100644 index 0000000..83bd13e --- /dev/null +++ b/University/UniversityContracts/SearchModels/UserSearchModel.cs @@ -0,0 +1,9 @@ +namespace UniversityContracts.SearchModels +{ + public class UserSearchModel + { + public int? Id { get; set; } + public string? Login { get; set; } + public string? Password { get; set; } + } +} diff --git a/University/UniversityContracts/StoragesContracts/IUserStorage.cs b/University/UniversityContracts/StoragesContracts/IUserStorage.cs new file mode 100644 index 0000000..574c780 --- /dev/null +++ b/University/UniversityContracts/StoragesContracts/IUserStorage.cs @@ -0,0 +1,16 @@ +using UniversityContracts.BindingModels; +using UniversityContracts.SearchModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.StoragesContracts +{ + public interface IUserStorage + { + List GetFullList(); + List GetFilteredList(UserSearchModel model); + UserViewModel? GetElement(UserSearchModel model); + UserViewModel? Insert(UserBindingModel model); + UserViewModel? Update(UserBindingModel model); + UserViewModel? Delete(UserBindingModel model); + } +} diff --git a/University/UniversityContracts/ViewModels/DisciplineViewModel.cs b/University/UniversityContracts/ViewModels/DisciplineViewModel.cs index 472734a..aaa8cde 100644 --- a/University/UniversityContracts/ViewModels/DisciplineViewModel.cs +++ b/University/UniversityContracts/ViewModels/DisciplineViewModel.cs @@ -7,5 +7,6 @@ namespace UniversityContracts.ViewModels public int Id { get; set; } public string Name { get; set; } = String.Empty; public string Department { get; set; } = String.Empty; + public Dictionary DisciplineStatements { get; set; } = new(); } } diff --git a/University/UniversityContracts/ViewModels/ExaminationResultViewModel.cs b/University/UniversityContracts/ViewModels/ExaminationResultViewModel.cs index 379ac90..98817e6 100644 --- a/University/UniversityContracts/ViewModels/ExaminationResultViewModel.cs +++ b/University/UniversityContracts/ViewModels/ExaminationResultViewModel.cs @@ -9,5 +9,6 @@ namespace UniversityContracts.ViewModels public string ExaminationForm { get; set; } = String.Empty; public MarkType Mark { get; set; } = MarkType.Неизвестен; public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); + public Dictionary Students { get; set; } = new(); } } diff --git a/University/UniversityContracts/ViewModels/ReportStudentDisciplineViewModel.cs b/University/UniversityContracts/ViewModels/ReportStudentDisciplineViewModel.cs new file mode 100644 index 0000000..9ce5ab1 --- /dev/null +++ b/University/UniversityContracts/ViewModels/ReportStudentDisciplineViewModel.cs @@ -0,0 +1,8 @@ +namespace UniversityContracts.ViewModels +{ + public class ReportStudentDisciplineViewModel + { + public string StudentName { get; set; } = string.Empty; + public List Disciplines { get; set; } = new(); + } +} diff --git a/University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs b/University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs new file mode 100644 index 0000000..fa3ff50 --- /dev/null +++ b/University/UniversityContracts/ViewModels/ReportStudentsViewModel.cs @@ -0,0 +1,14 @@ +using UniversityDataModels.Enums; + +namespace UniversityContracts.ViewModels +{ + public class ReportStudentsViewModel + { + public string StudentName { get; set; } = string.Empty; + public string ExaminationForm { get; set; } = string.Empty; + public MarkType mark { get; set; } = MarkType.Неизвестен; + public DateTime ExaminationResultDate { get; set; } + public int HoursCount { get; set; } + public DateTime StatementDate { get; set; } + } +} diff --git a/University/UniversityContracts/ViewModels/StudentViewModel.cs b/University/UniversityContracts/ViewModels/StudentViewModel.cs index 2ff6158..4cfc34d 100644 --- a/University/UniversityContracts/ViewModels/StudentViewModel.cs +++ b/University/UniversityContracts/ViewModels/StudentViewModel.cs @@ -7,5 +7,6 @@ namespace UniversityContracts.ViewModels public int Id { get; set; } public string Name { get; set; } = String.Empty; public string RecordCardNumber { get; set; } = String.Empty; + public Dictionary Statements { get; set; } = new(); } } diff --git a/University/UniversityContracts/ViewModels/UserViewModel.cs b/University/UniversityContracts/ViewModels/UserViewModel.cs new file mode 100644 index 0000000..35afe78 --- /dev/null +++ b/University/UniversityContracts/ViewModels/UserViewModel.cs @@ -0,0 +1,14 @@ +using UniversityDataModels.Models; +namespace UniversityContracts.ViewModels +{ + public class UserViewModel : IUserModel + { + public int Id { get; set; } + public string Name { get; set; } = String.Empty; + public string Surname { get; set; } = String.Empty; + public string PhoneNumber { get; set; } = String.Empty; + public string Position { get; set; } = String.Empty; + public string Login { get; set; } = String.Empty; + public string Password { get; set; } = String.Empty; + } +} diff --git a/University/UniversityDataModels/Enums/MarkType.cs b/University/UniversityDataModels/Enums/MarkType.cs index 6ad9982..a4180f8 100644 --- a/University/UniversityDataModels/Enums/MarkType.cs +++ b/University/UniversityDataModels/Enums/MarkType.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace UniversityDataModels.Enums +namespace UniversityDataModels.Enums { public enum MarkType { diff --git a/University/UniversityDataModels/Models/IDisciplineModel.cs b/University/UniversityDataModels/Models/IDisciplineModel.cs index a40373f..efd1c9d 100644 --- a/University/UniversityDataModels/Models/IDisciplineModel.cs +++ b/University/UniversityDataModels/Models/IDisciplineModel.cs @@ -4,5 +4,6 @@ { String Name { get; } String Department { get; } + Dictionary DisciplineStatements { get; } } } diff --git a/University/UniversityDataModels/Models/IExaminationResultModel.cs b/University/UniversityDataModels/Models/IExaminationResultModel.cs index c3c33e1..6180c87 100644 --- a/University/UniversityDataModels/Models/IExaminationResultModel.cs +++ b/University/UniversityDataModels/Models/IExaminationResultModel.cs @@ -6,5 +6,6 @@ namespace UniversityDataModels.Models String ExaminationForm { get; } MarkType Mark { get; } DateTime Date { get; } + Dictionary Students { get; } } } diff --git a/University/UniversityDataModels/Models/IStudentModel.cs b/University/UniversityDataModels/Models/IStudentModel.cs index 2ee8691..d296aaa 100644 --- a/University/UniversityDataModels/Models/IStudentModel.cs +++ b/University/UniversityDataModels/Models/IStudentModel.cs @@ -4,5 +4,6 @@ { String Name { get; } String RecordCardNumber { get; } + Dictionary Statements { get; } } } diff --git a/University/UniversityDataModels/Models/IUserModel.cs b/University/UniversityDataModels/Models/IUserModel.cs new file mode 100644 index 0000000..a4a74d0 --- /dev/null +++ b/University/UniversityDataModels/Models/IUserModel.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace UniversityDataModels.Models +{ + public interface IUserModel : IId + { + string Name { get; } + string Surname { get; } + string PhoneNumber { get; } + string Position { get; } + string Login { get; } + string Password { get; } + } +}