diff --git a/Polyclinic/PolyclinicBusinessLogic/BusinessLogics/SuretorReportLogic.cs b/Polyclinic/PolyclinicBusinessLogic/BusinessLogics/SuretorReportLogic.cs index a7d132b..021f8b3 100644 --- a/Polyclinic/PolyclinicBusinessLogic/BusinessLogics/SuretorReportLogic.cs +++ b/Polyclinic/PolyclinicBusinessLogic/BusinessLogics/SuretorReportLogic.cs @@ -105,7 +105,7 @@ namespace PolyclinicBusinessLogic.BusinessLogics saveToWord.CreateDoc(new WordCoursesByProceduresInfo { FileName = model.FileName, - Title = "Курсы по процедурам", + Title = "Курсы по процедуре", Courses = GetProcedureCourses(procedureSearchMode) }); } diff --git a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractSaveToWordCoursesByProcedures.cs b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractSaveToWordCoursesByProcedures.cs index ae6a525..62e610a 100644 --- a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractSaveToWordCoursesByProcedures.cs +++ b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractSaveToWordCoursesByProcedures.cs @@ -12,11 +12,11 @@ namespace PolyclinicBusinessLogic.OfficePackage { Texts = new List<(string, WordTextProperties)> { - (info.Title, new WordTextProperties { Bold = true, Size = "24", }) + (info.Title, new WordTextProperties { Bold = true, Size = "32", }) }, TextProperties = new WordTextProperties { - Size = "24", + Size = "32", JustificationType = WordJustificationType.Center } }); @@ -26,13 +26,13 @@ namespace PolyclinicBusinessLogic.OfficePackage { Texts = new List<(string, WordTextProperties)> { - ("Количество пилюль в день: " + course.PillsPerDay.ToString() + " единиц", new WordTextProperties{ Size = "16"}), - ("Количество дней приёма: " + course.DaysCount.ToString() + " дней", new WordTextProperties{ Size = "16"}), + ("Количество пилюль в день: " + course.PillsPerDay.ToString() + " единиц", new WordTextProperties{ Size = "24"}), + ("Количество дней приёма: " + course.DaysCount.ToString() + " дней", new WordTextProperties{ Size = "24"}), }, TextProperties = new WordTextProperties { - Size = "16", + Size = "24", JustificationType = WordJustificationType.Both } }); diff --git a/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs b/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs index f7c7b88..c700dcb 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs +++ b/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs @@ -80,12 +80,14 @@ namespace PolyclinicWebAppSuretor.Controllers { ProceduresCount = model.RecipeViewModel.ProceduresCount, Comment = model.RecipeViewModel.Comment, + CourseId = model.RecipeViewModel.CourseId, RecipeProcedures = selectedProcedures .ToDictionary( x => x, - x => allProcedures.Where(y => y.Id == x) as IProcedureModel + x => allProcedures.First(y => y.Id == x) as IProcedureModel ) }; + _recipeLogic.Create(recipe); return RedirectToAction("Recipes"); } @@ -114,10 +116,11 @@ namespace PolyclinicWebAppSuretor.Controllers Id = id, ProceduresCount = model.RecipeViewModel.ProceduresCount, Comment = model.RecipeViewModel.Comment, + CourseId = model.RecipeViewModel.CourseId, RecipeProcedures = selectedProcedures .ToDictionary( x => x, - x => allProcedures.Where(y => y.Id == x) as IProcedureModel + x => allProcedures.First(y => y.Id == x) as IProcedureModel ) }; _recipeLogic.Update(recipe); diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml index 6df9e70..a514401 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml +++ b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml @@ -29,11 +29,11 @@