public ActionResult Delete(int id, string name)
        {
            TravelSession       obj            = (TravelSession)Session["TravelPortalSessionInfo"];
            JsonResult          returnJsonData = new JsonResult();
            BranchDealViewModel viewmodel      = new BranchDealViewModel();

            try
            {
                bool result = false;
                viewmodel.DealMasterList = mDealProvider.GetAllBranchDealMasterList(1, obj.LoginTypeId);

                //mDealProvider.Delete_Core_DistributorDeals(id, obj.AppUserId);
                //mDealProvider.Delete_Core_DistributorDealMasters(id, obj.AppUserId);
                result = false;
                //result = mDealProvider.Delete_Core_DistributorDealMasters(id, obj.AppUserId);
                viewmodel.isVerified = result;
                returnJsonData.Data  = viewmodel;
                return(returnJsonData);
            }
            catch (Exception ex)
            {
                viewmodel.isVerified = false;
                returnJsonData.Data  = viewmodel;
            }
            return(returnJsonData);
        }
        /////////////////


        ///////////////////////////Brnach Deal Setup Action Starts Here/////////////////////////////
        public ActionResult AjaxBranchDealDetail(int id, string source)
        {
            TravelSession       obj       = (TravelSession)Session["TravelPortalSessionInfo"];
            BranchDealViewModel viewModel = new BranchDealViewModel();

            viewModel = bDealProvider.GetDealDetail(id);
            viewModel.AirlineNameList = bDealProvider.GetAllAirlineNameList();
            viewModel.DealMasterList  = bDealProvider.GetAllBranchDealMasterList(1, obj.LoginTypeId);
            viewModel.CurrencyList    = bDealProvider.GetCurrencyList();

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_BranchDealEdit", viewModel));
            }
            else
            {
                return(View(viewModel));
            }
        }
Example #3
0
        public ActionResult Create()
        {
            TravelSession             obj        = (TravelSession)Session["TravelPortalSessionInfo"];
            string                    BranchCode = mDealProvider.GetBranchCodeByBranchId(obj.LoginTypeId);
            MasterBranchDealviewModel viewmodel  = new MasterBranchDealviewModel()
            {
                DealMasterList   = mDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId),
                BranchOffices    = new SelectList(distributorManagementProvider.GetBranchOffices(), "BranchOfficeId", "BranchOfficeName"),
                BranchOfficeCode = BranchCode
            };

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_CreateNewDeal", viewmodel));
            }
            else
            {
                return(View(viewmodel));
            }
        }
        public ActionResult Create(BranchDealViewModel model)
        {
            TravelSession       obj       = (TravelSession)Session["TravelPortalSessionInfo"];
            BranchDealViewModel viewModel = new BranchDealViewModel();
            BranchDealViewModel viewmodel = new BranchDealViewModel()
            {
                AirlineNameList = mDealProvider.GetAllAirlineNameList(),
                CurrencyList    = mDealProvider.GetCurrencyList(),
                DealMasterList  = mDealProvider.GetAllDistributorDealMasterList(1, obj.LoginTypeId),
                DealMaserText   = mDealProvider.GetDistributorDealMasterById(model.DealMasterId).DistributorDealName,
            };


            if (ModelState.IsValid)
            {
                model.MakerId      = obj.AppUserId;
                model.MakerDate    = DateTime.UtcNow;
                model.isVerified   = true;
                model.VerifiedBy   = obj.AppUserId;
                model.VerifiedDate = DateTime.UtcNow;
                model.isDelete     = false;
                model.CreatedBy    = obj.AppUserId;

                int dealId = mDealProvider.Save_Air_DistributorDeals(model);



                viewModel = mDealProvider.GetDistributorDealDetail(dealId);

                viewModel.AirlineNameList = mDealProvider.GetAllAirlineNameList();
                viewModel.CurrencyList    = mDealProvider.GetCurrencyList();
                viewModel.DealMasterList  = mDealProvider.GetAllDistributorDealMasterList(1, obj.LoginTypeId);
                viewModel.CurrencyList    = mDealProvider.GetCurrencyList();

                if (Request != null && Request.IsAjaxRequest())
                {
                    return(PartialView("VUC_DealDetail", viewModel));
                }
                else
                {
                    return(View(viewModel));
                }
            }
            else
            {
                viewModel.AirlineNameList = mDealProvider.GetAllAirlineNameList();
                viewModel.CurrencyList    = mDealProvider.GetCurrencyList();
                viewModel.DealMasterList  = mDealProvider.GetAllBranchDealMasterList(1, obj.LoginTypeId);
                viewModel.CurrencyList    = mDealProvider.GetCurrencyList();
                return(View(viewModel));
            }
        }
        public ActionResult AjaxBranchDealDetail(int id)
        {
            TravelSession       obj           = (TravelSession)Session["TravelPortalSessionInfo"];
            BranchDealViewModel viewModel     = new BranchDealViewModel();
            BranchDealProvider  mDealProvider = new BranchDealProvider();

            viewModel = mDealProvider.GetMobileBranchDealDetail(id);

            viewModel.DealMasterList     = mDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId);
            viewModel.DealIdentifierList = _DealProvider.GetMobileServiceProviders();

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_BranchDealEdit", viewModel));
            }
            else
            {
                return(View(viewModel));
            }
        }
Example #6
0
        public ActionResult AjaxBranchDealDetail(int id, string source)
        {
            TravelSession       obj           = (TravelSession)Session["TravelPortalSessionInfo"];
            BranchDealViewModel viewModel     = new BranchDealViewModel();
            BranchDealProvider  mDealProvider = new BranchDealProvider();

            viewModel = mDealProvider.GetBusBranchDealDetail(id);
            viewModel.BusOperatorList = mDealProvider.GetAllBusOperatorList();
            viewModel.BusCategoryList = mDealProvider.GetAllBusCategoryList(id);

            viewModel.DealMasterList = mDealProvider.GetAllBranchDealMasterList(4, obj.LoginTypeId);
            viewModel.CurrencyList   = mDealProvider.GetCurrencyList();

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_BranchDealEdit", viewModel));
            }
            else
            {
                return(View(viewModel));
            }
        }
Example #7
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);
        }
Example #8
0
        public ActionResult Index(int?id, int?FilterDealIdentifierId)
        {
            TravelSession       obj       = (TravelSession)Session["TravelPortalSessionInfo"];
            var                 dealtype  = mDealProvider.GetBranchDealMasterById(id ?? 0);
            BranchDealViewModel viewmodel = new BranchDealViewModel();

            viewmodel.DealMasterList     = mDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId);
            viewmodel.DealIdentifierList = masterDealProvider.GetMobileServiceProviders();

            viewmodel.DealList = mDealProvider.GetAllMobileBranchDeals(id, FilterDealIdentifierId);

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_DealDetailList", viewmodel));
            }
            else
            {
                return(View(viewmodel));
            }
        }
Example #9
0
        public ActionResult Index(int?id, string FilterDealIdentifierId, int?FilterAirlineId, int?FilterCurrencyId)
        {
            TravelSession       obj       = (TravelSession)Session["TravelPortalSessionInfo"];
            var                 dealtype  = mDealProvider.GetBranchDealMasterById(id ?? 0);
            BranchDealViewModel viewmodel = new BranchDealViewModel();

            viewmodel.AirlineNameList = mDealProvider.GetAllAirlineNameList();
            viewmodel.DealMasterList  = mDealProvider.GetAllBranchDealMasterList(1, obj.LoginTypeId);

            viewmodel.CurrencyList = mDealProvider.GetCurrencyList();
            viewmodel.DealList     = mDealProvider.GetAllDeals(id, FilterDealIdentifierId, FilterAirlineId, FilterCurrencyId);

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_DealDetailList", viewmodel));
            }
            else
            {
                return(View(viewmodel));
            }
        }
Example #10
0
        public ActionResult Index(int?id, int?FilterBusOperatorId, int?FilterBusCategoryId)
        {
            TravelSession       obj       = (TravelSession)Session["TravelPortalSessionInfo"];
            var                 dealtype  = mDealProvider.GetBranchDealMasterById(id ?? 0);
            BranchDealViewModel viewmodel = new BranchDealViewModel();

            viewmodel.BusOperatorList = mDealProvider.GetAllBusOperatorList();
            viewmodel.BusCategoryList = mDealProvider.GetAllBusCategoryList(FilterBusOperatorId ?? 0);
            viewmodel.DealMasterList  = mDealProvider.GetAllBranchDealMasterList(4, obj.LoginTypeId);

            viewmodel.CurrencyList = mDealProvider.GetCurrencyList();
            viewmodel.DealList     = mDealProvider.GetAllBusBranchDeals(id, FilterBusOperatorId, FilterBusCategoryId);

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_DealDetailList", viewmodel));
            }
            else
            {
                return(View(viewmodel));
            }
        }