public IActionResult Index()
 {
     if (_check.CheckUserLogin() == false)
     {
         return(RedirectToAction("Index", "Login"));
     }
     return(View(_repositoryUser.GetUsers()));
 }
示例#2
0
        public IActionResult Delete(int id)
        {
            if (_check.CheckUserLogin() == false)
            {
                return(RedirectToAction("Index", "Login"));
            }
            _repositoryProducts.RemoveProduct(id);
            _logger.WriteLog($"Product: {id}", Catgory.Product);

            return(View());
        }
示例#3
0
 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"));
 }