Ejemplo n.º 1
0
 protected void btnBuscar_Click(object sender, EventArgs e)
 {
     if (ddlCategoria.SelectedItem.Text == "Tecnología")
     {
         rptEvento.DataSource = oProductoBLL.GetProductoByCategoria("Tec");
         rptEvento.DataBind();
     }
     if (ddlCategoria.SelectedItem.Text == "Comida")
     {
         rptEvento.DataSource = oProductoBLL.GetProductoByCategoria("Com");
         rptEvento.DataBind();
     }
     if (ddlCategoria.SelectedItem.Text == "Restaurante")
     {
         rptEvento.DataSource = oProductoBLL.GetProductoByCategoria("Res");
         rptEvento.DataBind();
     }
     if (ddlCategoria.SelectedItem.Text == "Ropa")
     {
         rptEvento.DataSource = oProductoBLL.GetProductoByCategoria("Rop");
         rptEvento.DataBind();
     }
     if (ddlCategoria.SelectedItem.Text == "Llantas")
     {
         rptEvento.DataSource = oProductoBLL.GetProductoByCategoria("Lla");
         rptEvento.DataBind();
     }
 }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Repeater1.DataSource = oProductoLogica.GetProductoByCategoria("Lla");
            Repeater1.DataBind();

            drop.DataSource     = oProductoLogica.GetProductoByCategoria("Lla");
            drop.DataTextField  = "Descripcion";
            drop.DataValueField = "ID";
            drop.DataBind();
            drop.Items.Insert(0, new ListItem("[Seleccionar]", "0"));
            Label1.Text = Session["NomAdmin"].ToString();
        }