Ejemplo n.º 1
0
        public void Add(string nome, string cpf)
        {
            Cliente c = new Cliente();

            c.Nome = nome;
            c.Cpf  = cpf;
            ClienteDAO dao = new ClienteDAO();

            dao.Add(c);
        }
Ejemplo n.º 2
0
        public bool Add(string nome, string cpf)
        {
            Cliente c = new Cliente();

            c.Nome = nome;
            c.CPF  = cpf;

            ClienteDAO dao = new ClienteDAO();

            dao.Add(c);

            return(true);
        }
Ejemplo n.º 3
0
        public bool Add(string nome, string cpf)
        {
            var result = false;

            try
            {
                var dao = new ClienteDAO();
                var cliente = new Cliente();
                cliente.CPF = cpf;
                cliente.Nome = nome;
                dao.Add(cliente);
                result = true;
            }
            catch
            {

            }

            return result;
        }