diff --git a/ServiceStation/ServiceStationExecutorApp/Controllers/HomeController.cs b/ServiceStation/ServiceStationExecutorApp/Controllers/HomeController.cs index 9dec6df..cde80c0 100644 --- a/ServiceStation/ServiceStationExecutorApp/Controllers/HomeController.cs +++ b/ServiceStation/ServiceStationExecutorApp/Controllers/HomeController.cs @@ -1,6 +1,7 @@ using DocumentFormat.OpenXml.Drawing; using DocumentFormat.OpenXml.Wordprocessing; using Microsoft.AspNetCore.Mvc; +using Microsoft.IdentityModel.Tokens; using ServiceStationContracts.BindingModels; using ServiceStationContracts.BusinessLogicsContracts; using ServiceStationContracts.SearchModels; @@ -316,26 +317,26 @@ namespace ServiceStationExecutorApp.Controllers return View(APIExecutor.GetRequest>($"api/main/getcarlist?executorId={APIExecutor.Executor.Id}")); } [HttpPost] - public void UpdateTechnicalWork(int technicalWork, string TechnicalWorkType, double TechnicalWorkPrice, int[] car) + public void UpdateTechnicalWork(int technicalWork, string worktype, double workPrice, int[] car) { if (APIExecutor.Executor == null) { throw new Exception("Авторизироваться не забыли?"); } - if (string.IsNullOrEmpty(TechnicalWorkType)) + if (string.IsNullOrEmpty(worktype)) { throw new Exception("Введите тип ТО"); } - if(TechnicalWorkPrice < 100) + if(workPrice < 100) { throw new Exception("Цена ТО должны быть больше 100"); } APIExecutor.PostRequest("api/main/updatetechnicalwork", new TechnicalWorkBindingModel { Id = technicalWork, - WorkType = TechnicalWorkType, + WorkType = worktype, ExecutorId = APIExecutor.Executor.Id, - WorkPrice = TechnicalWorkPrice, + WorkPrice = workPrice, }); APIExecutor.PostRequest("api/main/addcartotechnicalwork", Tuple.Create( new TechnicalWorkSearchModel() { Id = technicalWork },