public ActionResult Delete(int id) { JsonResult returnJsonData = new JsonResult(); BranchDealViewModel viewModel = new BranchDealViewModel(); viewModel = mDealProvider.GetBusBranchDealDetail(id); try { mDealProvider.Air_BranchDealChangesLogs(viewModel); bool result = false; TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; result = mDealProvider.Delete_Bus_BranchDeals(id, obj.AppUserId); returnJsonData.Data = result; } catch (Exception ex) { returnJsonData.Data = "Sorry, unable to delete deal!"; } return(returnJsonData); }
///////////////// public ActionResult DeleteBranchMasterDealForceFully(int id, string name) { BranchDealProvider bDealProvider = new BranchDealProvider(); JsonResult returnJsonData = new JsonResult(); BranchDealViewModel viewmodel = new BranchDealViewModel(); viewmodel = bDealProvider.GetDealDetail(id); BranchDealViewModel masterviewmodel = new BranchDealViewModel(); masterviewmodel = bDealProvider.GetMasterDealDetail(id); try { bDealProvider.Air_BranchDealChangesLogs(viewmodel); bDealProvider.Air_BranchDealMasterChangesLogs(masterviewmodel); bool result = false; TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; viewmodel.DealMasterList = bDealProvider.GetAllBranchDealMasterList(2, obj.LoginTypeId); bDealProvider.Delete_Core_BranchDeals(id, obj.AppUserId); bDealProvider.Delete_Core_BranchDealMasters(id, obj.AppUserId); result = true; viewmodel.isVerified = result; returnJsonData.Data = viewmodel; return(returnJsonData); } catch (Exception ex) { viewmodel.isVerified = false; returnJsonData.Data = viewmodel; } return(returnJsonData); }