Example #1
0
    /// <summary>
    /// 回复
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (Session["lname"] == null)
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('必须登录后才能进行此操作!');</script>");
            return;
        }
        if (Textarea1.Value == "")
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('回复内容不能为空!');</script>");
            return;
        }

        SP.Model.reply model = new SP.Model.reply();

        model.aid   = int.Parse(Request.QueryString["id"]);
        model.rmemo = Textarea1.Value;
        model.lname = Session["lname"].ToString();
        model.rtime = DateTime.Now;

        bll2.Add(model);

        Textarea1.Value = "";

        ShowInfo();

        bind();

        Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('回复成功!');</script>");
    }
Example #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(SP.Model.reply model)
 {
     return(dal.Update(model));
 }
Example #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(SP.Model.reply model)
 {
     return(dal.Add(model));
 }