protected void btnSubmit_Click(object sender, System.EventArgs e) { if (!FlowAuditAction.GetNextOperator(this.InstanceID) && this.txtnextperson.Text == "" && this.RBLRoleType.SelectedValue == "1") { this.JS.Text = "alert('请选择流程下一个审核人');"; return; } if (!FlowAuditAction.GetNextOperator(this.InstanceID) && this.txtnextperson.Text != "" && this.RBLRoleType.SelectedValue == "1") { FlowAuditAction.InsertOperator(this.InstanceID, this.hdnNextPerson.Value.Trim()); } if (this.isSecValidate == "1") { string password = this.txtAuditPwd.Text.Trim(); if (!FlowAuditAction.CheckAuditPwd(this.UserCode, password)) { this.JS.Text = "alert('审核密码不正确!');"; return; } } string value = this.txtAuditInfo.Value; if (this.RBLRoleType.SelectedValue == "-3" || this.RBLRoleType.SelectedValue == "-2") { string[] allFront = FlowAuditAction.GetAllFront(this.InstanceID); for (int i = 0; i < allFront.Length; i++) { this.AddMsg(allFront[i]); } } if (this.RBLRoleType.SelectedValue == "-3") { DataTable instanceMain = FlowAuditAction.GetInstanceMain(this.InstanceID); FlowAuditAction.DealAudit(new System.Guid(instanceMain.Rows[0]["instancecode"].ToString()), instanceMain.Rows[0]["businesscode"].ToString(), instanceMain.Rows[0]["businessclass"].ToString(), -3); string text = " parent.desktop.flowclass.location='/SysFrame/showinfomation.aspx';"; text += "alert('保存审核结果成功');"; text += "top.frameWorkArea.window.desktop.getActive().close();"; this.JS.Text = text; return; } int num = 0; string selectedValue; if ((selectedValue = this.RBLRoleType.SelectedValue) != null) { if (!(selectedValue == "1")) { if (!(selectedValue == "-2")) { if (selectedValue == "-3") { num = -3; } } else { num = -2; } } else { num = 1; } } string value2 = this.hdnType.Value; string value3; if (value2 == "前插") { value3 = this.hdnFrontPerson.Value; this.RequiredFieldValidator2.Enabled = true; } else { value3 = this.hdnAfterPerson.Value; this.RequiredFieldValidator3.Enabled = true; } if (!(value2 == "前插") && !(value2 == "后插")) { if (num == 1) { this.GetMsgDB(this.InstanceID); } if (this.Session["HumanCode"] != null) { this.RecieveMsgAdd(); } FlowAuditAction.ProcessFlow(this.InstanceID, this.IsAllPass, this.UserCode, num, value); FlowAuditAction.GetbusinesscodeTable(this.InstanceID); DataTable dataTable = null; if (dataTable.Rows.Count > 0) { ISelfEvent selfEvent = (ISelfEvent)System.Reflection.Assembly.Load(dataTable.Rows[0]["assemblename"].ToString()).CreateInstance(dataTable.Rows[0]["assemblename"].ToString() + "." + dataTable.Rows[0]["classname"].ToString()); string maxSing = FlowAuditAction.GetMaxSing(this.InstanceID); if (selfEvent != null) { if (this.RBLRoleType.SelectedValue == "1" && maxSing == "1") { selfEvent.CommitEvent(this.InstanceCode.ToString()); } if (this.RBLRoleType.SelectedValue == "0") { selfEvent.RefuseEvent(this.InstanceCode.ToString()); } } } this.MsgOrganiger(); this.Session.Remove("HumanCode"); this.Session.Remove("HumanName"); string text2 = "parent.desktop.flowclass.location='/SysFrame/showinfomation.aspx';"; text2 += "alert('保存审核结果成功!');"; text2 += "top.frameWorkArea.window.desktop.getActive().close();"; this.JS.Text = text2; return; } if ((value2 == "前插" && this.txtFrontPerson.Text == "") || (value2 == "后插" && this.txtAfterPerson.Text == "")) { base.ClientScript.RegisterClientScriptBlock(this.Page.GetType(), "", "alert('请选择" + value2 + "审核人');", true); return; } string value4 = this.txtAuditRemark.Value; FlowAuditAction.InsertNode(this.InstanceID, this.UserCode, value2, this.IsAllPass, value3, false, value, value4); string text3 = " parent.desktop.flowclass.location='/SysFrame/showinfomation.aspx';"; text3 = text3 + "alert('" + value2 + "节点成功!');"; text3 += "top.frameWorkArea.window.desktop.getActive().close();"; this.JS.Text = text3; }