Пример #1
0
        private void buttonNuevoHotel_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Se pasa a crear un nuevo hotel", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.Hide();
            FormNewHotel formHotel = new FormNewHotel();

            formHotel.ShowDialog();
        }
Пример #2
0
 private void buttonEditar_Click(object sender, EventArgs e)
 {
     if (this.dataGridViewHoteles.SelectedRows.Count == 1)
     {
         MessageBox.Show("Se pasa a editar el hotel", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.idHotelSeleccionado = Int32.Parse(dataGridViewHoteles.SelectedRows[0].Cells[0].Value.ToString());
         this.Hide();
         FormNewHotel formHotel = new FormNewHotel(idHotelSeleccionado);
         formHotel.ShowDialog();
     }
     else
     {
         MessageBox.Show("Debe seleccionar un hotel", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }