Beispiel #1
0
        public static List <Newsfeed> getNewsfeedByUserId(string UserId, int top, int type)
        {
            List <Newsfeed> lstNewsfeed       = new List <Newsfeed>();
            List <Newsfeed> lstWallfeed       = new List <Newsfeed>();
            List <Newsfeed> lstNewsfeedSorted = new List <Newsfeed>();

            lstNewsfeed = WallDAL.getNewsfeedByUserId(UserId, top);
            if (type == 1)
            {
                lstNewsfeed = RankNewsFeed(lstNewsfeed);
            }


            lstWallfeed = WallDAL.getWallFeedByUserId(UserId, top);
            lstNewsfeed.AddRange(lstWallfeed);

            if (type == 1)//top stories
            {
                var result = from em in lstNewsfeed
                             orderby em.AddedDate descending
                             orderby em.PostRank descending
                             select em;
                foreach (var em in result)
                {
                    lstNewsfeedSorted.Add(em);
                }
            }
            else
            {
                var result = from em in lstNewsfeed
                             orderby em.AddedDate descending

                             select em;
                foreach (var em in result)
                {
                    lstNewsfeedSorted.Add(em);
                }
            }

            return(lstNewsfeedSorted);
        }
Beispiel #2
0
 public static List <Wall> getSeeFriendShipWall(string FUserId, string UserId, int top)
 {
     return(WallDAL.getSeeFriendShipWall(FUserId, UserId, top));
 }
Beispiel #3
0
 public static List <Wall> getWallByUserIdAndFriendID(string UserId, string FriendID, int top)
 {
     return(WallDAL.getWallByUserIdAndFriendID(UserId, FriendID, top));
 }
Beispiel #4
0
 public static void updateLiteral(string wallid, string postval, string embedval)
 {
     WallDAL.updateLiteral(wallid, postval, embedval);
 }
Beispiel #5
0
 public static List <Wall> getWallByUserId(string UserId, int top)
 {
     return(WallDAL.getWallByUserId(UserId, top));
 }
Beispiel #6
0
 public static List <Wall> getAllWallList()
 {
     return(WallDAL.getAllWallList());
 }
Beispiel #7
0
 public static WallBO getWallByWallId(string WallId)
 {
     return(WallDAL.getWallByWallId(WallId));
 }
Beispiel #8
0
 public static void deleteWall(string WallId)
 {
     WallDAL.deleteWall(WallId);
 }
Beispiel #9
0
 public static void updateWall(WallBO objWall)
 {
     WallDAL.updateWall(objWall);
 }
Beispiel #10
0
 public static void saveSubscriptions(string UserId, string FriendId, SubscriptionsBO sbo)
 {
     WallDAL.saveSubscriptions(UserId, FriendId, sbo);
 }
Beispiel #11
0
 public static string insertWall(WallBO objWall)
 {
     return(WallDAL.insertWall(objWall));
 }
Beispiel #12
0
 public static SubscriptionsBO getSubscriptions(string UserId, string FriendId)
 {
     return(WallDAL.getSubscriptions(UserId, FriendId));
 }
Beispiel #13
0
 public static bool Unsubscribe(string userid, string friendid, string type)
 {
     return(WallDAL.Unsubscribe(userid, friendid, type));
 }
Beispiel #14
0
 public static int getUpdatesType(string userId, string FriendId)
 {
     return(WallDAL.getUpdatesType(userId, FriendId));
 }
Beispiel #15
0
 public static bool setPostUpdatesType(string UserId, string FriendId, int Type)
 {
     return(WallDAL.setPostUpdatesType(UserId, FriendId, Type));
 }
Beispiel #16
0
 public static bool setPostStatus(string UserId, string PostedByUserId, string PostId, int Status)
 {
     return(WallDAL.setPostStatus(UserId, PostedByUserId, PostId, Status));
 }