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; }
public EnderecoRepository(ProjetoSocialEntities objempcontext) { DBcontext = objempcontext; }
public LoginRepository(ProjetoSocialEntities objempcontext) { this.DBcontext = objempcontext; }
public VacinacaoRepository(ProjetoSocialEntities objempcontext) { DBcontext = objempcontext; }
public ContatoRepository(ProjetoSocialEntities objempcontext) { DBcontext = objempcontext; }