Ejemplo n.º 1
0
        protected void Button_Click(object sender, EventArgs e)
        {
            rr2.Model.commentInfo curcomm = new rr2.Model.commentInfo();
            curcomm.newsId         = int.Parse(HttpContext.Current.Request.QueryString["newid"]);
            curcomm.ownUserId      = 18;
            curcomm.checkUserId    = 1;
            curcomm.commentContent = HttpContext.Current.Request.Form["myEditor"];
            curcomm.commentTime    = DateTime.Now;
            int jg = new rr2.BLL.commentInfo().Add(curcomm);

            if (jg == 0)
            {
                LabelResule.Text = "添加失败,请检查数据完整性";
            }
            else
            {
                LabelResule.Text = "添加成功!";
            }
            //Response.Redirect("newview.aspx?ts=sucess");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(rr2.Model.commentInfo model)
 {
     return(dal.Update(model));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(rr2.Model.commentInfo model)
 {
     return(dal.Add(model));
 }