public ActionResult Create(ProductCategory productcategory) { if (ModelState.IsValid) { var dao = new ProductCategoryD(); long id = dao.Insert(productcategory); if (id > 0) { SetAlert("Thêm danh mục sản phẩm thành công", "success"); return(RedirectToAction("Index", "ProductCategory")); } else { ModelState.AddModelError("", "Thêm danh mục sản phẩm không thành công"); } } return(View("Index")); }