поправила медикаменты - круды для них работают
This commit is contained in:
parent
7eb6e50cd6
commit
9d840a764e
@ -99,10 +99,6 @@ namespace PolyclinicBusinessLogic.BusinessLogics
|
||||
{
|
||||
throw new ArgumentNullException("Какой-то неправильный идентификатор процедуры...", nameof(model));
|
||||
}
|
||||
if (string.IsNullOrEmpty(model.Comment))
|
||||
{
|
||||
throw new ArgumentNullException("Нет комментария", nameof(model.Comment));
|
||||
}
|
||||
if (string.IsNullOrEmpty(model.Name))
|
||||
{
|
||||
throw new ArgumentNullException("Нет названия у препарата", nameof(model.Comment));
|
||||
|
@ -40,6 +40,8 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
{
|
||||
Name = bindingModel.Name;
|
||||
Comment = bindingModel.Comment;
|
||||
ProcedureId = bindingModel.ProcedureId;
|
||||
SymptomId = bindingModel.SymptomId;
|
||||
}
|
||||
|
||||
public MedicamentViewModel GetViewModel => new()
|
||||
|
@ -171,6 +171,8 @@ namespace PolyclinicWebAppSuretor.Controllers
|
||||
[HttpPost]
|
||||
public IActionResult EditMedicament(MedicamentViewModel model)
|
||||
{
|
||||
ViewBag.Procedures = _procedureLogic.ReadList(null);
|
||||
ViewBag.Symptomes = _symptomLogic.ReadList(null);
|
||||
if (HttpContext.Request.Method == "GET")
|
||||
{
|
||||
var obj = _medicamentLogic.ReadElement(new MedicamentSearchModel { Id = model.Id });
|
||||
|
@ -43,8 +43,10 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.Id</td>
|
||||
<td>@item.Name</td>
|
||||
<td>@item.SymptomName</td>
|
||||
@ -70,6 +72,7 @@
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user