예제 #1
0
        private void resultados_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ModificarHotel modificarHotel = new ModificarHotel(hoteles[resultados.SelectedItems[0].Index]);

            modificarHotel.ShowDialog();
            obtenerHoteles();
        }
예제 #2
0
        private void buttonModificarHotel_Click(object sender, EventArgs e)
        {
            DataTable      dtH           = new DataTable();
            string         commandString = "SELECT * FROM DERROCHADORES_DE_PAPEL.Hotel WHERE hote_id = @id";
            SqlDataAdapter sda           = UtilesSQL.crearDataAdapter(commandString);

            sda.SelectCommand.Parameters.AddWithValue("@id", dataGridViewHoteles.CurrentRow.Cells[0].Value);
            sda.Fill(dtH);
            this.Hide();
            Form f = new ModificarHotel(dtH);

            limpiarTodo();
            f.ShowDialog();
            this.Show();
        }