Beispiel #1
0
        private void searchBtnClicked(object sender, EventArgs e)
        {
            if (searchDateFrom.Date <= searchDateTo.Date)
            {
                if (App.CurrentSettings.SelectedLanguage == "RU")
                {
                    DisplayAlert("Неверная дата", "Дата возвращения должна быть после даты отъезда", "OK");
                }
                else
                {
                    DisplayAlert("Wrong date", "Depart date must be after arrival date", "OK");
                }
                return;
            }
            var hvm = new HotelsListViewModel(searchCity.Text, searchDateTo.Date, searchDateFrom.Date,
                                              (int)searchAdults.Value, (int)searchChildren.Value)
            {
                Navigation = this.Navigation
            };

            Navigation.PushAsync(new HotelsListPage(hvm));
        }
Beispiel #2
0
 public HotelsListPage(HotelsListViewModel vm)
 {
     InitializeComponent();
     BindingContext = vm;
 }
 public FavoritesPage()
 {
     InitializeComponent();
     BindingContext = new HotelsListViewModel(App.Accounts.Current.Favorites);
 }