Пример #1
0
        private void NavigateNextOrPrevious(ItineraryCompleteDetailsViewModel currentDay, bool isNext)
        {
            var tripService = new Itinerary();

            var triDayObject = isNext ? tripService.GetItineraryNextDay(currentDay.ItineraryDayId, currentDay.ItineraryId, Int32.Parse(currentDay.DayNumber))
                                    : tripService.GetItineraryPreviousDay(currentDay.ItineraryDayId, currentDay.ItineraryId, Int32.Parse(currentDay.DayNumber));

            DayCompleteDetails = GetitinerayCompleteDesc(triDayObject);
        }
Пример #2
0
        public ItineraryCompleteDetailsViewModel GetitinerayCompleteDesc(ItineraryDayDescDto triDayObject)
        {
            var itineraryDesc = new ItineraryCompleteDetailsViewModel();

            itineraryDesc.LocationName = $"{triDayObject.LocationName}";
            itineraryDesc.ImageBanner  = "KtMobileApp.Assets.Images.BannerImage_2_256_256.png";

            var summaryDesc = triDayObject.Summary.Select(item => $"{item.Name}:{item.Description}.");

            //NOTE: this is for Web html view, so you need to form html doc and then enclose ypur html content within
            //For bullet Items, if we use <ul><li></li><li></li></ul>; this we can use in itineraryDetails.xaml page for collapsible panel highlights to show bullets.
            itineraryDesc.CompleteDescription = @"<html><body>" + summaryDesc + @"</body></html>";

            itineraryDesc.DayNumber      = triDayObject.DayNumber.ToString();
            itineraryDesc.ItineraryId    = triDayObject.ItineraryId;
            itineraryDesc.ItineraryDayId = triDayObject.ItineraryDayId;

            return(itineraryDesc);
        }
Пример #3
0
        public async Task NavigatePrevious(ItineraryCompleteDetailsViewModel currentDay)
        {
            if (IsBusy)
            {
                return;
            }
            IsBusy = true;

            try
            {
                await Task.Run(() => NavigateNextOrPrevious(currentDay, false));
            }
            catch (Exception)
            {
                //
            }

            IsBusy = false;
        }