private void AgregarHab_Click(object sender, EventArgs e) { nBuscador = 3; string idRegimen; if (ComboRegimen.SelectedIndex == -1) { idRegimen = "NULL"; } else { idRegimen = (ComboRegimen.SelectedItem as ABM_de_Regimen.Regimen).id.ToString(); } DialogResult agregado = new BuscarHabitacionLibre(this,idHotelActual, DesdePick.Value.ToShortDateString(), HastaPick.Value.ToShortDateString(),idRegimen,'G').ShowDialog(); }
private void AddHabitacion_Click(object sender, EventArgs e) { nBuscador = 2; string reg; if (CbRegimen.SelectedIndex == -1) reg = "NULL"; else reg = (CbRegimen.SelectedItem as Regimen).id.ToString(); DialogResult agregado = new BuscarHabitacionLibre(this, idHotel, Desde.Value.ToShortDateString(), Hasta.Value.ToShortDateString(), reg,'M').ShowDialog(); if (agregado == DialogResult.OK) { validarOtrasHabitaciones(); } }