Ejemplo n.º 1
0
 public JsonResult CreateEdit(SchemeViewModel scheme)
 {
     try
     {
         if (ModelState.IsValid)
         {
             scheme.CreatedBy = Convert.ToInt32(Session["UserLoginId"]);
             scheme.UpdatedBy = Convert.ToInt32(Session["UserLoginId"]);
             scheme.SchemeEffectiveROIList = (List <SchemeEffectiveROIVM>)Session["EffectiveROI"];
             _schemeService.SaveUpdateRecord(scheme);
         }
         ViewBag.PurityList  = new SelectList(_schemeService.GetPurityMasterList(), "Id", "PurityName");
         ViewBag.ProductList = new SelectList(_schemeService.GetProductList(), "Id", "Name");
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
     return(Json(scheme));
 }