예제 #1
0
        /// <summary>
        /// Ordena una lista
        /// </summary>
        /// <param name="list">Lista a ordenar</param>
        /// <param name="sortProperty">Campo de ordenación</param>
        /// <param name="sortDirection">Sentido de ordenación</param>
        /// <returns>Lista ordenada</returns>
        public static SortedBindingList <C> SortList(BusinessListBaseEx <T, C> list,
                                                     string sortProperty,
                                                     ListSortDirection sortDirection)
        {
            SortedBindingList <C> sortedList = new SortedBindingList <C>(list);

            sortedList.ApplySort(sortProperty, sortDirection);
            return(sortedList);
        }
예제 #2
0
 public static SortedBindingList <C> GetSortedList(BusinessListBaseEx <T, C> list)
 {
     return(new SortedBindingList <C>(list));
 }
예제 #3
0
        /// <summary>
        /// Devuelve una lista de los elementos del criterio
        /// </summary>
        /// <returns>Lista de elementos</returns>
        public static T GetList(CriteriaEx criteria)
        {
            BusinessListBaseEx <T, C> .BeginTransaction(criteria.SessionCode);

            return(DataPortal.Fetch <T>(criteria));
        }