コード例 #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Tz888.BLL.ErrowTabBLL bll   = new Tz888.BLL.ErrowTabBLL();
        Tz888.Model.ErrowTab  model = new Tz888.Model.ErrowTab();
        model.LoginName        = "0";//游客
        model.LinkURL          = txtlinkurl.Text;
        model.QuestionDescript = txtdescrption.Text;
        model.Connetions       = txtconnection.Text;
        model.BoolChuLi        = 0;
        model.BoolReturn       = 0;
        model.ReturnContext    = "";
        model.Descript         = "";
        model.createtime       = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString().Trim();
        model.updatetime       = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString().Trim();
        int result = bll.Add(model);

        if (result > 0)
        {
            Response.Write("<script>alert('添加成功!');</script>");
        }
        else
        {
            Response.Write("<script>alert('添加失败!');</script>");
        }
    }
コード例 #2
0
 private void BindShow()
 {
     Tz888.Model.ErrowTab model = bll.GetModel(Id);
     this.txtlinkurl.Text    = model.LinkURL.Trim();
     this.txtdescrption.Text = model.QuestionDescript.Trim();
     this.txtconnection.Text = model.Connetions.Trim();
     this.radiohuifu.Items.FindByValue(model.BoolReturn.ToString().Trim()).Selected = true;
     this.txtreturncontext.Text = model.ReturnContext.Trim();
     this.txtbeizhu.Text        = model.Descript.Trim();
 }
コード例 #3
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Tz888.Model.ErrowTab model = new Tz888.Model.ErrowTab();
        model.Id            = Id;
        model.ReturnContext = txtreturncontext.Text.Trim();
        model.BoolReturn    = Convert.ToInt32(this.radiohuifu.SelectedValue);
        model.Descript      = txtbeizhu.Text.Trim();
        model.BoolChuLi     = 1;
        model.updatetime    = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString().Trim();
        int result = bll.Update(model);

        if (result > 0)
        {
            Response.Redirect("ErrowTabManage.aspx");
        }
        else
        {
            Response.Write("<script>alert('回复失败!');</script>");
        }
    }