public int getPublishBlogId(int userid) { starweibo.BLL.blogInfo bllBlog = new starweibo.BLL.blogInfo(); DataSet ds = bllBlog.GetList(1, "blogAuthorId='" + userid + "'", "BlogId DESC"); int blogid = Convert.ToInt32(ds.Tables[0].Rows[0]["BlogId"]); return(blogid); }
public bool updateBlogpl(int blogid, int plnum) { starweibo.Model.blogInfo model = new starweibo.Model.blogInfo(); starweibo.BLL.blogInfo bllmnblog = new starweibo.BLL.blogInfo(); model.blogId = blogid; model.plNum = plnum; return(bllmnblog.Updatepl(model)); }
public bool updateBlogZan(int blogid, int zannum) { starweibo.Model.blogInfo model = new starweibo.Model.blogInfo(); starweibo.BLL.blogInfo bllmnblog = new starweibo.BLL.blogInfo(); model.blogId = blogid; model.zanNum = zannum; return(bllmnblog.UpdateZan(model)); }
public int publishBlog(int userId, string content, int parentid) { starweibo.Model.blogInfo oneblog = new starweibo.Model.blogInfo(); starweibo.BLL.blogInfo bllblog = new starweibo.BLL.blogInfo(); oneblog.blogAuthorId = userId; oneblog.blogContent = content; if (parentid != 0) { oneblog.parentId = parentid; } return(bllblog.Add(oneblog)); }
public starweibo.Model.userInfo getUserInfo(int userid) { starweibo.BLL.userInfo bll = new starweibo.BLL.userInfo(); starweibo.Model.userInfo model = new starweibo.Model.userInfo(); model = bll.GetModel(userid); starweibo.BLL.relationInfo bllrelation = new starweibo.BLL.relationInfo(); model.userPwd = bllrelation.GetRecordCount("userId='" + userid + "'").ToString(); model.userMail = bllrelation.GetRecordCount("friendId='" + userid + "'").ToString(); starweibo.BLL.blogInfo bllblog = new starweibo.BLL.blogInfo(); model.userBirthday = bllblog.GetRecordCount("blogAuthorId='" + userid + "'").ToString(); model.userAddress = bllrelation.GetRecordCount("userId='" + Convert.ToInt32(Session["userid"]) + "' and friendId='" + userid + "'").ToString(); return(model); }