Ejemplo n.º 1
0
        //获取离线消息

        private void GetMyOfflineMessage()
        {
            UserIDContract info = new UserIDContract(Common.CurrentUser.ID);

            Common.TcpConn.SendObject("GetMyOffLineMsg", info);
        }
Ejemplo n.º 2
0
        // 获取离线消息,稍后实现

        private void IncomingMyOffLineMsg(PacketHeader header, Connection Connection, UserIDContract userInfo)
        {
            try
            {
                MsgSendOrderClient bll     = new MsgSendOrderClient();
                IList <MsgEntity>  msgList = bll.GetAllOffLineMsgByUserID(userInfo.UsersID);

                foreach (MsgEntity message in msgList)
                {
                    Connection.SendObject("ServerChatMessage", message);

                    bll.DeleteOffLineMsg(message.ID);
                }
            }
            catch (Exception ex)
            {
                LogTools.LogException(ex, "IncomingMyOffLineMsg");
            }
        }