public IActionResult SaveItemCategory(string categoryName) { if (!(HttpContext.Session.GetString("role") == Enums.EmployeeRole.STORESUPERVISOR || HttpContext.Session.GetString("role") == Enums.EmployeeRole.STOREMANAGER)) { return(RedirectToAction(HttpContext.Session.GetString("role"), "Home")); } if (categoryName != null) { invService.CreateCategory(categoryName); TempData["alertMsg"] = "Category has been created!"; } else { TempData["alertMsg"] = "Please enter category name!"; } return(RedirectToAction("AddItemCategory")); }