diff --git a/PlumbingRepair/PlumbingRepairClientApp/Controllers/HomeController.cs b/PlumbingRepair/PlumbingRepairClientApp/Controllers/HomeController.cs index b3c792d..50226bf 100644 --- a/PlumbingRepair/PlumbingRepairClientApp/Controllers/HomeController.cs +++ b/PlumbingRepair/PlumbingRepairClientApp/Controllers/HomeController.cs @@ -2,6 +2,7 @@ using PlumbingRepairClientApp.Models; using PlumbingRepairContracts.BindingModels; using PlumbingRepairContracts.ViewModels; +using System.Collections.Generic; using System.Diagnostics; namespace PlumbingRepairClientApp.Controllers @@ -116,10 +117,12 @@ namespace PlumbingRepairClientApp.Controllers { throw new Exception("Количество и сумма должны быть больше 0"); } + var works = APIClient.GetRequest>("api/main/getworklist"); APIClient.PostRequest("api/main/createorder", new OrderBindingModel { ClientId = APIClient.Client.Id, WorkId = work, + WorkName = (works.FirstOrDefault(x => x.Id == work)).WorkName, Count = count, Sum = Calc(count, work) });