示例#1
0
        public List <ChatInService> SearchChatInfoContainSendId(int receiveId, int sendId)
        {
            List <ChatInService> chat = new List <ChatInService>();


            List <ChatMessage> lm = chatop.SendChat(receiveId, sendId);

            foreach (ChatMessage lo in lm)
            {
                ChatInService ll = new ChatInService();
                ll.SendUserId    = (long)lo.SendUserId;
                ll.ReceiveUserId = (long)lo.ReceiveUserId;
                ll.ChatContent   = lo.ChatContent;
                ll.TimeStamp     = new DateTime((long)lo.TimeStamp);

                chat.Add(ll);
            }
            return(chat);
        }
示例#2
0
 public bool SaveInChatInfoInService(ChatInService chat)
 {
     chatop.InsertIntoEntity(chat);
     return(true);
 }
示例#3
0
        public List<ChatInService> SearchChatInfoUnReadContainSendId(int receiveId, int sendId)
        {
            List<ChatInService> chat = new List<ChatInService>();

               List<ChatMessage> lm = chatop.SendChatUnRead(receiveId, sendId);

               foreach (ChatMessage lo in lm)
               {
               ChatInService ll = new ChatInService();
               ll.SendUserId = (long)lo.SendUserId;
               ll.ReceiveUserId = (long)lo.ReceiveUserId;
               ll.ChatContent = lo.ChatContent;
               ll.TimeStamp = new DateTime((long)lo.TimeStamp);

               chat.Add(ll);
               }

               return chat;
        }
示例#4
0
 public bool SaveInChatInfoInService(ChatInService chat)
 {
     chatop.InsertIntoEntity(chat);
        return true;
 }
示例#5
0
        public List<ChatInService> SearchChatHistory(int receiveId, int sendid, DateTime endtime)
        {
            List<ChatInService> chat = new List<ChatInService>();

               List<ChatMessage> lm = chatop.SearchChattingHistory(receiveId, sendid, endtime);

               foreach (ChatMessage lo in lm)
               {
               ChatInService ll = new ChatInService();
               ll.SendUserId = (long)lo.SendUserId;
               ll.ReceiveUserId = (long)lo.ReceiveUserId;
               ll.ChatContent = lo.ChatContent;
               ll.TimeStamp = new DateTime((long)lo.TimeStamp);

               chat.Add(ll);
               }

               return chat;
        }