Beispiel #1
0
        public ActionResult Index(int?id, string FilterDealIdentifierId, int?FilterBusOperatorId, int?FilterBusCategoryId, int?FilterCurrencyId)
        {
            var           dealtype  = mDealProvider.GetDealMasterById(id ?? 0);
            DealViewModel viewmodel = new DealViewModel();

            viewmodel.DealMasterList      = mDealProvider.GetAllDealMasterList(4);
            viewmodel.DealAppliedOnList   = mDealProvider.GetAllDealAppliedOnList();
            viewmodel.DealCalculateOnList = mDealProvider.GetAllDealCalculateOnList();

            viewmodel.BusOperatorList = mbDealProvider.GetAllBusOperatorList();
            viewmodel.BusCategoryList = mbDealProvider.GetAllBusCategoryList(FilterBusOperatorId ?? 0);

            viewmodel.CurrencyList       = mDealProvider.GetCurrencyList().Where(x => x.Value == "1");
            viewmodel.DealIdentifierList = mDealProvider.GetBusDealIdentifiers(dealtype != null ? dealtype.DealTypeId : 0);
            viewmodel.DealList           = mDealProvider.GetAllBusDeals(id, FilterDealIdentifierId, FilterBusOperatorId, FilterBusCategoryId, FilterCurrencyId);

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_DealDetailList", viewmodel));
            }
            else
            {
                return(View(viewmodel));
            }
        }
Beispiel #2
0
        ///////////////////////////Deal Setup Action Starts Here/////////////////////////////
        public ActionResult AjaxDealDetail(int id, string source)
        {
            ATLTravelPortal.Areas.Airline.Repository.MasterDealProvider masDealProvider = new ATLTravelPortal.Areas.Airline.Repository.MasterDealProvider();
            BranchDealProvider mbDealProvider = new BranchDealProvider();

            DealViewModel viewModel = new DealViewModel();

            viewModel = masDealProvider.GetBusDealDetail(id);

            viewModel.DealMasterList      = masDealProvider.GetAllDealMasterList(4);
            viewModel.DealAppliedOnList   = masDealProvider.GetAllDealAppliedOnList();
            viewModel.DealCalculateOnList = masDealProvider.GetAllDealCalculateOnList();

            viewModel.BusOperatorList = mbDealProvider.GetAllBusOperatorList();
            viewModel.BusCategoryList = mbDealProvider.GetAllBusCategoryList(viewModel.BusOperatorId ?? 0);

            viewModel.CurrencyList       = masDealProvider.GetCurrencyList().Where(x => x.Value == "1");
            viewModel.DealIdentifierList = masDealProvider.GetBusDealIdentifiers(masDealProvider.GetDealMasterById(viewModel.DealMasterId).DealTypeId);


            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_DealEdit", viewModel));
            }
            else
            {
                return(View(viewModel));
            }
        }
Beispiel #3
0
        public JsonResult GetCategoryByOperatorId(int?id)
        {
            BranchDealProvider branchdealprovider = new BranchDealProvider();
            var result = new JsonResult();
            IEnumerable <SelectListItem> lists = new SelectList(branchdealprovider.GetAllBusCategoryList(id ?? 0), "Value", "Text");

            result.Data = lists;
            result.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            return(result);
        }
Beispiel #4
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));
            }
        }
Beispiel #5
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));
            }
        }