public int CountCommentNotifications() { NewsfeedDAL newsFeedDAL = new NewsfeedDAL(); NotificationDAL notificationDAL = new NotificationDAL(); List <Notification> NotificationsList = new List <Notification>(); NotificationsList = notificationDAL.GetCommentedOnPostNotification(aMember); return(NotificationsList.Count); }
public string CommentNotifications() { string notification = ""; NewsfeedDAL newsFeedDAL = new NewsfeedDAL(); NotificationDAL notificationDAL = new NotificationDAL(); List<Notification> NotificationsList = new List<Notification>(); NotificationsList = notificationDAL.GetCommentedOnPostNotification(aMember); for (int i = 0; i < NotificationsList.Count; ++i) { #region Comment notification //memberlist List<Member> MemberList = new List<Member>(); Member aFriend = new Member(NotificationsList[i].MemberId); MemberList = notificationDAL.GetMemberDisplayName(aFriend); string FriendDisplayName = MemberList[0].DisplayName; //memberslist MemberList = new List<Member>(); Post aPost = new Post(NotificationsList[i].PostId); MemberList = notificationDAL.GetPostOwner(aPost); List<Post> PostList = new List<Post>(); PostList = notificationDAL.GetPostCreateDate(aPost); List<Post> PostTypeList = new List<Post>(); PostTypeList = notificationDAL.GetPostType(aPost); string postType = ""; if (PostTypeList[0].PostType == "Event") { postType = "event"; } else if (PostTypeList[0].PostType == "Text") { postType = "post"; } else if (PostTypeList[0].PostType == "Photo") { postType = "photo"; } else if (PostTypeList[0].PostType == "Article") { postType = "article"; } else if (PostTypeList[0].PostType == "Video") { postType = "video"; } else if (PostTypeList[0].PostType == "File") { postType = "file post"; } notification += FriendDisplayName + " commented on your " + postType + " which you posted " + FormatDateTime(PostList[0].CreateDate) + " \n\n"; #endregion } return notification; }
public int CountCommentNotifications() { NewsfeedDAL newsFeedDAL = new NewsfeedDAL(); NotificationDAL notificationDAL = new NotificationDAL(); List<Notification> NotificationsList = new List<Notification>(); NotificationsList = notificationDAL.GetCommentedOnPostNotification(aMember); return NotificationsList.Count; }
public string CommentNotifications() { string notification = ""; NewsfeedDAL newsFeedDAL = new NewsfeedDAL(); NotificationDAL notificationDAL = new NotificationDAL(); List <Notification> NotificationsList = new List <Notification>(); NotificationsList = notificationDAL.GetCommentedOnPostNotification(aMember); for (int i = 0; i < NotificationsList.Count; ++i) { #region Comment notification //memberlist List <Member> MemberList = new List <Member>(); Member aFriend = new Member(NotificationsList[i].MemberId); MemberList = notificationDAL.GetMemberDisplayName(aFriend); string FriendDisplayName = MemberList[0].DisplayName; //memberslist MemberList = new List <Member>(); Post aPost = new Post(NotificationsList[i].PostId); MemberList = notificationDAL.GetPostOwner(aPost); List <Post> PostList = new List <Post>(); PostList = notificationDAL.GetPostCreateDate(aPost); List <Post> PostTypeList = new List <Post>(); PostTypeList = notificationDAL.GetPostType(aPost); string postType = ""; if (PostTypeList[0].PostType == "Event") { postType = "event"; } else if (PostTypeList[0].PostType == "Text") { postType = "post"; } else if (PostTypeList[0].PostType == "Photo") { postType = "photo"; } else if (PostTypeList[0].PostType == "Article") { postType = "article"; } else if (PostTypeList[0].PostType == "Video") { postType = "video"; } else if (PostTypeList[0].PostType == "File") { postType = "file post"; } notification += FriendDisplayName + " commented on your " + postType + " which you posted " + FormatDateTime(PostList[0].CreateDate) + " \n\n"; #endregion } return(notification); }