protected void btnSave_Click(object sender, EventArgs e) { ProcessRuleBLL bll = new ProcessRuleBLL(); bool ret = false; if (State.Equals("new", StringComparison.OrdinalIgnoreCase)) { string conditionExpression = "RoleId = " + dplist.SelectedValue.Trim(); ret = bll.InsertRequestNodeRule(NodeID, txtDisplayName.Text, txtTableName.Text, conditionExpression); if (ret) { //ExecAlertScritp("添加成功"); ClientScript.RegisterStartupScript(this.GetType(), "", "<script>AlertAndNewLoad('添加成功');</script>"); } else { ExecAlertScritp("添加失败"); } } else if (State.Equals("edit", StringComparison.OrdinalIgnoreCase)) { string conditionExpression = "RoleId = " + dplist.SelectedValue.Trim(); ret = bll.UpdateRequestNodeRule(hfID.Value, NodeID, txtDisplayName.Text, txtTableName.Text, conditionExpression); if (ret) { //ExecAlertScritp("添加成功"); ClientScript.RegisterStartupScript(this.GetType(), "", "<script>AlertAndNewLoad('更新成功');</script>"); } else { ExecAlertScritp("更新失败"); } } }