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

        switch (cmb_articulo.SelectedValue)
        {
            case "01":
                BE.articidold = txt_buscar.Text.Trim().ToUpper();
                break;
            case "02":
                BE.articname = txt_buscar.Text.Trim().ToUpper();
                break;
            default:
                //**
                break;
        }
        try
        {
            //Eliminar Columnas Actuales(Opcional):
            dgb_articulo.Columns.Clear();
            dgb_articulo.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;
            dgb_articulo.Columns.Add(image);

            BoundField ARTICID;
            ARTICID = new BoundField();
            ARTICID.DataField = "articid";
            ARTICID.HeaderText = "CODIGO";
            ARTICID.ItemStyle.Width = 50;
            dgb_articulo.Columns.Add(ARTICID);

            BoundField ARTICIDOLD;
            ARTICIDOLD = new BoundField();
            ARTICIDOLD.DataField = "articidold";
            ARTICIDOLD.HeaderText = "CODIGO";
            ARTICIDOLD.ItemStyle.Width = 80;
            dgb_articulo.Columns.Add(ARTICIDOLD);

            BoundField ARTICNAME;
            ARTICNAME = new BoundField();
            ARTICNAME.DataField = "articname";
            ARTICNAME.HeaderText = "ARTICULO";
            ARTICNAME.ItemStyle.Width = 250;
            dgb_articulo.Columns.Add(ARTICNAME);
            BE.top = true;
            //BE.vendorid = txt_vendorid.Value.ToString();
            dt = BL.GetAll(Session["ssEmpresaID"].ToString(), BE).Tables[0];
            if (dt.Rows.Count > 0)
            {
                dgb_articulo.DataSource = dt;
                dgb_articulo.DataBind();
                dgb_articulo.Visible = true;
            }
        }
        catch (Exception ex)
        {
            throw ex;// ClientMessage(ex.Message);
        }
    }
    private void MetodoCargarLineal()
    {
        tb_pt_articuloWebBL BL = new tb_pt_articuloWebBL();
        tb_pt_articulo BE = new tb_pt_articulo();
        DataTable dt = new DataTable();
        BE.articidold = txt_articidold.Text.ToUpper();
        dt = BL.GetAll(Session["ssEmpresaID"].ToString(), BE).Tables[0];

        if (dt.Rows.Count > 0)
        {
            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();
            // Metodos De Cargar Combos
            CargarComboArticuloColor(dt.Rows[0]["articid"].ToString());
            CargarComboArticuloTallas(dt.Rows[0]["tallaid"].ToString());

            btn_add.Enabled = true;
            btn_add.CssClass = "boton_add2";
        }
    }
    void cargar_grillaProd()
    {
        //tb_cxc_evalcredBL BL = new tb_cxc_evalcredBL();
            //tb_cxc_evalcred BE = new tb_cxc_evalcred();

            tb_pt_articuloWebBL BL = new tb_pt_articuloWebBL();
            tb_pt_articulo BE = new tb_pt_articulo();
            DataTable dt = new DataTable();
            //BE.articidold = txt_articidold.Text.ToUpper();
            BE.top = true;

            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 - 1; 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();
            }
    }
    private void data_gridArticulo()
    {
        tb_pt_articuloWebBL BL = new tb_pt_articuloWebBL();
        tb_pt_articulo BE = new tb_pt_articulo();
        DataTable dt = new DataTable();
        BE.articidold = txt_articidold.Text.ToUpper();

        switch (cbo_filtro.SelectedValue)
        {
            case "01":
                BE.articidold = txt_filter.Text.Trim().ToUpper();
                break;
            case "02":
                BE.articname = txt_filter.Text.Trim().ToUpper();
                break;
            default:
                //**
                break;
        }
        try
        {
            //Eliminar Columnas Actuales(Opcional):
            GridView1.Columns.Clear();
            GridView1.Width = 550;
            //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;
            GridView1.Columns.Add(image);

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

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

            GridView1.DataSource = BL.GetAll(Session["ssEmpresaID"].ToString(), BE);
            GridView1.DataBind();
            GridView1.Visible = true;
        }
        catch (Exception ex)
        {
            ClientMessage(ex.Message);
        }
    }