コード例 #1
0
 protected void btnAudit_Click(object sender, EventArgs e)
 {
     model          = bll.GetModel(int.Parse(Request.QueryString["id"].ToString()));
     model.orderid  = Convert.ToInt32(txtorder.Text.ToString());
     model.title    = txtTitle.Text.Trim();
     model.descript = txtContent.Value.ToString();
     model.htmlurl  = "details_" + model.id.ToString() + ".html";
     //model.pageAddress = rdochannel.Checked == true ? 0 : 1;
     if (!bll.Update(model))
     {
         Response.Write("<script>alert('修改失败!');document.location='contractManage.aspx'</script>");
     }
     else
     {
         com.topfo.wyzs.GenerateStatic gen = new com.topfo.wyzs.GenerateStatic();
         gen.GenerateContract(model.id);
         Response.Redirect("contractManage.aspx");
     }
 }
コード例 #2
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        //model.htmlurl = txtSite.Text.Trim();
        model.orderid     = Convert.ToInt32(txtorder.Text.ToString());
        model.title       = txtTitle.Text.Trim();
        model.descript    = txtContent.Value.ToString();
        model.pageAddress = 3;
        int num = bll.Add(model);

        if (num > 0)
        {
            model.htmlurl = "details_" + num + ".html";
            model.id      = num;
            bll.Update(model);
            com.topfo.wyzs.GenerateStatic gen = new com.topfo.wyzs.GenerateStatic();
            gen.GenerateContract(num);
            Response.Redirect("contractManage.aspx");
        }
        else
        {
            Response.Write("<script>alert('添加失败!');document.location='contractManage.aspx'</script>");
        }
    }