private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { int rowIndex = e.RowIndex; DataGridViewRow row = dgvHabitaciones.Rows[rowIndex]; string hotel = row.Cells[0].Value.ToString(); string piso = row.Cells[1].Value.ToString(); string numero = row.Cells[2].Value.ToString(); bool habilitado = Convert.ToBoolean(row.Cells[3].Value); abmHabitacion frmambHab = new abmHabitacion(hotel, piso, numero, habilitado, ""); frmambHab.Show(); }
private void btnAgregar_Click(object sender, EventArgs e) { abmHabitacion frmambHab = new abmHabitacion("", "", "", false, ""); frmambHab.Show(); }