/// <summary> /// Starts a chat session by creating an inbox instance /// </summary> /// <param name="MemberID"></param> public static AjaxMember LoginToChatServer(string EmailAddress,string Password) { Next2Friends.Data.Member member = Login( EmailAddress,Password); AjaxMember m = new AjaxMember(); m.WebMemberID = member.WebMemberID; m.FirstName = member.FirstName; m.LastName = member.LastName; m.NickName = member.NickName; m.Email = member.Email; m.OnlineStatus = OnlineStatus.Online; ChatInbox inbox = GetInbox(m.WebMemberID); // if no existing instances exist then create one if (inbox == null) { //log the user in inbox = new ChatInbox(); inbox.MemberID = member.MemberID; inbox.MemberInfo = m; ChatInboxList.Add(inbox); } else { inbox.MemberInfo = m; } return m; }
/// <summary> /// Starts a chat session by creating an inbox instance /// </summary> /// <param name="MemberID"></param> public static AjaxMember LoginToChatServer(string EmailAddress, string Password) { Next2Friends.Data.Member member = Login(EmailAddress, Password); AjaxMember m = new AjaxMember(); m.WebMemberID = member.WebMemberID; m.FirstName = member.FirstName; m.LastName = member.LastName; m.NickName = member.NickName; m.Email = member.Email; m.OnlineStatus = OnlineStatus.Online; ChatInbox inbox = GetInbox(m.WebMemberID); // if no existing instances exist then create one if (inbox == null) { //log the user in inbox = new ChatInbox(); inbox.MemberID = member.MemberID; inbox.MemberInfo = m; ChatInboxList.Add(inbox); } else { inbox.MemberInfo = m; } return(m); }
/// <summary> /// returns a list off all the members friends. /// </summary> /// <param name="MemberID">The MemberId of the requester</param> /// <returns>A list of AjaxMember</returns> public static List <AjaxMember> GetFriends(string WebMemberID) { ChatInbox inbox = GetInbox(WebMemberID); List <AjaxMember> retMembers = new List <AjaxMember>(); if (inbox == null) { return(retMembers); } List <Next2Friends.Data.Member> members = Next2Friends.Data.Member.GetAllFriendsByMemberID(inbox.MemberID); foreach (Next2Friends.Data.Member member in members) { AjaxMember m = new AjaxMember(); m.WebMemberID = member.WebMemberID; m.FirstName = member.FirstName; m.LastName = member.LastName; m.NickName = member.NickName; m.Email = member.Email; retMembers.Add(m); } return(retMembers); }
/// <summary> /// returns a list off all the members friends. /// </summary> /// <param name="MemberID">The MemberId of the requester</param> /// <returns>A list of AjaxMember</returns> public static List<AjaxMember> GetFriends(string WebMemberID) { ChatInbox inbox = GetInbox(WebMemberID); List<AjaxMember> retMembers = new List<AjaxMember>(); if (inbox == null) return retMembers; List<Next2Friends.Data.Member> members = Next2Friends.Data.Member.GetAllFriendsByMemberID(inbox.MemberID); foreach (Next2Friends.Data.Member member in members) { AjaxMember m = new AjaxMember(); m.WebMemberID = member.WebMemberID; m.FirstName = member.FirstName; m.LastName = member.LastName; m.NickName = member.NickName; m.Email = member.Email; retMembers.Add(m); } return retMembers; }