Пример #1
0
        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()));
            }
        }
Пример #2
0
 public PessoaRepository(ProjetoSocialEntities objempcontext)
 {
     DBcontext = objempcontext;
 }
Пример #3
0
 public AnimalRepository(ProjetoSocialEntities objempcontext)
 {
     DBcontext = objempcontext;
 }
Пример #4
0
 public EnderecoRepository(ProjetoSocialEntities objempcontext)
 {
     DBcontext = objempcontext;
 }
Пример #5
0
 public LoginRepository(ProjetoSocialEntities objempcontext)
 {
     this.DBcontext = objempcontext;
 }
Пример #6
0
 public VacinacaoRepository(ProjetoSocialEntities objempcontext)
 {
     DBcontext = objempcontext;
 }
Пример #7
0
 public ContatoRepository(ProjetoSocialEntities objempcontext)
 {
     DBcontext = objempcontext;
 }