public ActionResult Login(string usuario, string senha)
        {
            ProjetoSocialEntities objempcontext = new ProjetoSocialEntities();
            LoginRepository       log           = new LoginRepository(objempcontext);
            var vLogin = log.GetLoginByUserPass(usuario, senha);

            if (vLogin != null)
            {
                FormsAuthentication.SetAuthCookie(vLogin.Usuario, false);
                Session["Nome"]   = vLogin.Usuario;
                Session["Status"] = vLogin.Status;
                return(RedirectToAction("Index", "PainelAdministrativo"));
            }
            else
            {
                ModelState.Clear();
                ViewData["MensagemLogin"] = "******";
                return(View(new Login()));
            }
        }
 public PessoaRepository(ProjetoSocialEntities objempcontext)
 {
     DBcontext = objempcontext;
 }
 public AnimalRepository(ProjetoSocialEntities objempcontext)
 {
     DBcontext = objempcontext;
 }
Exemple #4
0
 public EnderecoRepository(ProjetoSocialEntities objempcontext)
 {
     DBcontext = objempcontext;
 }
Exemple #5
0
 public LoginRepository(ProjetoSocialEntities objempcontext)
 {
     this.DBcontext = objempcontext;
 }
Exemple #6
0
 public VacinacaoRepository(ProjetoSocialEntities objempcontext)
 {
     DBcontext = objempcontext;
 }
Exemple #7
0
 public ContatoRepository(ProjetoSocialEntities objempcontext)
 {
     DBcontext = objempcontext;
 }