private void save(string str) { try { if (this.isSecValidate == "1" && !FlowAuditAction.CheckAuditPwd(this.UserCode, this.txtAuditPwd.Text.Trim())) { this.JS.Text = "alert('审核密码不正确!');"; } else { string auditInfo = this.txtAuditInfo.Value.Trim(); string value = this.hdnType.Value; string insertAuditor = string.Empty; if (value == "前插") { insertAuditor = this.hdnFrontPerson.Value; } if (value == "后插") { insertAuditor = this.hdnAfterPerson.Value; } if (value == "前插" || value == "后插") { if ((value == "前插" && this.txtFrontPerson.Text == "") || (value == "后插" && this.txtAfterPerson.Text == "")) { base.RegisterScript("alert('请选择" + value + "审核人');"); } else { string value2 = this.txtAuditRemark.Value; FlowAuditAction.InsertNode(this.InstanceID, this.UserCode, value, this.IsAllPass, insertAuditor, true, auditInfo, value2); this.SendSMS(this.InstanceID); System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); if (str == "pc") { stringBuilder.Append("top.ui.refreshDesktop(); \n"); stringBuilder.Append("top.ui.show('" + value + "节点成功!'); \n"); stringBuilder.Append("top.ui.closeTab();\n"); } else { stringBuilder.Append("alert('添加成功');"); stringBuilder.Append("parent.location.reload();"); } this.JS.Text = stringBuilder.ToString(); } } else { int num = System.Convert.ToInt32(this.RBLRoleType.SelectedValue); if (!FlowAuditAction.GetNextOperator(this.InstanceID) && this.txtnextperson.Text == "" && num == 1) { this.JS.Text = "alert('请选择流程下一个审核人');"; } else { if (!FlowAuditAction.GetNextOperator(this.InstanceID) && this.txtnextperson.Text != "" && num == 1) { string project = FlowAuditAction.GetProject(this.BusinessCode, this.InstanceCode); if (!FlowAuditAction.SelectNextOperate(this.InstanceID, this.hdnNextPerson.Value.Trim(), int.Parse(this.NodeType.Value), this.UserCode, project)) { this.JS.Text = "alert('请找管理员设置" + this.txtnextperson.Text + "的流程负责人');"; return; } } if (num == -3 || num == -2) { string[] allFront = FlowAuditAction.GetAllFront(this.InstanceID); for (int i = 0; i < allFront.Length; i++) { this.AddMsg(allFront[i]); } this.DealAgent(); } if (num == 1) { this.SendSMS(this.InstanceID); } this.RecieveMsgAdd(); FlowAuditAction.ProcessFlow(this.InstanceID, this.IsAllPass, this.UserCode, num, auditInfo); string maxSing = FlowAuditAction.GetMaxSing(this.InstanceID); WFBusinessCodeService wFBusinessCodeService = new WFBusinessCodeService(); WFBusinessCode byId = wFBusinessCodeService.GetById(this.BusinessCode); string path = base.Server.MapPath("~/SelfEventInfo.xml"); string typeName = SelfEventAction.GetTypeName(path, byId.LinkTable, byId.StateField); if (!string.IsNullOrWhiteSpace(typeName)) { ISelfEvent selfEvent = (ISelfEvent)System.Reflection.Assembly.Load("PmBusinessLogic").CreateInstance(typeName); if (selfEvent != null) { if (num == 1 && maxSing == "1") { selfEvent.CommitEvent(this.InstanceCode.ToString()); } if (num == -2) { selfEvent.RefuseEvent(this.InstanceCode.ToString()); } if (num == -3) { selfEvent.RestatedEvent(this.InstanceCode.ToString()); } } } if (this.BusinessCode == "089") { PTPrjInfoZTB byId2 = this.ptInfoZTbSer.GetById(this.InstanceCode); if (maxSing == "1" && num == 1) { this.ptInfoZTbSer.UpdatePrjState(byId2, new int?(2)); } } else { if (this.BusinessCode == "100") { if (maxSing == "1" && num == 1) { PrjMember.AddLimit(this.InstanceCode); } } else { if (this.BusinessCode == "107") { if (maxSing == "1" && num == 1) { Progress.UpdateLatest(this.InstanceCode.ToString()); } } else { if (this.BusinessCode == "108" && maxSing == "1" && num == 1) { cn.justwin.BLL.ProgressManagement.Version.UpdateLatest(this.InstanceCode.ToString()); } } } } if (maxSing == "1") { this.MsgOrganiger(); } this.Session.Remove("HumanCode"); this.Session.Remove("HumanName"); this.JS.Text = "auditSuccess();"; } } } } catch { base.RegisterScript("alert('系统提示:\\n\\n此审核数据已经失效!')"); } }
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; }
protected void Page_Load(object sender, System.EventArgs e) { base.Response.Cache.SetNoStore(); if (!this.Page.IsPostBack) { this.Session.Remove("HumanCode"); this.Session.Remove("HumanName"); this.InstanceCode = new System.Guid(base.Request["ic"]); this.InstanceID = System.Convert.ToInt32(base.Request["id"]); this.Session["InstanceId"] = base.Request["id"]; if (!FlowAuditAction.GetNextOperator(this.InstanceID)) { this.NodeType.Value = FlowAuditAction.GetAuditorType(this.InstanceID); this.tr_selector.Style.Add("display", "block"); this.IBPick.Attributes["onclick"] = "SelectPerson();"; if (this.NodeType.Value == "2") { this.lblMessage.Visible = true; this.lblMessage.Text = "此节点类型为多人,必须选择多个人"; } else { this.lblMessage.Visible = false; } this.hfldNextAuditDepCode.Value = FlowAuditAction.GetNextAuditDep(this.InstanceID); } this.IsAllPass = base.Request["pass"]; this.hdnNodeID.Value = base.Request["nid"]; this.BusinessCode = base.Request["bc"].ToString(); this.BusinessClass = base.Request["bcl"].ToString(); if (this.hdnNodeID.Value == "0" || this.hdnNodeID.Value == "") { this.btnFront.Disabled = true; this.btnAfter.Disabled = true; } else { string currentAuditorType = FlowAuditAction.GetCurrentAuditorType(this.InstanceID); if (currentAuditorType != "1" && currentAuditorType != "") { this.btnFront.Disabled = true; this.btnAfter.Disabled = true; } else { this.btnFront.Disabled = false; this.btnAfter.Disabled = false; } } this.UserCode = System.Convert.ToString(this.Session["yhdm"]); this.hdnInstanceCode.Value = this.InstanceCode.ToString(); DataTable dataTable = FlowAuditAction.TempNodesList(this.Session["yhdm"].ToString(), this.InstanceCode); if (dataTable.Rows.Count > 0) { this.isSecValidate = dataTable.Rows[0]["isSecValidate"].ToString(); } if (this.isSecValidate == "0" || this.isSecValidate == "") { this.txtAuditPwd.Enabled = false; this.RequiredFieldValidator1.Enabled = false; this.LbAduPass.Enabled = false; this.LbAduPass.Visible = false; this.txtAuditPwd.Visible = false; this.RequiredFieldValidator1.Visible = false; } else { this.trPass.Visible = true; } string.Concat(new object[] { FlowAuditAction.DoWithUrl(this.BusinessCode), "ic=", this.InstanceCode, "&id=", this.InstanceID, "&pass="******"onclick"] = string.Concat(new string[] { "openAudit(0,'", this.BusinessCode, "','", this.BusinessClass, "');" }); this.btnAuditrecord.Attributes["onclick"] = string.Concat(new string[] { "openAudit(1,'", this.BusinessCode, "','", this.BusinessClass, "');" }); } this.FileUpload1.Folder = "/UploadFiles/Audit/" + this.InstanceCode.ToString(); this.FileUpload1.RecordCode = this.InstanceID.ToString(); if (this.BusinessCode == "126" || this.BusinessCode == "127" || this.BusinessCode == "128") { this.hfldIsAllowRebut.Value = "0"; return; } this.hfldIsAllowRebut.Value = "1"; }
protected void Page_Load(object sender, System.EventArgs e) { base.Response.Cache.SetNoStore(); if (!this.Page.IsPostBack) { this.Session.Remove("HumanCode"); this.Session.Remove("HumanName"); this.InstanceCode = new System.Guid(base.Request["ic"]); this.InstanceID = System.Convert.ToInt32(base.Request["id"]); this.Session["InstanceId"] = base.Request["id"]; if (!FlowAuditAction.GetNextOperator(this.InstanceID)) { this.tr_selector.Style.Add("display", "block"); } this.IsAllPass = base.Request["pass"]; this.hdnNodeID.Value = base.Request["nid"]; this.BusinessCode = base.Request["bc"].ToString(); this.BusinessClass = base.Request["bcl"].ToString(); if (this.hdnNodeID.Value == "0" || this.hdnNodeID.Value == "") { this.btnFront.Disabled = true; this.btnAfter.Disabled = true; } else { this.btnFront.Disabled = false; this.btnAfter.Disabled = false; } this.UserCode = System.Convert.ToString(this.Session["yhdm"]); this.hdnInstanceCode.Value = this.InstanceCode.ToString(); DataTable dataTable = FlowAuditAction.TempNodesList(this.Session["yhdm"].ToString(), this.InstanceCode); if (dataTable.Rows.Count > 0) { this.isSecValidate = dataTable.Rows[0]["isSecValidate"].ToString(); } if (this.isSecValidate == "0" || this.isSecValidate == "") { this.txtAuditPwd.Enabled = false; this.RequiredFieldValidator1.Enabled = false; this.LbAduPass.Enabled = false; this.LbAduPass.Visible = false; this.txtAuditPwd.Visible = false; this.RequiredFieldValidator1.Visible = false; } else { this.trPass.Visible = true; } string.Concat(new object[] { FlowAuditAction.DoWithUrl(this.BusinessCode), "ic=", this.InstanceCode, "&id=", this.InstanceID, "&pass="******"src"] = string.Concat(new object[] { FlowAuditAction.DoWithUrl(this.BusinessCode), "ic=", this.InstanceCode, "&id=", this.InstanceID, "&pass="******"onclick"] = string.Concat(new string[] { "openAudit(0,'", this.BusinessCode, "','", this.BusinessClass, "');" }); this.btnAuditrecord.Attributes["onclick"] = string.Concat(new string[] { "openAudit(1,'", this.BusinessCode, "','", this.BusinessClass, "');" }); } }