Beispiel #1
0
 /// <summary>
 /// Get listeners ordered by waller or surname
 /// </summary>
 /// <param name="ordering"></param>
 /// <returns></returns>
 public List <Listener> GetOrderedListeners(OrderVar ordering)
 {
     if (ordering.Equals(OrderVar.SURNAME))
     {
         return(repoLayer.GetListeners(connection).OrderBy(x => x.Surname).ToList());
     }
     else
     {
         return(repoLayer.GetListeners(connection).OrderBy(x => x.Wallet).ToList());
     }
 }
Beispiel #2
0
        public void refreshList()
        {
            clearList();

            List <Listener> theListeners = new List <Listener>();

            if (deletedMode)
            {
                theListeners = serviceLayer.GetListenersByStatus(ListenerStates.DELETED).Skip(offset).Take(limit).ToList();
            }
            else
            {
                OrderVar order = cmbOrder.Text.Equals("Wallet") ? OrderVar.WALLET : OrderVar.SURNAME;
                theListeners = serviceLayer.GetOrderedListeners(order).Skip(offset).Take(limit).ToList();
            }

            foreach (Listener tListener in theListeners)
            {
                addToListeners(tListener);
            }
        }