public async void LoadRoomsViewAsync() { ObservableCollection <RoomsView> roomsView = await PersistancyService.LoadTableFromJsonAsync <RoomsView>("RoomsViews"); foreach (var item in roomsView) { this.RoomsView.Add(item); } }
public async void LoadTavleBookingsAsync() { ObservableCollection <TavleBooking> tavleBookings = await PersistancyService.LoadTableFromJsonAsync <TavleBooking>("TavleBookings"); foreach (var item in tavleBookings) { this.TavleBookings.Add(item); } }
public async void LoadLocationsAsync() { ObservableCollection <Location> locations = await PersistancyService.LoadTableFromJsonAsync <Location>("Locations"); foreach (var item in locations) { this.Locations.Add(item); } }
public async Task LoadAllBookingsAsync() { ObservableCollection <AllBookingsView> allBookings = await PersistancyService.LoadTableFromJsonAsync <AllBookingsView>("AllBookingsViews"); foreach (var item in allBookings) { this.AllBookings.Add(item); } }
public async Task LoadbookingsAsync() { ObservableCollection <Booking> bookings = await PersistancyService.LoadTableFromJsonAsync <Booking>("Bookings"); foreach (var item in bookings) { this.Bookings.Add(item); } }
public async void LoadUsersAsync() { ObservableCollection <User> users = await PersistancyService.LoadTableFromJsonAsync <User>("Users"); try { if (users == null) { throw new NullReferenceException(); } else { foreach (var item in users) { this.Users.Add(item); } } } catch (Exception) { //Another catch catches this exception } }