public async Task <ActionResult> Category(string category) { ReturnData <int> response = await products.AddCategory(category, User.Identity.Name); TempData["Alert"] = DesignClass.AlertDesign(response.code); TempData["Message"] = DesignClass.StandardMessage(response.code); return(Redirect("Category")); }
public async Task <ActionResult> Brands(string brand) { ReturnData <int> response = await products.AddBrands(brand, User.Identity.Name); TempData["Alert"] = DesignClass.AlertDesign(response.code); TempData["Message"] = DesignClass.StandardMessage(response.code); return(Redirect("Brands")); }
public async Task <ActionResult> Category() { ResponseAPI <categories> response = await products.GetCategory(); ViewBag.Code = response.code; ViewBag.GetBrandAlert = DesignClass.AlertDesign(response.code); ViewBag.GetBrandMessage = DesignClass.StandardMessage(response.code); ViewData["categories"] = response.data; return(View()); }