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



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

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

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

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

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

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

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

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

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_DealDetailList", viewmodel));
            }
            else
            {
                return(View(viewmodel));
            }
        }
        public ActionResult Create()
        {
            TravelSession             obj             = (TravelSession)Session["TravelPortalSessionInfo"];
            string                    DistributorCode = mDealProvider.GetDistributorCodeByDistributorId(obj.LoginTypeId);
            MasterBranchDealviewModel viewmodel       = new MasterBranchDealviewModel()
            {
                DealMasterList  = mDealProvider.GetAllDistributorDealMasterList(1, obj.LoginTypeId),
                DistributorCode = DistributorCode
            };

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_CreateNewDeal", viewmodel));
            }
            else
            {
                return(View(viewmodel));
            }
        }
Ejemplo n.º 5
0
        public ActionResult AjaxDistributorDealDetail(int id)
        {
            TravelSession       obj           = (TravelSession)Session["TravelPortalSessionInfo"];
            BranchDealViewModel viewModel     = new BranchDealViewModel();
            BranchDealProvider  mDealProvider = new BranchDealProvider();

            viewModel = mDealProvider.GetMobileDistributorDealDetail(id);

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

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_DistributorDealEdit", viewModel));
            }
            else
            {
                return(View(viewModel));
            }
        }
Ejemplo n.º 6
0
        public ActionResult DeleteMobileDistributorMasterDealForceFully(int id, string name)
        {
            JsonResult          returnJsonData = new JsonResult();
            BranchDealViewModel viewmodel      = new BranchDealViewModel();

            viewmodel = bDealProvider.GetMobileDistributorDealDetail(id);

            BranchDealViewModel masterviewmodel = new BranchDealViewModel();

            masterviewmodel = bDealProvider.GetDistributorMasterDealDetail(id);

            try
            {
                bDealProvider.Mobile_DistributorDealChangesLogs(viewmodel);

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

                bDealProvider.Delete_AgentClassDeals(id, obj.LoginTypeId);
                bDealProvider.Delete_Core_AgentsDeals(id, obj.LoginTypeId);
                bDealProvider.Delete_Mobile_DistributorDeals(id, obj.AppUserId);
                bDealProvider.Delete_Core_DistributorDealMasters(id, obj.AppUserId);

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

                result = true;

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