diff --git a/CarCenter/EmployeeApp/Controllers/HomeController.cs b/CarCenter/EmployeeApp/Controllers/HomeController.cs index 47af51e..65af009 100644 --- a/CarCenter/EmployeeApp/Controllers/HomeController.cs +++ b/CarCenter/EmployeeApp/Controllers/HomeController.cs @@ -209,5 +209,14 @@ namespace EmployeeApp.Controllers _saleLogic.Create(new SaleBindingModel { EmployeeId = APIClient.Employee.Id, Sum = (float)Convert.ToDouble(sum), CarId=car }); Response.Redirect("Sales"); } + public void DeleteSale(int id) + { + if (APIClient.Employee == null) + { + throw new Exception("Вы как суда попали? Суда вход только авторизованным"); + } + _saleLogic.Delete(new SaleBindingModel { Id = id }); + Response.Redirect("/Home/Sales"); + } } } \ No newline at end of file diff --git a/CarCenter/EmployeeApp/Views/Home/Cars.cshtml b/CarCenter/EmployeeApp/Views/Home/Cars.cshtml index 487850c..163a061 100644 --- a/CarCenter/EmployeeApp/Views/Home/Cars.cshtml +++ b/CarCenter/EmployeeApp/Views/Home/Cars.cshtml @@ -51,9 +51,6 @@ @Html.DisplayFor(modelItem => item.EmployeeName) - - Посмотреть - } diff --git a/CarCenter/EmployeeApp/Views/Home/CreateCar.cshtml b/CarCenter/EmployeeApp/Views/Home/CreateCar.cshtml index 694187c..c24114a 100644 --- a/CarCenter/EmployeeApp/Views/Home/CreateCar.cshtml +++ b/CarCenter/EmployeeApp/Views/Home/CreateCar.cshtml @@ -10,7 +10,7 @@
Предпродажные работы:
- +
diff --git a/CarCenter/EmployeeApp/Views/Home/Sales.cshtml b/CarCenter/EmployeeApp/Views/Home/Sales.cshtml index 6467a8f..23eea16 100644 --- a/CarCenter/EmployeeApp/Views/Home/Sales.cshtml +++ b/CarCenter/EmployeeApp/Views/Home/Sales.cshtml @@ -55,6 +55,9 @@ @Html.DisplayFor(modelItem => item.CarId) + + Удалить + }