Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 3
0
        public async void LoadLocationsAsync()
        {
            ObservableCollection <Location> locations = await PersistancyService.LoadTableFromJsonAsync <Location>("Locations");

            foreach (var item in locations)
            {
                this.Locations.Add(item);
            }
        }
Exemplo n.º 4
0
        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);
            }
        }
Exemplo n.º 6
0
        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
            }
        }