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