public bool ChangeNoteName(int friendId, string friendNoteName) { string userid = Session["userid"].ToString(); starweibo.BLL.relationInfo BNoteName = new starweibo.BLL.relationInfo(); List <starweibo.Model.relationInfo> MNoteName = new List <starweibo.Model.relationInfo>(); MNoteName = BNoteName.GetModelList("friendId=" + friendId + " and userId=" + userid); MNoteName[0].friendNoteName = friendNoteName; return(BNoteName.Update(MNoteName[0])); }
public bool yichufensi(int friendId) { string userid = Session["userid"].ToString(); starweibo.BLL.relationInfo BNoteName = new starweibo.BLL.relationInfo(); List <starweibo.Model.relationInfo> MNoteName = new List <starweibo.Model.relationInfo>(); MNoteName = BNoteName.GetModelList("friendId=" + userid + " and userId=" + friendId); int id = MNoteName[0].id; return(BNoteName.Delete(id)); }
public bool getgroupId(int friendid, int newgroupId) { string userid = Session["userid"].ToString(); //int userid = 2; starweibo.BLL.relationInfo bgroupid = new starweibo.BLL.relationInfo(); List <starweibo.Model.relationInfo> mgroupid = new List <starweibo.Model.relationInfo>(); mgroupid = bgroupid.GetModelList("friendId=" + friendid + " and userId=" + userid); mgroupid[0].groupId = newgroupId; return(bgroupid.Update(mgroupid[0])); }
public int guanzhu(int friendId) { string userid = Session["userid"].ToString(); //string userid = "2"; starweibo.BLL.relationInfo Bguanzhu = new starweibo.BLL.relationInfo(); starweibo.Model.relationInfo Mguanzhu = new starweibo.Model.relationInfo(); List <starweibo.Model.relationInfo> MfriendId = new List <starweibo.Model.relationInfo>(); MfriendId = Bguanzhu.GetModelList("friendId=" + friendId + " and userId=" + userid); if (MfriendId.Count == 0) { Mguanzhu.userId = Convert.ToInt32(userid); Mguanzhu.friendId = friendId; Mguanzhu.groupId = 6; return(Bguanzhu.Add(Mguanzhu)); } else { return(-1); } }