private void btnListadoHabitacion_Click(object sender, EventArgs e) { //le hardcodie un entero //Esto se accede por mediod e la pantalla de hoteles AbmHabitacion.ListadoHabitaciones ventana = new AbmHabitacion.ListadoHabitaciones(1); ventana.Show(); }
private void buttonHabitaciones_Click(object sender, EventArgs e) { if (this.dataGridViewHoteles.SelectedRows.Count == 1) { MessageBox.Show("Se pasa a ver las habitaciones del hotel seleccionado", "", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Hide(); AbmHabitacion.ListadoHabitaciones listadoHabitaciones = new AbmHabitacion.ListadoHabitaciones(Int32.Parse(dataGridViewHoteles.SelectedRows[0].Cells[0].Value.ToString())); listadoHabitaciones.ShowDialog(); } else { MessageBox.Show("Debe seleccionar un hotel", "", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void Gestion_de_habitaciones() { Form f1 = new AbmHabitacion.ListadoHabitaciones(Int32.Parse(hotelId)); f1.ShowDialog(); }