public int CountTagNotifications() { NewsfeedDAL newsFeedDAL = new NewsfeedDAL(); NotificationDAL notificationDAL = new NotificationDAL(); List <Notification> NotificationsList = new List <Notification>(); NotificationsList = notificationDAL.GetTagNotificationsForAMember(aMember); return(NotificationsList.Count); }
public string TagNotifications() { string notification = ""; NewsfeedDAL newsFeedDAL = new NewsfeedDAL(); NotificationDAL notificationDAL = new NotificationDAL(); List <Notification> NotificationsList = new List <Notification>(); NotificationsList = notificationDAL.GetTagNotificationsForAMember(aMember); for (int i = 0; i < NotificationsList.Count; ++i) { #region TagRating //memberlist List <Member> MemberList = new List <Member>(); Member aFriend = new Member(NotificationsList[i].MemberId); MemberList = notificationDAL.GetMemberDisplayName(aFriend); string FriendDisplayName = MemberList[0].DisplayName; //memberslist List <Member> PostOwnerMemberList = new List <Member>(); Post aPost = new Post(NotificationsList[i].PostId); PostOwnerMemberList = notificationDAL.GetPostOwner(aPost); List <Post> PostList = new List <Post>(); PostList = notificationDAL.GetPostCreateDate(aPost); string memberLoggedOn = aMember.MemberId; if (memberLoggedOn == PostOwnerMemberList[0].MemberId) { notification += FriendDisplayName + " tagged you on your post which you posted " + FormatDateTime(PostList[0].CreateDate) + " \n\n"; } else if (FriendDisplayName == PostOwnerMemberList[0].DisplayName) { notification += "You were tagged on " + PostOwnerMemberList[0].DisplayName + "'s post by " + FriendDisplayName + " " + FormatDateTime(PostList[0].CreateDate) + "\n\n"; } else { notification += FriendDisplayName + " tagged you on " + PostOwnerMemberList[0].DisplayName + "'s post which was posted " + FormatDateTime(PostList[0].CreateDate) + " \n\n"; } #endregion } return(notification); }
public string TagNotifications() { string notification = ""; NewsfeedDAL newsFeedDAL = new NewsfeedDAL(); NotificationDAL notificationDAL = new NotificationDAL(); List<Notification> NotificationsList = new List<Notification>(); NotificationsList = notificationDAL.GetTagNotificationsForAMember(aMember); for (int i = 0; i < NotificationsList.Count; ++i) { #region TagRating //memberlist List<Member> MemberList = new List<Member>(); Member aFriend = new Member(NotificationsList[i].MemberId); MemberList = notificationDAL.GetMemberDisplayName(aFriend); string FriendDisplayName = MemberList[0].DisplayName; //memberslist List<Member> PostOwnerMemberList = new List<Member>(); Post aPost = new Post(NotificationsList[i].PostId); PostOwnerMemberList = notificationDAL.GetPostOwner(aPost); List<Post> PostList = new List<Post>(); PostList = notificationDAL.GetPostCreateDate(aPost); string memberLoggedOn = aMember.MemberId; if (memberLoggedOn == PostOwnerMemberList[0].MemberId) { notification += FriendDisplayName + " tagged you on your post which you posted " + FormatDateTime(PostList[0].CreateDate) + " \n\n"; } else if (FriendDisplayName == PostOwnerMemberList[0].DisplayName) { notification += "You were tagged on " + PostOwnerMemberList[0].DisplayName + "'s post by " + FriendDisplayName + " " + FormatDateTime(PostList[0].CreateDate) + "\n\n"; } else { notification += FriendDisplayName + " tagged you on " + PostOwnerMemberList[0].DisplayName + "'s post which was posted " + FormatDateTime(PostList[0].CreateDate) + " \n\n"; } #endregion } return notification; }
public int CountTagNotifications() { NewsfeedDAL newsFeedDAL = new NewsfeedDAL(); NotificationDAL notificationDAL = new NotificationDAL(); List<Notification> NotificationsList = new List<Notification>(); NotificationsList = notificationDAL.GetTagNotificationsForAMember(aMember); return NotificationsList.Count; }