コード例 #1
0
        public void RemoveNotification(Guid?To, Guid?From)
        {
            var dao = new ChatDAO();

            dao.ChangeStatus(To, From);
            NotificationWithUser = dao.GetMessage().Where(x => x.MESSAGE_To == To && x.MESSAGE_From == From && x.MESSAGE_Status == false).Count();
            Notification         = dao.GetMessage().Where(x => x.MESSAGE_To == To && x.MESSAGE_Status == false).Count();
            Clients.All.broadcastNotification(Notification, To);
        }
コード例 #2
0
        public void LoadNotificationMessageWithUser(Guid?From, Guid?To)
        {
            var dao = new ChatDAO();

            // Call the broadcastMessage method to update clients.
            NotificationWithUser = dao.GetMessage().Where(x => x.MESSAGE_To == To && x.MESSAGE_From == From && x.MESSAGE_Status == false).Count();
            Clients.All.broadcastNotificationMessageWithUser(NotificationWithUser, From, To);
        }