Exemple #1
0
 public void SortBy(string field)
 {
     for (int i = 0; i < sortFields.Count; i++)
     {
         SortField sf = (SortField)sortFields[i];
         if (field.Equals(sf.GetField()))
         {
             if (i == 0)
             {
                 sf = new SortField(sf.GetField(), !sf.GetReverse());
             }
             sortFields.RemoveAt(i);
             sortFields.Insert(0, sf);
         }
     }
 }
Exemple #2
0
        public void SortBy(string field)
        {
            for (int i = 0; i < sortFields.Count; i++)
            {
                MySorterNode node = (MySorterNode)sortFields[i];
                SortField sf = node.Field;
                if (field.Equals(sf.GetField()))
                {
                    if (i == 0)
                    {
                        node.Field = new SortField(sf.GetField(), sf.GetType(), !sf.GetReverse());
                    }
                    sortFields.RemoveAt(i);
                    sortFields.Insert(0, node);

                }
            }
        }