示例#1
0
 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; }
 }
示例#2
0
    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; }
    }
示例#3
0
    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; }
    }