private void boton_modificacion_Click(object sender, EventArgs e) { if (dgv_Habitaciones.SelectedRows.Count > 0) { if (!estado) { if (MessageBox.Show("La habitación se encuentra inhabilitada, desea darle de alta?", "FOUR SIZONS - FRBA Hoteles", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { string modo = "UPD"; this.Hide(); ABMHabitacion02 formABMHabitacion02 = new ABMHabitacion02(modo, dgv_hotel_ID, dgv_habitacion_ID); formABMHabitacion02.ShowDialog(); this.Show(); this.buscar(); this.iniciarGrilla(); } } else { string modo = "UPD"; this.Hide(); ABMHabitacion02 formABMHabitacion02 = new ABMHabitacion02(modo, dgv_hotel_ID, dgv_habitacion_ID); formABMHabitacion02.ShowDialog(); this.Show(); this.buscar(); this.iniciarGrilla(); } } else { MessageBox.Show("Debe seleccionar una habitación de la grilla primero", "FOUR SIZONS - FRBA Hoteles", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void boton_alta_Click(object sender, EventArgs e) { if (error == 0) { string modo = "INS"; this.Hide(); ABMHabitacion02 formABMHabitacion02 = new ABMHabitacion02(modo, hotel, dgv_habitacion_ID); formABMHabitacion02.ShowDialog(); this.Show(); this.buscar(); this.iniciarGrilla(); } }
private void boton_baja_Click(object sender, EventArgs e) { if (dgv_Habitaciones.SelectedRows.Count > 0) { if (!estado) { MessageBox.Show("No puede dar de baja a una habitación dada de baja", "FOUR SIZONS - FRBA Hoteles", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { string modo = "DLT"; this.Hide(); ABMHabitacion02 formABMHabitacion02 = new ABMHabitacion02(modo, dgv_hotel_ID, dgv_habitacion_ID); formABMHabitacion02.ShowDialog(); this.Show(); this.buscar(); this.iniciarGrilla(); } } else { MessageBox.Show("Debe seleccionar una habitación de la grilla primero", "FOUR SIZONS - FRBA Hoteles", MessageBoxButtons.OK, MessageBoxIcon.Information); } }