protected void btnSave_Click(object sender, EventArgs e) { ProcessRuleBLL bll = new ProcessRuleBLL(); bool ret = false; if (State.Equals("new", StringComparison.OrdinalIgnoreCase)) { ret = bll.InsertRequestNode(CreateObject()); if (ret) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>AlertAndNewLoad('添加成功');</script>"); } else { ExecAlertScritp("添加失败"); } } else { ret = bll.UpdateRequestNode(CreateObject()); if (ret) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>AlertAndNewLoad('更新成功');</script>"); } else { ExecAlertScritp("更新失败"); } } }