Example #1
0
        public string MessageNotifications()
        {
            string notification = "";

            NotificationDAL notificationDAL = new NotificationDAL();

            List <Notification> NotificationsList = new List <Notification>();

            NotificationsList = notificationDAL.GetMessageNotificationForAMember(aMember);

            for (int i = 0; i < NotificationsList.Count; ++i)
            {
                List <Member> MemberList = new List <Member>();
                Member        aFriend    = new Member(NotificationsList[i].MemberId);
                MemberList = notificationDAL.GetMemberDisplayName(aFriend);

                Message aMessage = new Message(NotificationsList[i].MessageId);


                aMessage = notificationDAL.GetMessageDateTime(aMessage);

                notification += MemberList[0].DisplayName + " sent you a message at " + FormatDateTime(aMessage.DateTime) + "\n\n";
            }
            return(notification);
        }
Example #2
0
        public string MessageNotifications()
        {
            string notification = "";

            NotificationDAL notificationDAL = new NotificationDAL();

            List<Notification> NotificationsList = new List<Notification>();
            NotificationsList = notificationDAL.GetMessageNotificationForAMember(aMember);

            for (int i = 0; i < NotificationsList.Count; ++i)
            {
                List<Member> MemberList = new List<Member>();
                Member aFriend = new Member(NotificationsList[i].MemberId);
                MemberList = notificationDAL.GetMemberDisplayName(aFriend);

                Message aMessage = new Message(NotificationsList[i].MessageId);

                aMessage = notificationDAL.GetMessageDateTime(aMessage);

                notification += MemberList[0].DisplayName + " sent you a message at " + FormatDateTime(aMessage.DateTime) + "\n\n";
            }
            return notification;
        }