Коммит для проверки
This commit is contained in:
parent
dfbbdb049a
commit
bca6631aab
83
RestAPI/Controllers/CartController.cs
Normal file
83
RestAPI/Controllers/CartController.cs
Normal file
@ -0,0 +1,83 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace RestAPI.Controllers
|
||||
{
|
||||
public class CartController : Controller
|
||||
{
|
||||
// GET: CartController
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: CartController/Details/5
|
||||
public ActionResult Details(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: CartController/Create
|
||||
public ActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: CartController/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult Create(IFormCollection collection)
|
||||
{
|
||||
try
|
||||
{
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
|
||||
// GET: CartController/Edit/5
|
||||
public ActionResult Edit(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: CartController/Edit/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult Edit(int id, IFormCollection collection)
|
||||
{
|
||||
try
|
||||
{
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
|
||||
// GET: CartController/Delete/5
|
||||
public ActionResult Delete(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: CartController/Delete/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult Delete(int id, IFormCollection collection)
|
||||
{
|
||||
try
|
||||
{
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
83
RestAPI/Controllers/PurchaseController.cs
Normal file
83
RestAPI/Controllers/PurchaseController.cs
Normal file
@ -0,0 +1,83 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace RestAPI.Controllers
|
||||
{
|
||||
public class PurchaseController : Controller
|
||||
{
|
||||
// GET: PurchaseController
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: PurchaseController/Details/5
|
||||
public ActionResult Details(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: PurchaseController/Create
|
||||
public ActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: PurchaseController/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult Create(IFormCollection collection)
|
||||
{
|
||||
try
|
||||
{
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
|
||||
// GET: PurchaseController/Edit/5
|
||||
public ActionResult Edit(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: PurchaseController/Edit/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult Edit(int id, IFormCollection collection)
|
||||
{
|
||||
try
|
||||
{
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
|
||||
// GET: PurchaseController/Delete/5
|
||||
public ActionResult Delete(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: PurchaseController/Delete/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult Delete(int id, IFormCollection collection)
|
||||
{
|
||||
try
|
||||
{
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@ namespace WebApp.Controllers
|
||||
// GET: HomeController
|
||||
public ActionResult Index()
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
return View(APIClient.GetRequest<List<ProductViewModel>>($"api/main/getfullproductslist"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user