public ActionResult EditPrice(PriceListModel plm) { CommonDataService cds = new CommonDataService(); CommonModel cm = new CommonModel(); cm = cds.GenerateCommonModel(); Session["FaceBook"] = cm.FaceBook; Session["Twitter"] = cm.Twitter; Session["Youtube"] = cm.Youtube; Session["Instagram"] = cm.Instagram; Session["PhoneNumber"] = cm.PhoneNumber; Session["Email"] = cm.Email; Session["ShoppingHours"] = cm.ShoppingHours; PriceDataService dataService = new PriceDataService(); PriceListModel model = new PriceListModel(); try { if (ModelState.IsValid) { model.PriceListId = plm.PriceListId; model.ProductName = plm.ProductName; model.ProductDescription = plm.ProductDescription; model.Price = plm.Price; dataService.UpdatePriceList(model); return RedirectToAction("Edit", "Price"); } else { return View(plm); } } catch (Exception ex) { throw ex; } finally { dataService = null; } }