public ActionResult AddPricing(AddPriceModel WebPageData) { if (ModelState.IsValid) { // Attempt to add the chain IPriceService PricingService = new PriceService(); try { bool createStatus = PricingService.AddPrice(WebPageData); if (createStatus == true) { return(RedirectToAction("ManagePricings", "Administration")); } else { ModelState.AddModelError("", "Failed to create the record"); } } catch (Exception Ex) { ModelState.AddModelError("", Common.StandardExceptionErrorMessage(Ex)); } } // If we got this far, something failed, redisplay form return(View(WebPageData)); }