Example #1
0
        public ActionResult CreateProductCategory(ProductCategory category)
        {
            if (!ModelState.IsValid || category.Name == null)
            {
                TempData["Message"] = "Name Can't be Empty!";
                return(View(category));
            }

            pcDb.CreateProductCategory(category);
            return(RedirectToAction("ProductCategoryIndex"));
        }