Exemplo n.º 1
0
        public ChatSessionProxy Chat_GetChatSessionByUserID(int userID, int targetUserID)
        {
            if (!CheckClient())
            {
                return(null);
            }

            ChatSession session = ChatBO.Instance.GetChatSession(userID, targetUserID);

            return(ProxyConverter.GetChatSessionProxy(session));
        }
Exemplo n.º 2
0
        public ChatSessionProxy Chat_GetChatSession(int sessionID)
        {
            if (!CheckClient())
            {
                return(null);
            }

            ChatSession session = ChatBO.Instance.GetChatSession(sessionID);

            return(ProxyConverter.GetChatSessionProxy(session));
        }
Exemplo n.º 3
0
        public List <ChatSessionProxy> Chat_GetChatSessionsWithUnreadMessages(int userID, int topCount)
        {
            if (!CheckClient())
            {
                return(null);
            }
            ChatSessionCollection sessions = ChatBO.Instance.GetChatSessionsWithUnreadMessages(userID, topCount);

            List <ChatSessionProxy> result = new List <ChatSessionProxy>();

            foreach (ChatSession s in sessions)
            {
                result.Add(ProxyConverter.GetChatSessionProxy(s));
            }

            return(result);
        }
Exemplo n.º 4
0
        public List <ChatSessionProxy> Chat_GetChatSessions(int userID, int pageNumber, int pageSize, out int totalCount)
        {
            totalCount = 0;
            if (!CheckClient())
            {
                return(null);
            }
            ChatSessionCollection sessions = ChatBO.Instance.GetChatSessions(userID, pageNumber, pageSize);

            List <ChatSessionProxy> result = new List <ChatSessionProxy>();

            foreach (ChatSession s in sessions)
            {
                result.Add(ProxyConverter.GetChatSessionProxy(s));
            }
            totalCount = sessions.TotalRecords;
            return(result);
        }
Exemplo n.º 5
0
        public List <ChatSessionProxy> Chat_AdminGetSessions(int userID, MaxLabs.Passport.Proxy.DataForSearchChatSession filter, int pageNumber)
        {
            if (!CheckClient())
            {
                return(null);
            }

            ChatSessionCollection sessions = ChatBO.Instance.Server_AdminGetSessions(userID, filter, pageNumber);

            List <ChatSessionProxy> result = new List <ChatSessionProxy>();

            foreach (ChatSession s in sessions)
            {
                result.Add(ProxyConverter.GetChatSessionProxy(s));
            }

            return(result);
        }