예제 #1
0
        public ActionResult Delete(int id)
        {
            JsonResult returnJsonData = new JsonResult();

            BranchDealViewModel viewModel = new BranchDealViewModel();

            viewModel = mDealProvider.GetMobileBranchDealDetail(id);

            try
            {
                mDealProvider.Mobile_BranchDealChangesLogs(viewModel);

                bool          result = false;
                TravelSession obj    = (TravelSession)Session["TravelPortalSessionInfo"];
                result = mDealProvider.Delete_Mobile_BranchDeals(id, obj.AppUserId);
                returnJsonData.Data = result;
            }
            catch (Exception ex)
            {
                returnJsonData.Data = "Sorry, unable to delete deal!";
            }
            return(returnJsonData);
        }
예제 #2
0
        public ActionResult DeleteMobileBranchMasterDealForceFully(int id, string name)
        {
            JsonResult          returnJsonData = new JsonResult();
            BranchDealViewModel viewmodel      = new BranchDealViewModel();

            viewmodel = bDealProvider.GetMobileBranchDealDetail(id);

            BranchDealViewModel masterviewmodel = new BranchDealViewModel();

            masterviewmodel = bDealProvider.GetBranchMasterDealDetail(id);

            try
            {
                bDealProvider.Mobile_BranchDealChangesLogs(viewmodel);
                //bDealProvider.Air_DistributorDealMasterChangesLogs(masterviewmodel);::TODO

                bool          result = false;
                TravelSession obj    = (TravelSession)Session["TravelPortalSessionInfo"];

                bDealProvider.Delete_Mobile_BranchDeals(id, obj.AppUserId);
                bDealProvider.Delete_Core_BranchDealMasters(id, obj.AppUserId);

                viewmodel.DealMasterList = bDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId);

                result = true;

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