private void Button_Click(object sender, RoutedEventArgs e) { var q = this.dbcontent.Hotels.Where(x => x.HotelNameCN == HotelName.Content).Select(x => x.HotelID); int tempHotelID = 0; foreach (var item in q) { tempHotelID = item; } RoomMenu roomMenu = new RoomMenu(tempHotelID, MainWindow._SearchSDate, MainWindow._SearchEDate, MainWindow._RoomType.ToString()); roomMenu.Show(); }
private void Btn_Click(object sender, RoutedEventArgs e) { RoomMenu rp = new RoomMenu(((Button)sender).Tag, SDate.SelectedDate.Value, EDate.SelectedDate.Value, People.Text); rp.Show(); }