public CalculateViewModel() { Title = "Calculate"; ZoomLevel = Device.RuntimePlatform == Device.Android ? 11 : 10; _itineraryService = new ItineraryService(); }
private ItineraryService CreateService() { var userID = Guid.Parse(User.Identity.GetUserId()); var service = new ItineraryService(userID); return(service); }
// GET: Itinerary public ActionResult Index() { var userID = Guid.Parse(User.Identity.GetUserId()); var service = new ItineraryService(userID); var model = service.GetItineraries(); return(View(model)); }
public async Task OnLoadAsync(INavigationParameters parameters, int attempt = 0) { try { var data = await ItineraryService.GetAsync(); Days.Clear(); foreach (var item in data) { Days.Add(new Day { Title = item.Title, Messages = item.Messages.Select(x => new DayMessage { Title = x.Title, Heading = x.Heading, SubHeading = x.SubHeading, Events = x.Events.Select(e => new DayEvent { Title = e.Title, TimeSlot = e.TimeSlot, Description = e.Description, Room = e.Room }) }) }); } ContentRetrieved = SettingsService.Get().LastUpdated; } catch (Exception) { await ErrorRetryManager.HandleRetryAsync(this, parameters, attempt); } }