Exemplo n.º 1
0
        public IActionResult ProposalSuggestedItinerary(string QRFID)
        {
            try
            {
                ProposalViewModel proposalViewModel = new ProposalViewModel();
                proposalViewModel.QRFID = QRFID;

                #region Get Itinerary Details by QRFId
                itineraryGetReq             = new ItineraryGetReq();
                itineraryGetReq.QRFID       = QRFID;
                itineraryGetRes             = coProviders.GetItinerary(itineraryGetReq, token).Result;
                proposalViewModel.Itinerary = itineraryGetRes.Itinerary;
                proposalViewModel.Itinerary.ItineraryDays.ForEach(a => a.ItineraryDescription.RemoveAll(b => b.IsDeleted));
                #endregion

                return(PartialView("_ProposalSuggestedItinerary", proposalViewModel));
            }
            catch (Exception ex)
            {
                throw;
                return(View());
            }
        }
Exemplo n.º 2
0
        public IActionResult GetActivityList(string QRFID, string filterByDay = null, string filterByServiceType = null)
        {
            model.MenuViewModel.QRFID = QRFID;

            #region Get Itinerary Details by QRFID
            itineraryGetReq       = new ItineraryGetReq();
            itineraryGetReq.QRFID = QRFID;
            itineraryGetRes       = coProviders.GetItinerary(itineraryGetReq, token).Result;
            model.Itinerary       = itineraryGetRes.Itinerary;
            model.Itinerary.ItineraryDays.ForEach(a => a.ItineraryDescription.RemoveAll(b => b.IsDeleted));
            model.Itinerary.ItineraryDays.ForEach(a => a.Hotel.RemoveAll(b => b.IsDeleted));
            model.Itinerary.ItineraryDays.ForEach(a => a.Meal.RemoveAll(b => b.IsDeleted));
            #endregion

            #region Filter Dropdown Bindings
            model.DayList         = GetDays(itineraryGetRes.Itinerary.ItineraryDays);
            model.ServiceTypeList = GetProductTypes(model.Itinerary.ItineraryDays);

            if (filterByDay == "Day")
            {
                filterByDay = null;
            }

            if (filterByServiceType == "Service Type")
            {
                filterByServiceType = null;
            }

            if (!string.IsNullOrEmpty(filterByDay))
            {
                model.Itinerary.ItineraryDays = model.Itinerary.ItineraryDays.Where(x => x.Day == filterByDay).ToList();
            }

            if (!string.IsNullOrEmpty(filterByServiceType))
            {
                for (int i = 0; i < model.Itinerary.ItineraryDays.Count; i++)
                {
                    model.Itinerary.ItineraryDays[i].ItineraryDescription = model.Itinerary.ItineraryDays[i].ItineraryDescription.Where(x => x.ProductType == filterByServiceType).ToList();
                }
            }

            model.Days     = filterByDay;
            model.Services = filterByServiceType;
            #endregion
            return(PartialView("ActivityList/_ActivityList", model));
        }
Exemplo n.º 3
0
        public IActionResult GetItineraryData(string QRFID, string filterByDay = null, string filterByServiceType = null, string PageName = "QRFSummary")
        {
            try
            {
                QRFSummaryViewModel model = new QRFSummaryViewModel();
                model.PageName = PageName;

                #region Get Quote Info By QRFId
                NewQuoteViewModel modelQuote = new NewQuoteViewModel();
                modelQuote.QRFID = QRFID;
                SalesQuoteLibrary quoteLibrary = new SalesQuoteLibrary(_configuration);
                bool GetStatus = false;
                GetStatus = quoteLibrary.GetQRFAgentByQRFId(_configuration, token, ref modelQuote);
                if (GetStatus)
                {
                    model.TourInfoHeaderViewModel = modelQuote.TourInfoHeaderViewModel;
                }
                #endregion

                #region Get Itinerary Details by QRFId
                itineraryGetReq       = new ItineraryGetReq();
                itineraryGetReq.QRFID = QRFID;
                itineraryGetRes       = coProviders.GetItinerary(itineraryGetReq, token).Result;
                model.Itinerary       = itineraryGetRes.Itinerary;
                #endregion

                #region Filter Dropdown Bindings
                model.DayList         = GetDays(model.Itinerary.ItineraryDays);
                model.ServiceTypeList = GetProductTypes(model.Itinerary.ItineraryDays);
                #endregion

                if (filterByDay == "Day")
                {
                    filterByDay = null;
                }

                if (filterByServiceType == "Service Type")
                {
                    filterByServiceType = null;
                }

                if (!string.IsNullOrEmpty(filterByDay))
                {
                    model.Itinerary.ItineraryDays = model.Itinerary.ItineraryDays.Where(x => x.Day == filterByDay).ToList();
                }

                if (!string.IsNullOrEmpty(filterByServiceType))
                {
                    for (int i = 0; i < model.Itinerary.ItineraryDays.Count; i++)
                    {
                        model.Itinerary.ItineraryDays[i].ItineraryDescription = model.Itinerary.ItineraryDays[i].ItineraryDescription.Where(x => x.ProductType == filterByServiceType).ToList();
                    }
                }
                model.Days     = filterByDay;
                model.Services = filterByServiceType;
                return(PartialView("_QRFSummary", model));
            }
            catch (Exception ex)
            {
                throw;
            }
        }