예제 #1
0
        //sending message for a single reciver
        public bool sendMessage(string yourID, string reciverId, string messages)
        {
            try
            {
                messageBusiness = new MussageBusiness();


                message = new Message(yourID, reciverId, messages);
                //message send successed
                if (messageBusiness.InsertMessages(message) == true)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                errMessages = ex.Message;
                return(false);
            }
        }
예제 #2
0
 //get message from single user
 public List <Message> getMessage(MussageBusiness mes)
 {
     messageBusiness = new MussageBusiness();
     return(messageBusiness.ReturnMessages(mes.yourID, mes.reciverID));
 }
예제 #3
0
 //get last message from a single user
 public Message getLastMessage(MussageBusiness mes)
 {
     messageBusiness = new MussageBusiness();
     return(messageBusiness.ReturnLastMessages(mes.yourID, mes.reciverID));
 }
예제 #4
0
 //get all message (default)
 public List <Message> getMessage()
 {
     messageBusiness = new MussageBusiness();
     return(messageBusiness.ReturnMessages());
 }