コード例 #1
0
ファイル: TelefoneRN.cs プロジェクト: UCLINF-20152-PI1/Alpha
        public void ValidarCadastro(string tel1, string tel2, string idcliente)
        {
            try
            {
                Telefone novo = new Telefone(tel1,tel2, int.Parse(idcliente));
                telefoneDados.Inserir(novo);

            }
            catch (Exception e)
            {
                throw e;
            }
        }
コード例 #2
0
ファイル: Gerais.cs プロジェクト: UCLINF-20152-PI1/Alpha
        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;
                }
            }
        }
コード例 #3
0
ファイル: ClienteRN.cs プロジェクト: UCLINF-20152-PI1/Alpha
 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;
     }
 }