示例#1
0
        private void CarregarListaCliente()
        {
            Aula5Entities  context    = new Aula5Entities();
            List <CLIENTE> lstcliente = context.CLIENTE.ToList <CLIENTE>();



            GVCliente.DataSource = lstcliente;
            GVCliente.DataBind();
        }
        private void LoadGrid()
        {
            VendasDBEntities1 context    = new VendasDBEntities1();
            List <tb_cliente> lstcliente = context.tb_cliente.ToList <tb_cliente>();
            int cont = 0;

            do
            {
                foreach (var item in lstcliente)
                {
                    string cpf    = Convert.ToString(item.cli_cpf.ToString());
                    string digito = IsCpf(cpf);

                    item.cli_cpf = Convert.ToInt64(cpf + digito);
                }
                cont++;
            } while (cont <= (lstcliente.Count) + 1);


            GVCliente.DataSource = lstcliente;
            GVCliente.DataBind();
        }
        private void LoadGrid()
        {
            Aula5Entities  context    = new Aula5Entities();
            List <CLIENTE> lstcliente = context.CLIENTE.ToList <CLIENTE>();
            int            cont       = 0;

            do
            {
                foreach (var item in lstcliente)
                {
                    string cpf    = Convert.ToString(item.cpf.Value);
                    string digito = IsCpf(cpf);

                    item.cpf = Convert.ToInt64((cpf + digito).Substring(0, 11));
                }
                cont++;
            } while (cont <= (lstcliente.Count) + 1);


            GVCliente.DataSource = lstcliente;
            GVCliente.DataBind();
        }
示例#4
0
 private void LoadGrid()
 {
     GVCliente.DataSource = new ClienteDB().GetAll();
     GVCliente.DataBind();
 }