Esempio n. 1
0
        public static bool bulk_send_message(Guid applicationId, Message message)
        {
            List <Message> lst = new List <Message>();

            lst.Add(message);
            return(MSGController.bulk_send_message(applicationId, lst));
        }
Esempio n. 2
0
        public static bool send_message(Guid applicationId,
                                        Guid senderUserId, Guid receiverUserId, string title, string messageText)
        {
            List <Guid> lst = new List <Guid>();

            lst.Add(receiverUserId);
            return(MSGController.bulk_send_message(applicationId, senderUserId, lst, title, messageText));
        }
Esempio n. 3
0
        public static bool bulk_send_message(Guid applicationId,
                                             Guid senderUserId, List <Guid> receiverUserIds, string title, string messageText)
        {
            List <User> _receiverUsers = new List <User>();

            foreach (Guid uId in receiverUserIds)
            {
                _receiverUsers.Add(new User()
                {
                    UserID = uId
                });
            }

            return(MSGController.bulk_send_message(applicationId, new Message()
            {
                MessageID = Guid.NewGuid(),
                SenderUserID = senderUserId,
                Title = title,
                MessageText = messageText,
                ReceiverUsers = _receiverUsers
            }));
        }