public async Task LoadDataAsync() { Seats.Clear(); var data = await _flightService.GetSeatsAsync(); foreach (var item in data) { Seats.Add(item); } }
protected void ClearSeats() { if (Seats == null) { return; } foreach (ParlamentSeat seat in Seats) { seat.Person.RemoveProfession(typeof(Politician)); } Seats.Clear(); PartyAmounts.Clear(); }
public async Task LoadDataAsync() { Seats.Clear(); var data = await _flightService.GetSeatsAsync(); foreach (var item in data) { Seats.Add(item); } await Task.Run(() => { Chairs = SeatHelper.GetChairs(GetAmountOfChairs()); Rows = SeatHelper.GetRows(GetAmountOfRows()); }); }
public void SaveChanges() { Seats.Clear(); var num = coordX * coordY; for (int i = 0; i < num; i++) { Seats.Add(new SeatModel { Id = i, AreaId = areaModel.Id, Row = 0, Number = 0 }); } }
public async void LoadDataAsync() { Seats.Clear(); var data = await _flightService.GetSeatsAsync(); foreach (var seat in data) { if (seat.Passenger != null) { Seats.Add(new SelectedSeatViewModel() { Seat = seat }); } } }
public void ClearSeats() { LeftSeats.Clear(); RightSeats.Clear(); Seats.Clear(); }