コード例 #1
0
        public async Task LoadDataAsync()
        {
            Seats.Clear();
            var data = await _flightService.GetSeatsAsync();

            foreach (var item in data)
            {
                Seats.Add(item);
            }
        }
コード例 #2
0
        protected void ClearSeats()
        {
            if (Seats == null)
            {
                return;
            }

            foreach (ParlamentSeat seat in Seats)
            {
                seat.Person.RemoveProfession(typeof(Politician));
            }
            Seats.Clear();
            PartyAmounts.Clear();
        }
コード例 #3
0
        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());
            });
        }
コード例 #4
0
        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
                });
            }
        }
コード例 #5
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
                    });
                }
            }
        }
コード例 #6
0
 public void ClearSeats()
 {
     LeftSeats.Clear();
     RightSeats.Clear();
     Seats.Clear();
 }