public ActionResult Delete(int id) { JsonResult returnJsonData = new JsonResult(); BranchDealViewModel viewModel = new BranchDealViewModel(); viewModel = mDealProvider.GetDistributorDealDetail(id); try { mDealProvider.Air_DistributorDealChangesLogs(viewModel); bool result = false; TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; result = mDealProvider.Delete_Air_DistributorDeals(id, obj.AppUserId); returnJsonData.Data = result; } catch (Exception ex) { returnJsonData.Data = "Sorry, unable to delete deal!"; } return(returnJsonData); }