Исправления: рецепт, документы
This commit is contained in:
parent
246d1cc97d
commit
6d28d04af6
@ -89,7 +89,7 @@ namespace HospitalBusinessLogic.OfficePackage
|
||||
{
|
||||
ColumnName = "E",
|
||||
RowIndex = rowIndex,
|
||||
Text = patient.Item4.ToString(),
|
||||
Text = patient.Item4.ToShortDateString(),
|
||||
StyleInfo = ExcelStyleInfoType.TextWithBroder
|
||||
});
|
||||
rowIndex++;
|
||||
|
@ -35,7 +35,7 @@ namespace HospitalBusinessLogic.OfficePackage
|
||||
Texts = new List<(string, WordTextProperties)> {
|
||||
(patient.Item1, new WordTextProperties { Size = "24"}),
|
||||
(" " + patient.Item2, new WordTextProperties { Size = "24", }),
|
||||
(" " + patient.Item3, new WordTextProperties { Size = "24", }), (", " + patient.Item4, new WordTextProperties { Size = "24", }) },
|
||||
(" " + patient.Item3, new WordTextProperties { Size = "24", }), (", " + patient.Item4.ToShortDateString(), new WordTextProperties { Size = "24", }) },
|
||||
TextProperties = new WordTextProperties
|
||||
{
|
||||
Size = "24",
|
||||
|
@ -131,13 +131,18 @@ namespace HospitalDatabaseImplement.Models
|
||||
context.SaveChanges();
|
||||
}
|
||||
var recipe = context.Recipes.First(x => x.Id == Id);
|
||||
var existingTreatmentsIds = recipeTreatments?.Select(x => x.TreatmentId).ToList();
|
||||
foreach (var rec in model.RecipeTreatments)
|
||||
{
|
||||
context.RecipeTreatments.Add(new RecipeTreatment
|
||||
if (existingTreatmentsIds != null && !existingTreatmentsIds.Contains(rec.Key))
|
||||
{
|
||||
context.RecipeTreatments.Add(new RecipeTreatment
|
||||
{
|
||||
Recipe = recipe,
|
||||
Treatment = context.Treatments.First(x => x.Id == rec.Key),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
context.SaveChanges();
|
||||
}
|
||||
_recipeTreatments = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user