Example #1
0
 public void Sort(SnookerVenuesPlayedSortEnum sort)
 {
     this.SortType = sort;
     this.updateSortButton();
     if (this.AllVenues != null)
     {
         base.Fill(SnookerVenuePlayed.Sort(AllVenues, SortType).ToList());
     }
 }
Example #2
0
 public static List <SnookerVenuePlayed> Sort(List <SnookerVenuePlayed> list, SnookerVenuesPlayedSortEnum sort)
 {
     if (sort == SnookerVenuesPlayedSortEnum.ByName)
     {
         return((from i in list
                 orderby i.Venue.Name
                 select i).ToList());
     }
     if (sort == SnookerVenuesPlayedSortEnum.ByCount)
     {
         return((from i in list
                 orderby i.CountMatches + i.CountBests descending, i.Venue.Name
                 select i).ToList());
     }
     return(list);
 }