コード例 #1
0
 private Usuario HidratarReclutador(ProcesoSeleccion procesoSeleccion)
 {
     using (SQLContexto contexto = new SQLContexto())
     {
         UsuarioRepo usuarioRepo = new UsuarioRepo(contexto);
         return(usuarioRepo.Traer(procesoSeleccion.Reclutador));
     }
 }
コード例 #2
0
 private Usuario HidratarUsuario(Entrevista entrevista)
 {
     using (SQLContexto contexto = new SQLContexto())
     {
         UsuarioRepo usuarioRepo = new UsuarioRepo(contexto);
         return(usuarioRepo.Traer(entrevista.Entrevistador));
     }
 }
コード例 #3
0
 public Usuario Traer(string Legajo)
 {
     using (SQLContexto contexto = new SQLContexto())
     {
         UsuarioRepo usuarioRepo = new UsuarioRepo(contexto);
         return(usuarioRepo.Traer(new Usuario {
             Legajo = Legajo
         }));
     }
 }
コード例 #4
0
        public static bool Login(string Legajo, string Password)
        {
            using (SQLContexto contexto = new SQLContexto())
            {
                UsuarioRepo usuarioRepo = new UsuarioRepo(contexto);
                Usuario     usuario     = usuarioRepo.Traer(new Usuario {
                    Legajo = Legajo
                });

                if (usuario == null)
                {
                    return(false);
                }

                if (usuario.Password != Password)
                {
                    return(false);
                }

                UsuarioSistema = usuario;
            }

            return(true);
        }