public ActionResult Modify(int id, LeadViewModel viewmodel)
 {
     if (ModelState.IsValid)
     {
         viewmodel.LeadID = id;
         OperationContext.ServiceSession.EM_LeadsService.Update(viewmodel.ToPOCO(), "LeadID","FirstName","LastName","EmailAddress","IsValid","Unsubscribed");
         OperationContext.ServiceSession.SaveChange();
         return OperationContext.SendAjaxMessage(AjaxMessageStatus.OperationSuccess, "", "", null);
     }
     return OperationContext.SendAjaxMessage(AjaxMessageStatus.OperationFailed, "Please enable javascript in the browser", "", null);
 }
 public ActionResult Add(LeadViewModel viewModel)
 {
     if (ModelState.IsValid)
     {
         OperationContext.ServiceSession.EM_LeadsService.Add(viewModel.ToPOCO());
         OperationContext.ServiceSession.SaveChange();
         return OperationContext.SendAjaxMessage(AjaxMessageStatus.OperationSuccess, "", "", null);
     }
     else
     {
         return OperationContext.SendAjaxMessage(AjaxMessageStatus.OperationFailed, "Please enable javascript in browser.", "", null);
     }
 }