Example #1
0
        public void ValidarCadastro(string rua, string numero, string cep, string idbairro, string idcliente)
        {
            try
            {
                Endereco novo = new Endereco(rua,numero,cep,int.Parse(idbairro),int.Parse(idcliente));
                enderecodados.Inserir(novo);

            }
            catch (Exception e)
            {
                throw e;
            }
        }
Example #2
0
        public static void ValidacaoGeral(string nome, string email, string cpf, string rg, string tel1, string tel2, string rua, string numero, string cep, string idbairro)
        {
            ClienteRN validador = new ClienteRN();
            ClienteDao clienteDados = new ClienteDao();

            if (validador.ValidarCPF(cpf) & validador.ValidarTelefone(tel1) & validador.ValidarTelefone(tel2)
                & validador.ValidarEmail(email) & validador.ValidarCEP(cep))
            {
                try
                {
                    Cliente cl = new Cliente(nome, email, cpf, rg);
                    Telefone tel = new Telefone(tel1, tel2);
                    Endereco end = new Endereco(rua, numero, cep, int.Parse(idbairro));
                    clienteDados.InserirCompleto(cl, end, tel);
                }
                catch (OracleException e)
                {
                    throw e;
                }
            }
        }
Example #3
0
 public void ValidarCadastro(string nome, string email, string cpf, string rg, string tel1, string tel2, string rua, string numero, string cep, string idbairro)
 {
     try
     {
         Cliente cl = new Cliente(nome, email, cpf, rg);
         Telefone tel = new Telefone(tel1, tel2);
         Endereco end = new Endereco(rua, numero, cep, int.Parse(idbairro));
         clienteDados.InserirCompleto(cl, end, tel);
     }
     catch (OracleException e)
     {
         throw e;
     }
 }