public AjaxMessageList OpenSentMessage(string WebMessageID) { Member member = (Member)Session["Member"]; AjaxMessage[] ajaxMessages = null; if (member != null) { // get the message and all other message that have the same InReplyToID Message[] messages = Message.GetSentMessageHeaderWithReply(WebMessageID, member.MemberID); ajaxMessages = AjaxMessage.ConvertToAjaxMessage(member, messages, false, GetMessageType.ReadMessage); } AjaxMessageList messageList = new AjaxMessageList(); messageList.DefaultWebMessageID = WebMessageID; //get the video message of the first item if (ajaxMessages.Length > 0) { for (int i = 0; i < ajaxMessages.Length; i++) { if (ajaxMessages[i].WebMessageID == WebMessageID) { messageList.DefaultVideoMessageFile = ajaxMessages[i].VideoMessageFile; } } } messageList.AjaxMessages = ajaxMessages; return(messageList); }
public AjaxMessageList GetSent(int Page) { AjaxMessageList ajaxMessageList = new AjaxMessageList(); try { Member member = (Member)Session["Member"]; if (member != null) { int MessageCount = Message.GetSentMessageCount(member.MemberID); int NumberOfPages = (int)Math.Ceiling(Convert.ToDouble(MessageCount / PageSize)); if ((MessageCount % PageSize) > 0 || NumberOfPages == 0) { NumberOfPages = NumberOfPages + 1; } Message[] NewMessages = Message.GetSent(member.MemberID, Page, PageSize); ajaxMessageList.AjaxMessages = AjaxMessage.ConvertToAjaxMessage(member, NewMessages, true, GetMessageType.Trash); ajaxMessageList.NumberOfPages = NumberOfPages; ajaxMessageList.CurrentPage = Page; } } catch (Exception ex) { } return(ajaxMessageList); }
public AjaxMessage[] GetNewMessages() { Member member = (Member)Session["Member"]; AjaxMessage[] AjaxMessages = new AjaxMessage[0]; if (member != null) { Message[] NewMessages = Message.GetNewMessages(member.MemberID); AjaxMessages = AjaxMessage.ConvertToAjaxMessage(member, NewMessages, true, GetMessageType.Inbox); } return(AjaxMessages); }
public AjaxMessage[] GetInboxMessages2() { Member member = (Member)Session["Member"]; AjaxMessage[] AjaxMessages = new AjaxMessage[0]; if (member != null) { Message[] NewMessages = Message.GetAllMessagesByMemberID(member.MemberID, 0, PageSize); AjaxMessages = AjaxMessage.ConvertToAjaxMessage(member, NewMessages, true, GetMessageType.Inbox); } return(AjaxMessages); }
public AjaxMessageList OpenMessage(string WebMessageID, string PassKey) { Member member = (Member)Session["Member"]; AjaxMessage[] ajaxMessages = null; Message[] messages = null; if (member != null) { // get the message and all other message that have the same InReplyToID messages = Message.GetMessageHeaderWithReply(WebMessageID, member.MemberID); } else { // Get external message to display messages = Message.GetExternalMessageHeader(WebMessageID, PassKey); } ajaxMessages = AjaxMessage.ConvertToAjaxMessage(member, messages, false, GetMessageType.ReadMessage); AjaxMessageList messageList = new AjaxMessageList(); messageList.DefaultWebMessageID = WebMessageID; //get the video message of the first item if (ajaxMessages.Length > 0) { for (int i = 0; i < ajaxMessages.Length; i++) { if (ajaxMessages[i].WebMessageID == WebMessageID) { messageList.DefaultVideoMessageFile = ajaxMessages[i].VideoMessageFile; } } } messageList.AjaxMessages = ajaxMessages; if (member != null) { messageList.NumberOfNewMessages = member.GetNewMessageCount(); } return(messageList); }