예제 #1
0
        public ActionResult DeleteDistributorMasterDealForceFully(int id, string name)
        {
            JsonResult          returnJsonData = new JsonResult();
            BranchDealViewModel viewmodel      = new BranchDealViewModel();

            viewmodel = bDealProvider.GetDistributorDealDetail(id);

            BranchDealViewModel masterviewmodel = new BranchDealViewModel();

            masterviewmodel = bDealProvider.GetDistributorMasterDealDetail(id);

            try
            {
                bDealProvider.Air_DistributorDealChangesLogs(viewmodel);
                bDealProvider.Air_DistributorDealMasterChangesLogs(masterviewmodel);

                bool          result = false;
                TravelSession obj    = (TravelSession)Session["TravelPortalSessionInfo"];
                viewmodel.DealMasterList = bDealProvider.GetAllDistributorDealMasterList(1, obj.LoginTypeId);
                //result = bDealProvider.Delete_Core_DistributorDealMasters(id, obj.AppUserId);
                bDealProvider.Delete_Core_DistributorDeals(id, obj.AppUserId);
                bDealProvider.Delete_Core_DistributorDealMasters(id, obj.AppUserId);
                result = true;

                viewmodel.isVerified = result;
                returnJsonData.Data  = viewmodel;
                return(returnJsonData);
            }
            catch (Exception ex)
            {
                viewmodel.isVerified = false;
                returnJsonData.Data  = viewmodel;
            }
            return(returnJsonData);
        }