/// <summary> /// 加好友 /// </summary> /// <param name="session">本人session</param> /// <param name="session_Friend">好友session</param> /// <returns></returns> public Stream AddFriend(string session, string session_Friend) { try { FriendsBLL friBLL = new FriendsBLL(); string resul = friBLL.AddFriend(session, session_Friend); if (!string.IsNullOrEmpty(resul)) { return(new MemoryStream(Encoding.UTF8.GetBytes(resul))); } else { return(new MemoryStream(Encoding.UTF8.GetBytes("error"))); } } catch (Exception err) { Logger.Error("AddFriend Error", err); return(new MemoryStream(Encoding.UTF8.GetBytes("error"))); } }