diff --git a/University/UniversityBusinessLogic/BusinessLogics/ReportLogic.cs b/University/UniversityBusinessLogic/BusinessLogics/ReportLogic.cs index aca66b1..f5ed4a2 100644 --- a/University/UniversityBusinessLogic/BusinessLogics/ReportLogic.cs +++ b/University/UniversityBusinessLogic/BusinessLogics/ReportLogic.cs @@ -70,7 +70,7 @@ public class ReportLogic : IReportLogic }); // Получаем список студентов, связанных с дисциплинами - var students = new List<(string Student, string PhoneNumber)>(); + var students = new List(); foreach (var discipline in disciplines) { var studentDisciplines = _disciplineStorage.GetStudentsForDiscipline(new DisciplineSearchModel @@ -85,7 +85,7 @@ public class ReportLogic : IReportLogic Id = studentDiscipline.Id, }); foreach(var st in studentList){ - students.Add((st.Name, st.PhoneNumber)); + students.Add(st.Name + " " + st.PhoneNumber); } } } diff --git a/University/UniversityBusinessLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs b/University/UniversityBusinessLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs index db62735..5c708fb 100644 --- a/University/UniversityBusinessLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs +++ b/University/UniversityBusinessLogic/OfficePackage/AbstractSaveToWordStorekeeper.cs @@ -40,13 +40,12 @@ namespace UniversityBusinessLogic.OfficePackage }); foreach (var student in discipline.Students) { - if (!string.IsNullOrEmpty(student.Name) && !string.IsNullOrEmpty(student.PhoneNumber)) + if (!string.IsNullOrEmpty(student)) { CreateParagraph(new WordParagraph { Texts = new List<(string, WordTextProperties)> { - (student.Name + " - ", new WordTextProperties { Size = "24" }), - (student.PhoneNumber + " - ", new WordTextProperties { Size = "24" }) + (student, new WordTextProperties { Size = "24" }) }, TextProperties = new WordTextProperties { diff --git a/University/UniversityClientApp/Views/Home/Report.cshtml b/University/UniversityClientApp/Views/Home/Report.cshtml index d674df8..95aeb26 100644 --- a/University/UniversityClientApp/Views/Home/Report.cshtml +++ b/University/UniversityClientApp/Views/Home/Report.cshtml @@ -44,10 +44,9 @@ @item.TeacherName - @foreach (var (Name, PhoneNumber) in item.Students) + @foreach (var st in item.Students) { -
@Name
-
@PhoneNumber
+
@st
} diff --git a/University/UniversityContracts/ViewModels/ReportTeacherViewModel.cs b/University/UniversityContracts/ViewModels/ReportTeacherViewModel.cs index 04dc959..2af5eef 100644 --- a/University/UniversityContracts/ViewModels/ReportTeacherViewModel.cs +++ b/University/UniversityContracts/ViewModels/ReportTeacherViewModel.cs @@ -10,6 +10,6 @@ namespace UniversityContracts.ViewModels { public int TeacherId { get; set; } public string TeacherName { get; set; } = string.Empty; - public List<(string Name, string PhoneNumber)> Students { get; set; } = new(); + public List Students { get; set; } = new(); } } \ No newline at end of file diff --git a/University/UniversityDatabaseImplement/UniversityDatabase.cs b/University/UniversityDatabaseImplement/UniversityDatabase.cs index 2b73bad..07213d0 100644 --- a/University/UniversityDatabaseImplement/UniversityDatabase.cs +++ b/University/UniversityDatabaseImplement/UniversityDatabase.cs @@ -11,7 +11,7 @@ namespace UniversityDatabaseImplement if (optionsBuilder.IsConfigured == false) { //Возможно понадобится писать вместо (localdb) название пк, вот пк Егора: DESKTOP-N8BRIPR; other-name: LAPTOP-DYCTATOR; other-name: DyCTaTOR - optionsBuilder.UseSqlServer(@"Data Source=DyCTaTOR\SQLEXPRESS;Initial Catalog=UniversityDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-N8BRIPR\SQLEXPRESS;Initial Catalog=UniversityDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); }