public IActionResult Index() { if (_check.CheckUserLogin() == false) { return(RedirectToAction("Index", "Login")); } return(View(_repositoryUser.GetUsers())); }
public IActionResult Delete(int id) { if (_check.CheckUserLogin() == false) { return(RedirectToAction("Index", "Login")); } _repositoryProducts.RemoveProduct(id); _logger.WriteLog($"Product: {id}", Catgory.Product); return(View()); }
public IActionResult Purchase(string ShoppingCart) { if (_check.CheckUserLogin() == false) { return(RedirectToAction("Index", "Login")); } _repositoryProducts.BuyProducts(ShoppingCart); _logger.WriteLog($"Products that Purchase{ShoppingCart}", Catgory.Product); return(RedirectToAction("index", "Home")); }