/// <summary> Retrieves Entity rows in a datatable which match the specified filter. It will always create a new connection to the database.</summary>
        /// <param name="selectFilter">A predicate or predicate expression which should be used as filter for the entities to retrieve.</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="relations">The set of relations to walk to construct to total query.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>DataTable with the rows requested.</returns>
        public static DataTable GetMultiAsDataTable(IPredicate selectFilter, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relations, int pageNumber, int pageSize)
        {
            TerritoryDAO dao = DAOFactory.CreateTerritoryDAO();

            return(dao.GetMultiAsDataTable(maxNumberOfItemsToReturn, sortClauses, selectFilter, relations, pageNumber, pageSize));
        }
예제 #2
0
        public Territories TraerUno(Territories nuevoTtr)
        {
            TerritoryDAO ttDao = new TerritoryDAO();

            return(ttDao.GetByDescription(nuevoTtr));
        }
예제 #3
0
        public int EliminarTerritorio(Territories nuevoTtr)
        {
            TerritoryDAO ttDao = new TerritoryDAO();

            return(ttDao.DeleteOne(nuevoTtr));
        }
예제 #4
0
        public int ModificarTerritorio(Territories nuevoTtr)
        {
            TerritoryDAO ttDao = new TerritoryDAO();

            return(ttDao.UpdateOne(nuevoTtr));
        }
예제 #5
0
        public List <Territories> TraerTodos()
        {
            TerritoryDAO ttDao = new TerritoryDAO();

            return(ttDao.GetAll());
        }
예제 #6
0
        public int AgregarUno(Territories nuevoTtr)
        {
            TerritoryDAO ttDao = new TerritoryDAO();

            return(ttDao.AddOne(nuevoTtr));
        }