public virtual MessageBoxView GetSentbox(int userId, int afterMessageId, int numberOfRecords, string sortColumn, bool sortAscending, MessageReadStatus readStatus, MessageArchivedStatus archivedStatus)
        {
            var reader = _dataService.GetSentBoxView(userId, PortalController.GetEffectivePortalId(GetCurrentUserInfo().PortalID), afterMessageId, numberOfRecords, sortColumn, sortAscending);

            return(new MessageBoxView {
                Conversations = CBO.FillCollection <MessageConversationView>(reader)
            });
        }
Ejemplo n.º 2
0
        public IDataReader GetInBoxView(int userId, int portalId, int afterMessageId, int numberOfRecords, string sortColumn, bool sortAscending, MessageReadStatus readStatus, MessageArchivedStatus archivedStatus, MessageSentStatus sentStatus)
        {
            object read     = null;
            object archived = null;
            object sent     = null;

            switch (readStatus)
            {
            case MessageReadStatus.Read:
                read = true;
                break;

            case MessageReadStatus.UnRead:
                read = false;
                break;
            }

            switch (archivedStatus)
            {
            case MessageArchivedStatus.Archived:
                archived = true;
                break;

            case MessageArchivedStatus.UnArchived:
                archived = false;
                break;
            }

            switch (sentStatus)
            {
            case MessageSentStatus.Received:
                sent = false;
                break;

            case MessageSentStatus.Sent:
                sent = true;
                break;
            }

            return(_provider.ExecuteReader("CoreMessaging_GetMessageConversations", userId, portalId, afterMessageId, numberOfRecords, sortColumn, sortAscending, read, archived, sent));
        }
 public virtual MessageBoxView GetSentbox(int userId, int afterMessageId, int numberOfRecords, string sortColumn, bool sortAscending, MessageReadStatus readStatus, MessageArchivedStatus archivedStatus)
 {
     var reader = _dataService.GetSentBoxView(userId, PortalController.GetEffectivePortalId(GetCurrentUserInfo().PortalID), afterMessageId, numberOfRecords, sortColumn, sortAscending);
     return new MessageBoxView { Conversations = CBO.FillCollection<MessageConversationView>(reader) };
 }