Esempio n. 1
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            string buscar = CampoBuscar.Text;

            prods = productoBLL.GetProductos(buscar);
            UpdateData();

            /*
             * foreach (Producto prod in productos)
             * {
             *
             *  Label label = new Label();
             *  label.Text = prod.Nombre;
             *  TextBox cantidad = new TextBox();
             *  cantidad.ID = "c"+prod.Codigo;
             *  cantidad.Attributes.Add("placeholder", "Ingrese la cantidad");
             *  Button btn = new Button();
             *  btn.Text = "Agergar";
             *  btn.Click += this.agregarProd;
             *
             *  System.Web.UI.HtmlControls.HtmlGenericControl div1 = new System.Web.UI.HtmlControls.HtmlGenericControl("DIV");
             *  System.Web.UI.HtmlControls.HtmlGenericControl div2 = new System.Web.UI.HtmlControls.HtmlGenericControl("DIV");
             *  div1.Attributes.Add("class", "col-2 mt-2");
             *  btn.Attributes.Add("data-codigo",prod.Codigo);
             *  div2.Attributes.Add("class", "col-10 text-left mt-2");
             *  div1.Controls.Add(label);
             *  div2.Controls.Add(cantidad);
             *  div2.Controls.Add(btn);
             *  resultSearch.Controls.Add(div1);
             *  resultSearch.Controls.Add(div2);
             *
             *
             *
             *
             * }
             */
        }