public void CargarArticulos()
        {
            clsArticulos colArticulos = new clsArticulos();

            cbArticulos.DataSource = colArticulos.GetAll();
            cbArticulos.DataBind();

            colArticulos = null;
        }
        public void CargarArticulos()
        {
            clsArticulos colArticulos = new clsArticulos();

            cbArticulos.DataSource = colArticulos.GetAll();
            cbArticulos.DataBind();
            //ddlClientes.Items.Insert(0, new ListItem("[TODOS]", "0"));

            colArticulos = null;
        }
        public void CargarArticulos()
        {
            int PrvCod = 0;
            clsArticulos colArticulos = new clsArticulos();

            if (cboxProveedores.SelectedIndex != -1)
                PrvCod = int.Parse(cboxProveedores.SelectedValue);

            if (PrvCod == 0)
                cboxArticulos.DataSource = colArticulos.GetAll();
            else
                cboxArticulos.DataSource = colArticulos.GetArticulosByPrvCod(PrvCod);
            cboxArticulos.DataBind();
            cboxArticulos.Items.Insert(0, new ListItem("[TODOS]", "0"));
            colArticulos = null;
        }
        private void IniciarCamposArticulos(string cTipo = "NORMAL")
        {
            LimpiarCamposArticulos();

            lblEstadoVenArticulo.Value = cTipo;
            txtArtPreUnitario.Attributes.Add("onFocus", "JavaScript:this.select();");
            txtArtDescuento.Attributes.Add("onFocus", "JavaScript:this.select();");
            txtArtCant.Attributes.Add("onFocus", "JavaScript:this.select();");
            txtImpTotal.Attributes.Add("onFocus", "JavaScript:this.select();");

            clsProveedores lstProveedores = new clsProveedores();
            ddlLaboratorios.DataSource = lstProveedores.GetAll();
            ddlLaboratorios.DataBind();
            ddlLaboratorios.Items.Insert(0,new ListItem("Todos", "-1"));

            clsArticulos oArticulos = new clsArticulos();
            lsbArticulos.DataSource = oArticulos.GetAll();
            lsbArticulos.DataBind();

            if (lsbArticulos.Items.Count == 0) {
                lsbArticulos.Items.Add(new ListItem("No existen Articulos en Stock","0"));
            }

            if (cTipo == "ESPECIAL")
            {
                TablaArtLeft.Visible = false;

                txtArtPreUnitario.Enabled = true;
                txtArtCant.Enabled = false;
                txtLotVenci.Enabled = false;
                btnGuardarPrecio.Visible = true;
                btnAgregarArticulo.Visible = false;
            }
            else {
                TablaArtLeft.Visible = true;

                txtArtCant.Enabled = true;
                txtLotVenci.Enabled = true;
                btnGuardarPrecio.Visible = false;
                btnAgregarArticulo.Visible = true;
            }
        }
        protected void ddlLaboratorios_SelectedIndexChanged(object sender, EventArgs e)
        {
            clsArticulos oArticulos = new clsArticulos();
            int PrvCod =Int32.Parse(ddlLaboratorios.SelectedValue);

            if (PrvCod == -1)
                lsbArticulos.DataSource = oArticulos.GetAll();
            else
                lsbArticulos.DataSource = oArticulos.GetArticulosByPrvCod(PrvCod);
            lsbArticulos.DataBind();
            if (lsbArticulos.Items.Count == 0)
            {
                lsbArticulos.Items.Add(new ListItem("Este Proveedor no tiene Articulos", "0"));
            }
            oArticulos = null;
            ModalPopupAgregar.Show();
        }