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); }
public bool SaveInChatInfoInService(ChatInService chat) { chatop.InsertIntoEntity(chat); return(true); }
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; }
public bool SaveInChatInfoInService(ChatInService chat) { chatop.InsertIntoEntity(chat); return true; }
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; }