Ejemplo n.º 1
0
 public static Usuario GetAdapted(string nombreUsuario)
 {
     try
     {
         Usuario        usuario;
         UsuarioAdapter adapter = new UsuarioAdapter(UsuarioFacade.Select(nombreUsuario));
         Usuario        _object = new Usuario();
         adapter.Fill(_object);
         usuario = _object;
         return(_object);
     }
     catch (ExceptionDAL dalex)
     {
         throw new ExceptionBLL(dalex, dalex.Message);
     }
 }
Ejemplo n.º 2
0
        public static List <Usuario> GetAllAdapted(string nombre, string documento)
        {
            List <Usuario> varDataTable;

            try
            {
                UsuarioCollectionAdapter adapter    = new UsuarioCollectionAdapter(UsuarioFacade.SelectAll(nombre, documento));
                List <Usuario>           collection = new List <Usuario>();
                adapter.Fill(collection);
                varDataTable = collection;
            }
            catch (ExceptionDAL dalex)
            {
                throw new ExceptionBLL(dalex, dalex.Message);
            }
            return(varDataTable);
        }