private void bBook_Click(object sender, RoutedEventArgs e) { if (tbCDNI.Text == "11111111-A") { BookingWindow b = new BookingWindow(); b.tbBookID.Text = "0"; b.tbName.Text = "Daniel"; b.tbDNI.Text = "11111111-A"; b.tbSurname.Text = "Rabinovich"; b.tbProvince.Text = "Cuenca"; b.tbCity.Text = "Pasaconsol"; b.dpArrival.Text = "21/05/2015"; b.dpDeparture.Text = "31/05/2015"; b.tbAccount.Text = "0000-0000-0000-0001"; b.cbNRoom.Text = "2"; b.cbType0.Text = "Suite"; b.cbType1.IsEnabled = true; b.cbType1.Text = "Suite"; b.tbPrice.Text = "500 €"; b.IsEnabled = false; b.ShowDialog(); } else { MessageBox.Show( "No existe reserva. DNI/Día incorrectos.", "Error", MessageBoxButton.OK); } }
private void bNew_Click(object sender, RoutedEventArgs e) { BookingWindow b = new BookingWindow(); b.tbBookID.Text = "1"; b.ShowDialog(); }
private void bModify_Click(object sender, RoutedEventArgs e) { BookingWindow b = new BookingWindow(); b.tbBookID.Text = "0"; b.tbName.Text = "Daniel"; b.tbDNI.Text = "11111111-A"; b.tbSurname.Text = "Rabinovich"; b.tbProvince.Text = "Cuenca"; b.tbCity.Text = "Pasaconsol"; b.dpArrival.Text = "21/05/2015"; b.dpDeparture.Text = "31/05/2015"; b.tbAccount.Text = "0000-0000-0000-0001"; b.cbNRoom.Text = "2"; b.cbType0.Text = "Suite"; b.cbType1.IsEnabled = true; b.cbType1.Text = "Suite"; b.tbPrice.Text = "500 €"; b.ShowDialog(); }