Exemple #1
0
        public List <StatusUpdate> GetStatusToShow(Account Account)
        {
            LogUtil.Logger.Writeln("GetStatusToShow: ");
            List <Account>      listFriend = new List <Account>();
            List <StatusUpdate> list       = new List <StatusUpdate>();

            listFriend = _friendService.GetListFriendByAccount(Account.AccountID);
            List <StatusUpdate> listStatus = new List <StatusUpdate>();

            foreach (Account friend in listFriend)
            {
                list = _StatusUpdateService.GetStatusUpdateByID(Account, friend, true);
                listStatus.AddRange(list);
            }
            list = _StatusUpdateService.GetStatusUpdateByID(Account, Account, true);
            listStatus.AddRange(list);
            listStatus.Sort(new Comparison <StatusUpdate>((st1, st2) => st2.CreateDate.CompareTo(st1.CreateDate)));
            LogUtil.Logger.Writeln(".  - GetStatusToShow return count: " + listStatus.Count.ToString());
            return(listStatus);
        }
Exemple #2
0
 public List <StatusUpdate> GetStatusToShow(Account AccountViewer, Account AccountBeingViewer)
 {
     //List<Account> listFriend = new List<Account>();
     //listFriend = _friendService.GetListFriendByAccount(AccountBeingViewer.AccountID);
     return(_StatusUpdateService.GetStatusUpdateByID(AccountViewer, AccountBeingViewer, false));
 }