private void data_gridArticulo()
    {
        //tb_pt_articuloWebBL BL = new tb_pt_articuloWebBL();
        //tb_pt_articulo BE = new tb_pt_articulo();
        tb_me_stockdiariocabBL BL = new tb_me_stockdiariocabBL();
        tb_me_stockdiariocab BE = new tb_me_stockdiariocab();
        DataTable dt = new DataTable();

        //BE.articidold = txt_articidold.Text.ToUpper();
        //BE.top = true;
        BE.valorfind = txt_filter2.Text;
        switch (cbo_filtro2.SelectedValue)
        {
            case "01":
                BE.articidold = txt_filter2.Text.Trim().ToUpper();
                break;
            case "02":
                BE.articname = txt_filter2.Text.Trim().ToUpper();
                break;
            default:
                //**
                break;
        }
        try
        {
            //Eliminar Columnas Actuales(Opcional):
            GridView2.Columns.Clear();
            GridView2.Width = 535;
            //Objeto Columna:
            CommandField image;
            //Crear Columna:
            image = new CommandField();
            image.ButtonType = ButtonType.Image;
            image.SelectImageUrl = "~/Images/go-search.png";
            image.ShowSelectButton = true;
            image.ItemStyle.Width = 10;
            image.ItemStyle.Wrap = true;
            GridView2.Columns.Add(image);

            BoundField ARTICIDOLD;
            ARTICIDOLD = new BoundField();
            ARTICIDOLD.DataField = "articidold";
            ARTICIDOLD.HeaderText = "CODIGO_OLD";
            ARTICIDOLD.ItemStyle.Width = 70;
            GridView2.Columns.Add(ARTICIDOLD);

            BoundField ARTICNAME;
            ARTICNAME = new BoundField();
            ARTICNAME.DataField = "articname";
            ARTICNAME.HeaderText = "ARTICULO";
            ARTICNAME.ItemStyle.Width = 250;
            GridView2.Columns.Add(ARTICNAME);

            dt = BL.GetAll(Session["ssEmpresaID"].ToString(), BE).Tables[0];
            GridView2.DataSource = dt;
            GridView2.DataBind();
            GridView2.Visible = true;
        }
        catch (Exception ex)
        {
            //ClientMessage(ex.Message);
            Response.Redirect("ErrorPage/Frm_PaginaError_405.aspx");
        }
    }
    private void MetodoCargarLineal(String xcodigo)
    {
        //tb_pt_articuloWebBL BL = new tb_pt_articuloWebBL();
        //tb_pt_articulo BE = new tb_pt_articulo();

        tb_me_stockdiariocabBL BL = new tb_me_stockdiariocabBL();
        tb_me_stockdiariocab BE = new tb_me_stockdiariocab();
        //tb_me_stockdiariocabBL BL = new tb_me_stockdiariocabBL();
        //tb_me_stockdiariocab BE = new tb_me_stockdiariocab();
        DataTable dt = new DataTable();
        BE.articidold = xcodigo.Trim();
        BE.valorfind = txt_filter2.Text.ToUpper();
        dt = BL.GetAll(Session["ssEmpresaID"].ToString(), BE).Tables[0];

        if (dt.Rows.Count > 0)
        {
            string old = dt.Rows[0]["articidold"].ToString();
            Session["bd_marcaid"] = dt.Rows[0]["marcaid"].ToString();
            txt_marcaname.Text = dt.Rows[0]["marcaname"].ToString();
            Session["bd_articid"] = dt.Rows[0]["articid"].ToString();
            txt_articname.Text = dt.Rows[0]["articname"].ToString();
            txt_precventa_cre_menor.Text = dt.Rows[0]["precventa_cre_menor"].ToString();
            Session["bd_tallaid"] = dt.Rows[0]["tallaid"].ToString();
            //Session["bd_coltall"] = dt.Rows[0]["coltall"].ToString();
            Session["bd_fecha"] = dt.Rows[0]["fecha"].ToString();
            HdFarticid.Value = dt.Rows[0]["articid"].ToString();
            // Metodos De Cargar Combos
            CargarComboArticuloColor(dt.Rows[0]["articid"].ToString());
            CargarComboArticuloTallas(dt.Rows[0]["tallaid"].ToString());
            btn_add.Enabled = true;
            btn_add.CssClass = "btn btn-success";

            //HdFtalla.Value = cmb_tallaid.SelectedValue;
            //string talla = HdFtalla.Value.ToString().Substring(5, 2);
            string color = cmb_colorid.SelectedValue;
            cmb_colorid.SelectedIndex = -1;
            //stkDisponible(talla.ToString(),color.ToString());
        }
    }
    void cargar_grillaProd(String valorfind)
    {
        tb_me_stockdiariocabBL BL = new tb_me_stockdiariocabBL ();
        tb_me_stockdiariocab BE = new tb_me_stockdiariocab();
        DataTable dt = new DataTable();

        BE.valorfind = valorfind.ToString();
        TablaProd = BL.GetAll(Session["ssEmpresaID"].ToString(), BE).Tables[0];

        DataTable dtDatos = new DataTable();
        if (TablaProd.Rows.Count > 0)
        {
            dtDatos.Columns.Add("articidold");
            dtDatos.Columns.Add("articname");
            dtDatos.Columns.Add("marcaid");
            dtDatos.Columns.Add("marcaname");
            dtDatos.Columns.Add("articid");
            dtDatos.Columns.Add("pvt_cremenor");
            dtDatos.Columns.Add("tallaid");

            string canalid = "";
            string canalname = "";
            for (int i = 0; i < TablaProd.Rows.Count; i++)
            {
                DataRow dtRow = dtDatos.NewRow();
                dtRow["articidold"] = TablaProd.Rows[i]["articidold"].ToString();
                dtRow["articname"] = TablaProd.Rows[i]["articname"].ToString();
                dtRow["marcaid"] = TablaProd.Rows[i]["marcaid"].ToString();
                dtRow["marcaname"] = TablaProd.Rows[i]["marcaname"].ToString();
                dtRow["articid"] = TablaProd.Rows[i]["articid"].ToString();
                dtRow["pvt_cremenor"] = TablaProd.Rows[i]["precventa_cre_menor"].ToString();
                dtRow["tallaid"] = TablaProd.Rows[i]["tallaid"].ToString();

                dtDatos.Rows.Add(dtRow);
            }
            GridViewProd.DataSource = dtDatos;
            GridViewProd.DataBind();
        }
    }