diff --git a/TravelCompany/TravelCompanyClientApp/Controllers/HomeController.cs b/TravelCompany/TravelCompanyClientApp/Controllers/HomeController.cs index f2a5f26..2ecf9d6 100644 --- a/TravelCompany/TravelCompanyClientApp/Controllers/HomeController.cs +++ b/TravelCompany/TravelCompanyClientApp/Controllers/HomeController.cs @@ -1,12 +1,12 @@ -using TravelCompanyContracts.BindingModels; -using TravelCompanyContracts.ViewModels; -using TravelCompanyClientApp.Models; -using Microsoft.AspNetCore.Mvc; -using System.Diagnostics; -using TravelCompanyClientApp; +using Microsoft.AspNetCore.Mvc; using PrecastConcretePlantClientApp; +using System.Diagnostics; +using TravelCompanyClientApp.Models; +using TravelCompanyContracts.BindingModels; +using TravelCompanyContracts.ViewModels; -namespace TravelCompanyClientApp.Controllers + +namespace AbstractShowClientApp.Controllers { public class HomeController : Controller { @@ -76,7 +76,8 @@ namespace TravelCompanyClientApp.Controllers [HttpPost] public void Enter(string login, string password) { - if (string.IsNullOrEmpty(login) ||string.IsNullOrEmpty(password)) + if (string.IsNullOrEmpty(login) || +string.IsNullOrEmpty(password)) { throw new Exception("Введите логин и пароль"); } @@ -101,7 +102,8 @@ namespace TravelCompanyClientApp.Controllers { throw new Exception("Введите логин, пароль и ФИО"); } - APIClient.PostRequest("api/client/register", new ClientBindingModel + APIClient.PostRequest("api/client/register", new + ClientBindingModel { ClientFIO = fio, Email = login, @@ -114,7 +116,7 @@ namespace TravelCompanyClientApp.Controllers public IActionResult Create() { ViewBag.Products = - APIClient.GetRequest>("api/main/gettravellist"); + APIClient.GetRequest>("api/main/getproductlist"); return View(); } [HttpPost] @@ -142,7 +144,7 @@ namespace TravelCompanyClientApp.Controllers public double Calc(int count, int travel) { var prod = - APIClient.GetRequest($"api/main/gettravel?travelId={travel}" + APIClient.GetRequest($"api/main/getproduct?travelId={travel}" ); return count * (prod?.Price ?? 1); }