diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ReportLessonTaskViewModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ReportLessonTaskViewModel.cs index bd8e407..0746219 100644 --- a/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ReportLessonTaskViewModel.cs +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ReportLessonTaskViewModel.cs @@ -10,6 +10,8 @@ namespace SchoolAgainStudyContracts.ViewModel { public int Id { get; set; } public string TitleLesson { get; set; } = string.Empty; + public DateTime DateEventLesson { get; set; } public string TitleTask { get; set; } = string.Empty; + public DateTime DateIssueTask { get; set; } } } diff --git a/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Implements/DiyStorage.cs b/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Implements/DiyStorage.cs index 4514054..13b10ac 100644 --- a/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Implements/DiyStorage.cs +++ b/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Implements/DiyStorage.cs @@ -20,6 +20,7 @@ namespace SchoolAgainStudyDataBaseImplements.Implements return context.Diys .Include(x => x.Interests) .ThenInclude(x => x.Interest) + .Include(x => x.Task) .ToList() .Select(x => x.GetViewModel) .ToList(); @@ -38,6 +39,7 @@ namespace SchoolAgainStudyDataBaseImplements.Implements return context.Diys .Include(x => x.Interests) .ThenInclude(x => x.Interest) + .Include(x => x.Task) .Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo && x.StudentId == model.StudentId) .ToList() .Select(x => x.GetViewModel) @@ -47,6 +49,7 @@ namespace SchoolAgainStudyDataBaseImplements.Implements return context.Diys .Include(x => x.Interests) .ThenInclude(x => x.Interest) + .Include(x => x.Task) .Where(x => x.StudentId == model.StudentId ) .ToList() .Select(x => x.GetViewModel) @@ -65,6 +68,7 @@ namespace SchoolAgainStudyDataBaseImplements.Implements return context.Diys .Include(x => x.Interests) .ThenInclude(x => x.Interest) + .Include(x => x.Task) .FirstOrDefault(x => (!string.IsNullOrEmpty(model.Title) && x.Title == model.Title) || (model.Id.HasValue && x.Id == model.Id)) ?.GetViewModel; diff --git a/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Implements/LessonStorage.cs b/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Implements/LessonStorage.cs index ff3d6fd..0a9d00f 100644 --- a/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Implements/LessonStorage.cs +++ b/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Implements/LessonStorage.cs @@ -20,6 +20,7 @@ namespace SchoolAgainStudyDataBaseImplements.Implements return context.Lessons .Include(x => x.Materials) .ThenInclude(x => x.Material) + .Include(x => x.Product) .ToList() .Select(x => x.GetViewModel) .ToList(); @@ -37,6 +38,7 @@ namespace SchoolAgainStudyDataBaseImplements.Implements return context.Lessons .Include(x => x.Materials) .ThenInclude(x => x.Material) + .Include(x => x.Product) .Where(x => x.DateEvent >= model.DateFrom && x.DateEvent <= model.DateTo && x.TeacherId == model.TeacherId) .ToList() .Select(x => x.GetViewModel) @@ -45,6 +47,7 @@ namespace SchoolAgainStudyDataBaseImplements.Implements return context.Lessons .Include(x => x.Materials) .ThenInclude(x => x.Material) + .Include(x => x.Product) .Where(x => x.TeacherId == model.TeacherId) .ToList() .Select(x => x.GetViewModel) @@ -61,6 +64,7 @@ namespace SchoolAgainStudyDataBaseImplements.Implements return context.Lessons .Include(x => x.Materials) .ThenInclude(x => x.Material) + .Include(x => x.Product) .FirstOrDefault(x => (!string.IsNullOrEmpty(model.Title) && x.Title == model.Title) || (model.Id.HasValue && x.Id == model.Id)) ?.GetViewModel; diff --git a/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Migrations/20230405182217_Initial.Designer.cs b/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Migrations/20230406155014_Initial.Designer.cs similarity index 99% rename from SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Migrations/20230405182217_Initial.Designer.cs rename to SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Migrations/20230406155014_Initial.Designer.cs index 15bb3c8..4a26d82 100644 --- a/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Migrations/20230405182217_Initial.Designer.cs +++ b/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Migrations/20230406155014_Initial.Designer.cs @@ -12,7 +12,7 @@ using SchoolAgainStudyDataBaseImplements; namespace SchoolAgainStudyDataBaseImplements.Migrations { [DbContext(typeof(SchoolDataBase))] - [Migration("20230405182217_Initial")] + [Migration("20230406155014_Initial")] partial class Initial { /// diff --git a/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Migrations/20230405182217_Initial.cs b/SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Migrations/20230406155014_Initial.cs similarity index 100% rename from SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Migrations/20230405182217_Initial.cs rename to SchoolAgainStudy/SchoolAgainStudyDataBaseImplements/Migrations/20230406155014_Initial.cs diff --git a/SchoolAgainStudy/SchoolAgainStudyDataModels/Models/IDiy.cs b/SchoolAgainStudy/SchoolAgainStudyDataModels/Models/IDiy.cs index 2f935fb..d145a48 100644 --- a/SchoolAgainStudy/SchoolAgainStudyDataModels/Models/IDiy.cs +++ b/SchoolAgainStudy/SchoolAgainStudyDataModels/Models/IDiy.cs @@ -10,7 +10,7 @@ namespace SchoolAgainStudyDataModels.Models { string Title { get; } string Description { get; } - string? TaskName { get; } + string TaskName { get; } DateTime DateCreate { get; } int TaskId { get; } int StudentId { get; }