Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Solo para Administradores
            if (Session["rol"] == null)
            {
                Response.Redirect("Inicio.aspx");
            }
            else
            {
                if (Session["rol"].ToString() != "Administrador")
                {
                    Response.Redirect("Inicio.aspx");
                }
            }
            #endregion

            if (!IsPostBack)
            {
                DDLServicios.DataSource     = Empresa.Instancia.Servicios;
                DDLServicios.DataValueField = "Nombre";
                // si no and usar el DataTextField
                DDLServicios.DataBind();
                DDLServicios.Items.Insert(0, new ListItem("Seleccione un Servicio", "0"));
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Solo para Organizadores
            if (Session["rol"] == null)
            {
                Response.Redirect("Inicio.aspx");
            }
            else
            {
                if (Session["rol"].ToString() != "Organizador")
                {
                    Response.Redirect("Inicio.aspx");
                }
            }
            #endregion


            if (!IsPostBack)
            {
                if (Session["usuario"] != null)
                {
                    DDLEventos.DataSource     = Empresa.Instancia.ListarEventosOrganizador(Session["usuario"].ToString());
                    DDLEventos.DataTextField  = "DatosVarios";
                    DDLEventos.DataValueField = "Fecha";
                    DDLEventos.DataBind();
                    DDLEventos.Items.Insert(0, new ListItem("Seleccione un Evento", "0"));
                }
                DDLServicios.DataSource     = Empresa.Instancia.Servicios;
                DDLServicios.DataValueField = "Nombre";
                DDLServicios.DataBind();
                DDLServicios.Items.Insert(0, new ListItem("Seleccione un Servicio", "0"));
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Solo para Organizadores
            if (Session["rol"] == null)
            {
                Response.Redirect("Inicio.aspx");
            }
            else
            {
                if (Session["rol"].ToString() != "Organizador")
                {
                    Response.Redirect("Inicio.aspx");
                }
            }
            #endregion


            if (!IsPostBack)
            {
                DDLServicios.DataSource     = Empresa.Instancia.Servicios;
                DDLServicios.DataValueField = "Nombre";
                DDLServicios.DataBind();
                DDLServicios.Items.Insert(0, new ListItem("Seleccione un Servicio", "0"));

                PnlComun.Visible   = false;
                PnlPremium.Visible = false;
            }

            if (Session["usuario"] != null)
            {
                LblMisDatos.Text = Empresa.Instancia.DatosDeOrganizador(Session["usuario"].ToString());
            }
        }
Exemplo n.º 4
0
 private void FillDDLServicos()
 {
     DDLServicios.DataSource     = LNServicioVehiculo.FillDDLServicio();
     DDLServicios.DataTextField  = "Descripción";
     DDLServicios.DataValueField = "ID_Servicio";
     DDLServicios.DataBind();
     DDLServicios.Items.Insert(0, "Seleccione un valor");
 }