поправила курсы на их удаление, пытаюсь найти ошибку (при создании рецепта добавляется пустой курс + в созданном рецепте номер курса не равен выбранному, а просто нумеруется по порядку)
This commit is contained in:
parent
0b7869e140
commit
84a5ee78c7
@ -105,7 +105,7 @@ namespace PolyclinicBusinessLogic.BusinessLogics
|
||||
saveToWord.CreateDoc(new WordCoursesByProceduresInfo
|
||||
{
|
||||
FileName = model.FileName,
|
||||
Title = "Курсы по процедурам",
|
||||
Title = "Курсы по процедуре",
|
||||
Courses = GetProcedureCourses(procedureSearchMode)
|
||||
});
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
});
|
||||
|
@ -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);
|
||||
|
@ -29,11 +29,11 @@
|
||||
<h3 class="col-3">
|
||||
Курс (номер):
|
||||
</h3>
|
||||
<select id="courseId" style="width: 45vh" asp-for="RecipeViewModel.CourseId">
|
||||
<option value="">Выберите номер курса</option>
|
||||
<select style="width: 45vh" id="courseId" name="courseId" asp-for="RecipeViewModel.CourseId">
|
||||
<option>Выберите номер курса</option>
|
||||
@foreach (var course in ViewBag.Courses)
|
||||
{
|
||||
<option value="@course.Id">@course.PillsPerDay</option>
|
||||
<option value="@course.Id">@course.Id</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
@ -65,7 +65,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex flex-column mb-5 mt-5">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4">
|
||||
|
@ -47,7 +47,7 @@
|
||||
<tr>
|
||||
<td>@item.Id</td>
|
||||
<td>@item.Comment</td>
|
||||
<td>@item.ProceduresCount</td
|
||||
<td>@item.ProceduresCount</td>
|
||||
<td>@item.CourseId</td>
|
||||
<td>
|
||||
<a asp-action="EditRecipe" asp-route-id="@item.Id">
|
||||
@ -69,7 +69,6 @@
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
}
|
||||
|
||||
</tbody>
|
||||
|
Binary file not shown.
BIN
Polyclinic/PolyclinicWebAppSuretor/про животик.docx
Normal file
BIN
Polyclinic/PolyclinicWebAppSuretor/про животик.docx
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user