protected void btn_submit_Click(object sender, EventArgs e) { PN_CommentBLL commentbll = new PN_CommentBLL(); commentbll.Model.Notice = Convert.ToInt32(ViewState["ID"]); commentbll.Model.Staff = int.Parse(Session["UserID"].ToString()); commentbll.Model.Content = content.Text; commentbll.Model.CommentTime = DateTime.Now; commentbll.Add(); BindGridList(); //清空评论板内的内容 content.Text = ""; }
/// <summary> /// 追加评论 /// </summary> /// <param name="AuthKey"></param> /// <param name="NoticeID"></param> /// <param name="CommentContent"></param> /// <returns></returns> public static int AddComment(UserInfo User, int NoticeID, string CommentContent) { LogWriter.WriteLog("NoticeService.AddComment:UserName="******",NoticeID=" + NoticeID.ToString() + ",CommentContent=" + CommentContent); if (User.AccountType == 1) { PN_CommentBLL commentbll = new PN_CommentBLL(); commentbll.Model.Notice = NoticeID; commentbll.Model.Staff = User.StaffID; commentbll.Model.Content = CommentContent + "[" + User.UserName + "]"; commentbll.Model.CommentTime = DateTime.Now; commentbll.Add(); } return(0); }
protected void btn_submit_Click(object sender, EventArgs e) { PN_CommentBLL commentbll = new PN_CommentBLL(); commentbll.Model.Notice = Convert.ToInt32(ViewState["ID"]); commentbll.Model.Staff = int.Parse(Session["UserID"].ToString()); commentbll.Model.Content = content.Text; commentbll.Model.CommentTime = DateTime.Now; commentbll.Add(); BindGridList(); //清空评论板内的内容 content.Text = ""; }
/// <summary> /// 追加评论 /// </summary> /// <param name="AuthKey"></param> /// <param name="NoticeID"></param> /// <param name="CommentContent"></param> /// <returns></returns> public static int AddComment(UserInfo User, int NoticeID, string CommentContent) { LogWriter.WriteLog("NoticeService.AddComment:UserName="******",NoticeID=" + NoticeID.ToString() + ",CommentContent=" + CommentContent); if (User.AccountType == 1) { PN_CommentBLL commentbll = new PN_CommentBLL(); commentbll.Model.Notice = NoticeID; commentbll.Model.Staff = User.StaffID; commentbll.Model.Content = CommentContent + "[" + User.UserName + "]"; commentbll.Model.CommentTime = DateTime.Now; commentbll.Add(); } return 0; }