protected void Page_Load(object sender, EventArgs e) { try { lblMsj.Text = ""; if (!IsPostBack) { foreach (Hotel h in LogicaHotel.ListaHoteles()) { lstHoteles.Items.Add(h.Nombre); } } } catch (Exception ex) { lblMsj.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { try { btnHab.Enabled = false; gvHabActivas.DataSource = LogicaHabitacion.ConReservasActivas(); gvHabActivas.DataBind(); foreach (Hotel h in LogicaHotel.ListaHoteles()) { lstHoteles.Items.Add(h.Nombre); } } catch (Exception ex) { lblMsj.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { foreach (Hotel h in LogicaHotel.ListaHoteles()) { lstHoteles.Items.Add(h.Nombre); } foreach (Control item in listaRequeridos()) { if (item is TextBox && item.ID != "txtNumeroHab") { ((TextBox)item).Enabled = false; } } } } catch (Exception ex) { lblMsj.Text = ex.Message; } }