Ejemplo n.º 1
0
        /////////////////

        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);
        }