예제 #1
0
        public static List <Familia> GetAllAdapted()
        {
            List <Familia> varDataTable;

            try
            {
                FamiliaCollectionAdapter adapter    = new FamiliaCollectionAdapter(FamiliaFacade.SelectAll());
                List <Familia>           collection = new List <Familia>();
                adapter.Fill(collection);
                varDataTable = collection;
            }
            catch (ExceptionDAL dalex)
            {
                throw new ExceptionBLL(dalex, dalex.Message);
            }
            return(varDataTable);
        }
예제 #2
0
        public static Familia GetAdapted(string IdFamiliaElement)
        {
            Familia varDataTable;

            try
            {
                FamiliaAdapter adapter = new FamiliaAdapter(FamiliaFacade.Select(IdFamiliaElement));
                Familia        _object = new Familia();
                adapter.Fill(_object);
                varDataTable = _object;
            }
            catch (ExceptionDAL dalex)
            {
                throw new ExceptionBLL(dalex, dalex.Message);
            }
            return(varDataTable);
        }