Example #1
0
        protected void Reload()
        {
            TextGrupo.MaxLength      = 20;
            TextFornecedor.MaxLength = 20;
            TextCNPJ.MaxLength       = 20;
            TextCEP.MaxLength        = 50;
            TextRua.MaxLength        = 100;
            TextRazao.MaxLength      = 100;
            _ler = new LerSelect();
            var Dt = _ler.LerFornecedor();

            if (Dt != null)
            {
                GridFornecedor.DataSource = Dt.ValDataTable;
                GridFornecedor.DataBind();
            }
            _ler = new LerSelect();
            var DtEstado = _ler.LerDropEstado();

            if (DtEstado != null && DropEstado.Text == "")
            {
                DropEstado.DataTextField = "Estados";
                DropEstado.DataSource    = DtEstado.ValDataTable;
                DropEstado.DataBind();
                DropEstado.AppendDataBoundItems = true;
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dt = new Functions().CarregaTabelas("SELECT * FROM Fornecedor");

            GridFornecedor.DataSource = dt;
            GridFornecedor.DataBind();

            DataTable dt1 = new Functions().CarregaTabelas("SELECT * FROM Empresa");

            GridEmpresas.DataSource = dt1;
            GridEmpresas.DataBind();
        }
Example #3
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (txtFiltroFornecedor.Text != "")
     {
         DataTable dtatualizado = new Functions().CarregaTabelas("SELECT * FROM FORNECEDOR WHERE " + drpFiltros.SelectedItem.Value + "='" + txtFiltroFornecedor.Text + "'");
         GridFornecedor.DataSource = dtatualizado;
         GridFornecedor.DataBind();
     }
     else
     {
         DataTable dtatualizado = new Functions().CarregaTabelas("SELECT * FROM FORNECEDOR");
         GridFornecedor.DataSource = dtatualizado;
         GridFornecedor.DataBind();
     }
 }
Example #4
0
 private void Exibir()
 {
     GridFornecedor.DataSource = fornecedorBLL.BuscarTodos();
     GridFornecedor.DataBind();
 }