Ejemplo n.º 1
0
        public ActionResult ValidaCadastro(string Nome, string SobreNome, 
            string Cpf, string Tel, string Cel,
            string Email, string Senha, string ConfirmSenha)
        {
            CamposCadastro CCadastro = new CamposCadastro();
            ParametrosCadastro PC = new ParametrosCadastro();

            string Retorn;

            Retorn = PC.ValidaCamposCadastros(Nome,SobreNome,Cpf,
                Tel.Replace("-",""),Cel.Replace("-",""),Email,Senha,ConfirmSenha);

            if (Retorn.Contains("ERRO") == true)
            {

                CCadastro.ResultadoCadastro = Retorn;

                return View("Cadastro", CCadastro);

            }
            else
            {

                Retorn = PC.InsereCadastro(Nome, SobreNome, Cpf.Replace(".","").Replace("-",""),
                    Tel.Replace("-", ""), Cel.Replace("-", ""), Email, Senha, ConfirmSenha);

                if (Retorn.Contains("ERRO") == true)
                {

                    CCadastro.ResultadoCadastro = Retorn;

                    return View("Cadastro", CCadastro);

                }

                Login log = new Login();

                log.Result = Retorn;

                return View("Entrar", log);

            }
        }
Ejemplo n.º 2
0
 public ActionResult Cadastro()
 {
     var cadastro = new CamposCadastro();
     return View(cadastro);
 }