Ejemplo n.º 1
0
        public void refresh()
        {
            if (this.profileDAO.GetValue() == null)
            {
                return;
            }
            IList <Message> messages = messageDAO_SERVER.refresh(new MessageSendDTO(this.profileDAO.GetValue().Token, this.chat.ChatID)).Messages;

            foreach (Message message in messages)
            {
                messageLocalDAO.Insert(message);
                this.MessageList.Add(message);
            }

            //this.MessageList = new ObservableCollection<Message>(this.MessageList.OrderBy(i => i.Order).ToList());
        }
Ejemplo n.º 2
0
/// <summary>
/// 向数据库中添加一条记录
/// </summary>
/// <param name="model">要添加的实体</param>
/// <returns>是否成功</returns>
        public bool Insert(Message model)
        {
            return(_dao.Insert(model));
        }