исправила и добавила вывод названия симптома и процедуры во вью модель

This commit is contained in:
Елена Бакальская 2024-05-27 21:53:53 +04:00
parent fa8d5d9d8e
commit 171ca6d819
5 changed files with 40 additions and 31 deletions

View File

@ -8,9 +8,19 @@ namespace PolyclinicContracts.ViewModels
public int Id { get; set; }
public int ProcedureId { get; set; }
public int? SymptomId { get; set; }
[DisplayName("Название медикамента")]
public string Name { get; set; } = string.Empty;
[DisplayName("Комментарий")]
public string Comment { get; set; } = string.Empty;
[DisplayName("Название симптома")]
public string SymptomName { get; set; } = string.Empty;
[DisplayName("Название процедуры")]
public string ProcedureName { get; set; } = string.Empty;
}
}

View File

@ -12,6 +12,8 @@ namespace PolyclinicContracts.ViewModels
[DisplayName("Комментарий")]
public string Comment { get; set; } = string.Empty;
[DisplayName("Номер курса")]
public int? CourseId { get; set; }
public Dictionary<int, IProcedureModel> RecipeProcedures { get; } = new();
}

View File

@ -48,7 +48,9 @@ namespace PolyclinicDatabaseImplement.Models
Name = Name,
Comment = Comment,
ProcedureId = ProcedureId,
SymptomId = Symptom?.Id ?? null
SymptomId = Symptom?.Id ?? null,
SymptomName = Symptom?.Name ?? string.Empty,
ProcedureName = Procedure?.Name ?? string.Empty,
};
}
}

View File

@ -45,15 +45,11 @@
</tr>
</thead>
<tbody>
<td>
1
</td>
<td>
Фенибут
</td>
<td>
Сопли до колен
</td>
@foreach (var item in Model)
{
<td>@item.Id</td>
<td>@item.Name</td>
<td>@item.SymptomId.</td>
<td>
3
</td>
@ -74,6 +70,7 @@
<path d="M121 36L101.582 55L75 31" stroke="#D10000" stroke-width="8" stroke-linecap="round" />
</svg>
</td>
}
</tbody>
</table>
}

View File

@ -32,8 +32,6 @@
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>