void btn_Click(object sender, EventArgs e) { FrmEvent fe = new FrmEvent(); fe.MyPK = this.FK_MapData + "_" + this.Event; fe.RetrieveFromDBSources(); EventLists xmls = new EventLists(); xmls.RetrieveAll(); foreach (EventList xml in xmls) { if (xml.No != this.Event) { continue; } string doc = this.Pub2.GetTextBoxByID("TB_Doc").Text.Trim(); if (doc == "" || doc == null) { if (fe.MyPK.Length > 3) { fe.Delete(); } continue; } fe.MyPK = this.FK_MapData + "_" + xml.No; fe.DoDoc = doc; fe.FK_Event = xml.No; fe.FK_MapData = this.FK_MapData; fe.HisDoType = (EventDoType)this.Pub2.GetDDLByID("DDL_EventDoType").SelectedItemIntVal; fe.MsgOKString = this.Pub2.GetTextBoxByID("TB_MsgOK").Text; fe.MsgErrorString = this.Pub2.GetTextBoxByID("TB_MsgErr").Text; fe.Save(); this.Response.Redirect("Action.aspx?NodeID=" + this.NodeID + "&MyPK=" + fe.MyPK + "&Event=" + xml.No, true); return; } }
protected void Page_Load(object sender, EventArgs e) { if (this.DoType == "Del") { FrmEvent delFE = new FrmEvent(); delFE.MyPK = this.FK_MapData + "_" + this.Request.QueryString["RefXml"]; delFE.Delete(); } FrmEvents ndevs = new FrmEvents(); if (this.FK_MapData != null) { ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData); } EventLists xmls = new EventLists(); xmls.RetrieveAll(); BP.WF.XML.EventSources ess = new EventSources(); ess.RetrieveAll(); string myEvent = this.Event; BP.WF.XML.EventList myEnentXml = null; #region //生成事件列表 foreach (EventSource item in ess) { if (item.No == "Frm" && this.FK_MapData == null) { continue; } if (item.No == "Node" && string.IsNullOrEmpty(this.NodeID)) { continue; } if (item.No == "Flow" && string.IsNullOrEmpty(this.FK_Flow)) { continue; } Pub1.Add(string.Format("<div title='{0}' style='padding:10px; overflow:auto' data-options=''>", item.Name)); Pub1.AddUL("class='navlist'"); foreach (BP.WF.XML.EventList xml in xmls) { if (xml.EventType != item.No) { continue; } FrmEvent nde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, xml.No) as FrmEvent; if (nde == null) { if (myEvent == xml.No) { CurrentEventGroup = item.Name; myEnentXml = xml; Pub1.AddLi( string.Format("<div style='font-weight:bold'><a href='javascript:void(0)'><span class='nav'>{0}</span></a></div>{1}", xml.Name, Environment.NewLine)); } else { Pub1.AddLi( string.Format("<div><a href='Action.aspx?NodeID={0}&Event={1}&FK_Flow={2}&tk={5}&FK_MapData={6}'><span class='nav'>{3}</span></a></div>{4}", NodeID, xml.No, FK_Flow, xml.Name, Environment.NewLine, new Random().NextDouble(), this.FK_MapData)); } } else { if (myEvent == xml.No) { CurrentEventGroup = item.Name; myEnentXml = xml; Pub1.AddLi( string.Format("<div style='font-weight:bold'><a href='javascript:void(0)'><span class='nav'>{0}</span></a></div>{1}", xml.Name, Environment.NewLine)); } else { Pub1.AddLi( string.Format("<div><a href='Action.aspx?NodeID={0}&Event={1}&FK_Flow={2}&MyPK={3}&tk={6}&FK_MapData={6}'><span class='nav'>{4}</span></a></div>{5}", NodeID, xml.No, FK_Flow, nde.MyPK, xml.Name, Environment.NewLine, new Random().NextDouble(), this.FK_MapData)); } } } Pub1.AddULEnd(); Pub1.AddDivEnd(); } #endregion if (myEnentXml == null) { CurrentEvent = "帮助"; Pub2.Add("<div style='width:100%; text-align:center' data-options='noheader:true'>"); Pub2.AddH2("事件是ccflow与您的应用程序接口"); this.Pub2.AddUL(); this.Pub2.AddLi("流程在运动的过程中会产生很多的事件,比如:节点发送前、发送成功时、发送失败时、退回前、退后后。"); this.Pub2.AddLi("在这些事件里ccflow允许调用您编写的业务逻辑,完成与界面交互、与其他系统交互、与其他流程参与人员交互。"); this.Pub2.AddLi("按照事件发生的类型,ccflow把事件分为:节点、表单、流程三类的事件。"); this.Pub2.AddULEnd(); Pub2.AddDivEnd(); return; } FrmEvent mynde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, myEvent) as FrmEvent; if (mynde == null) { mynde = new FrmEvent(); mynde.FK_Event = myEvent; } this.Title = "设置:事件接口=》" + myEnentXml.Name; this.CurrentEvent = myEnentXml.Name; int col = 50; Pub2.Add("<div id='tabMain' class='easyui-tabs' data-options='fit:true'>"); Pub2.Add("<div title='事件接口' style='padding:5px'>" + Environment.NewLine); Pub2.Add("<iframe id='src1' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); Pub2.Add("</div>" + Environment.NewLine); if (myEnentXml.IsHaveMsg == true) { HaveMsg = true; Pub2.Add("<div title='向当事人推送消息' style='padding:5px'>" + Environment.NewLine); Pub2.Add("<iframe id='src2' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); Pub2.Add("</div>" + Environment.NewLine); Pub2.Add("<div title='向其他指定的人推送消息' style='padding:5px'>" + Environment.NewLine); Pub2.Add("<iframe id='src3' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); Pub2.Add("</div>" + Environment.NewLine); } //BP.WF.Dev2Interface.Port_Login("zhoupeng"); // BP.WF.Dev2Interface.Port_SigOut(); Pub2.Add("</div>"); }
protected void Page_Load(object sender, EventArgs e) { if (this.DoType == "Del") { FrmEvent delFE = new FrmEvent(); delFE.MyPK = this.FK_MapData + "_" + this.Request.QueryString["RefXml"]; delFE.Delete(); } FrmEvents ndevs = new FrmEvents(); if (this.FK_MapData != null) { ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData); } EventLists xmls = new EventLists(); xmls.RetrieveAll(); BP.WF.XML.EventSources ess = new EventSources(); ess.RetrieveAll(); string myEvent = this.Event; BP.WF.XML.EventList myEnentXml = null; #region //生成事件列表 foreach (EventSource item in ess) { if (item.No != this.ShowType) { continue; } Pub1.Add(string.Format("<div title='{0}' style='padding:10px; overflow:auto' data-options=''>", item.Name)); Pub1.AddUL("class='navlist'"); string msg = ""; foreach (BP.WF.XML.EventList xml in xmls) { if (xml.EventType != item.No) { continue; } msg = ""; if (xml.IsHaveMsg == true) { msg = "<img src='/WF/Img/Msg.png' />"; } FrmEvent nde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, xml.No) as FrmEvent; if (nde == null) { if (myEvent == xml.No) { CurrentEventGroup = item.Name; myEnentXml = xml; Pub1.AddLi(string.Format("<div style='font-weight:bold'><a href='javascript:void(0)'><span class='nav'><img src='/WF/Img/Event.png' border=0/>" + msg + "{0}</span></a></div>{1}", xml.Name, Environment.NewLine)); } else { Pub1.AddLi(string.Format("<div><a href='Action.aspx?NodeID={0}&Event={1}&FK_Flow={2}&tk={5}&FK_MapData={6}'><span class='nav'><img src='/WF/Img/Event.png' border=0/>" + msg + "{3}</span></a></div>{4}", NodeID, xml.No, FK_Flow, xml.Name, Environment.NewLine, new Random().NextDouble(), this.FK_MapData)); } } else { if (myEvent == xml.No) { CurrentEventGroup = item.Name; myEnentXml = xml; Pub1.AddLi(string.Format("<div style='font-weight:bold'><a href='javascript:void(0)'><span class='nav'><img src='/WF/Img/Event.png' border=0/>" + msg + "{0}</span></a></div>{1}", xml.Name, Environment.NewLine)); } else { Pub1.AddLi(string.Format("<div><a href='Action.aspx?NodeID={0}&Event={1}&FK_Flow={2}&MyPK={3}&tk={6}&FK_MapData={7}'><span class='nav'><img src='/WF/Img/Event.png' border=0/>" + msg + "{4}</span></a></div>{5}", NodeID, xml.No, FK_Flow, nde.MyPK, xml.Name, Environment.NewLine, new Random().NextDouble(), this.FK_MapData)); } } } Pub1.AddULEnd(); Pub1.AddDivEnd(); } #endregion if (myEnentXml == null) { CurrentEvent = "帮助"; this.Pub2.Add("<div style='width:100%; text-align:left' data-options='noheader:true'>"); this.Pub2.AddH2("事件是ccbpm与您的应用程序接口"); if (this.NodeID != "0") { this.Pub2.AddFieldSet("节点事件"); this.Pub2.AddUL(); this.Pub2.AddLi("流程在运动过程中,有许多的事件,比如节点发送前、发送成功后、发送失败后、退回前、退回后、撤销发送前、这小发送后、流程结束前、结束后、删除前删除后。"); this.Pub2.AddLi("ccbpm把事件分为流程事件与节点事件,流程属性里定义流程事件,节点属性里定义节点事件。"); this.Pub2.AddLi("在这些事件里ccbpm允许调用您编写的业务逻辑,完成与界面交互、与其他系统交互、与其他流程参与人员交互。"); this.Pub2.AddLi("按照事件发生的类型,ccbpm把事件分为:节点、表单、流程三类的事件。"); this.Pub2.AddLi("在BPMN2.0规范里没有定义节点事件表单事件,这是ccbpm特有的概念与元素。"); this.Pub2.AddULEnd(); this.Pub2.AddFieldSetEnd(); } if (this.FK_Flow != null && this.NodeID == "0") { this.Pub2.AddFieldSet("流程事件"); this.Pub2.AddUL(); this.Pub2.AddLi("流程在运动过程中,有许多的事件,比如节点发送前、发送成功后、发送失败后、退回前、退回后、撤销发送前、这小发送后、流程结束前、结束后、删除前删除后。"); this.Pub2.AddLi("ccbpm把事件分为流程事件与节点事件,流程属性里定义流程事件,节点属性里定义节点事件。"); this.Pub2.AddLi("在这些事件里ccbpm允许调用您编写的业务逻辑,完成与界面交互、与其他系统交互、与其他流程参与人员交互。"); this.Pub2.AddLi("按照事件发生的类型,ccbpm把事件分为:节点、表单、流程三类的事件。"); this.Pub2.AddLi("在BPMN2.0规范里定义了,流程发起事件,流程发起错误事件。在ccbpm里取消了这些概念,取而代之的是开始节点的发送前、发送失败时、发送成功时的事件与之对应。"); this.Pub2.AddULEnd(); this.Pub2.AddFieldSetEnd(); } if (this.FK_MapData != null && this.FK_MapData != "") { this.Pub2.AddFieldSet("表单事件"); this.Pub2.AddUL(); this.Pub2.AddLi("流程在运动过程中,有许多的事件,比如节点发送前、发送成功后、发送失败后、退回前、退回后、撤销发送前、这小发送后、流程结束前、结束后、删除前删除后。"); this.Pub2.AddLi("ccbpm把事件分为流程事件与节点事件,流程属性里定义流程事件,节点属性里定义节点事件。"); this.Pub2.AddLi("在这些事件里ccbpm允许调用您编写的业务逻辑,完成与界面交互、与其他系统交互、与其他流程参与人员交互。"); this.Pub2.AddLi("按照事件发生的类型,ccbpm把事件分为:节点、表单、流程三类的事件。"); this.Pub2.AddLi("在BPMN2.0规范里定义了,流程发起事件,流程发起错误事件。在ccbpm里取消了这些概念,取而代之的是开始节点的发送前、发送失败时、发送成功时的事件与之对应。"); this.Pub2.AddULEnd(); this.Pub2.AddFieldSetEnd(); } this.Pub2.AddDivEnd(); return; } FrmEvent mynde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, myEvent) as FrmEvent; if (mynde == null) { mynde = new FrmEvent(); mynde.FK_Event = myEvent; } this.Title = "设置:事件接口=》" + myEnentXml.Name; this.CurrentEvent = myEnentXml.Name; Pub2.Add("<div id='tabMain' class='easyui-tabs' data-options='fit:true'>"); Pub2.Add("<div title='事件接口' style='padding:5px'>" + Environment.NewLine); Pub2.Add("<iframe id='src1' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); Pub2.Add("</div>" + Environment.NewLine); /* 该模块jflow暂时不翻译,注释掉 by fanleiwei 20160531 * if (myEnentXml.IsHaveMsg == true) * { * HaveMsg = true; * Pub2.Add("<div title='向当事人推送消息' style='padding:5px'>" + Environment.NewLine); * Pub2.Add("<iframe id='src2' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); * Pub2.Add("</div>" + Environment.NewLine); * * Pub2.Add("<div title='向其他指定的人推送消息' style='padding:5px'>" + Environment.NewLine); * Pub2.Add("<iframe id='src3' frameborder='0' src='' style='width:100%;height:100%' scrolling='auto'></iframe>"); * Pub2.Add("</div>" + Environment.NewLine); * } */ Pub2.Add("</div>"); }
protected void Page_Load(object sender, EventArgs e) { if (this.DoType == "Del") { FrmEvent delFE = new FrmEvent(); delFE.MyPK = this.FK_MapData + "_" + this.Request.QueryString["RefXml"]; delFE.Delete(); } this.Pub3.AddCaptionLeft("节点表单/节点/流程:事件"); FrmEvents ndevs = new FrmEvents(); ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData); EventLists xmls = new EventLists(); xmls.RetrieveAll(); BP.WF.XML.EventSources ess = new EventSources(); ess.RetrieveAll(); string myEvent = this.Event; BP.WF.XML.EventList myEnentXml = null; foreach (EventSource item in ess) { this.Pub1.AddFieldSet(item.Name); this.Pub1.AddUL(); foreach (BP.WF.XML.EventList xml in xmls) { if (xml.EventType != item.No) { continue; } FrmEvent nde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, xml.No) as FrmEvent; if (nde == null) { if (myEvent == xml.No) { myEnentXml = xml; this.Pub1.AddLi("<font color=green><b>" + xml.Name + "</b></font>"); } else { this.Pub1.AddLi("Action.aspx?NodeID=" + this.NodeID + "&Event=" + xml.No + "&FK_Flow=" + this.FK_Flow, xml.Name); } } else { if (myEvent == xml.No) { myEnentXml = xml; this.Pub1.AddLi("<font color=green><b>" + xml.Name + "</b></font>"); } else { this.Pub1.AddLi("Action.aspx?NodeID=" + this.NodeID + "&Event=" + xml.No + "&MyPK=" + nde.MyPK + "&FK_Flow=" + this.FK_Flow, "<b>" + xml.Name + "</b>"); } } } this.Pub1.AddULEnd(); this.Pub1.AddFieldSetEnd(); } if (myEnentXml == null) { this.Pub2.AddFieldSet("帮助"); this.Pub2.AddH2("事件是ccflow与您的应用程序接口,"); this.Pub2.AddFieldSetEnd(); return; } FrmEvent mynde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, myEvent) as FrmEvent; if (mynde == null) { mynde = new FrmEvent(); } this.Title = "设置:事件接口=》" + myEnentXml.Name; this.Pub2.AddFieldSet(myEnentXml.Name); int col = 80; this.Pub2.Add("内容类型:"); DDL ddl = new DDL(); ddl.BindSysEnum("EventDoType"); ddl.ID = "DDL_EventDoType"; ddl.SetSelectItem((int)mynde.HisDoType); this.Pub2.Add(ddl); this.Pub2.Add(" 要执行的内容<br>"); TextBox tb = new TextBox(); tb.ID = "TB_Doc"; tb.Columns = col; tb.TextMode = TextBoxMode.MultiLine; tb.Rows = 10; tb.Text = mynde.DoDoc; this.Pub2.Add(tb); this.Pub2.AddBR(); tb = new TextBox(); tb.ID = "TB_MsgOK"; tb.Columns = col; tb.Text = mynde.MsgOKString; tb.TextMode = TextBoxMode.MultiLine; tb.Rows = 4; this.Pub2.Add("执行成功信息提示(可为空)<br>"); this.Pub2.Add(tb); this.Pub2.AddBR(); this.Pub2.Add("执行失败信息提示(可为空)<br>"); tb = new TextBox(); tb.ID = "TB_MsgErr"; tb.Columns = col; tb.Text = mynde.MsgErrorString; tb.TextMode = TextBoxMode.MultiLine; tb.Rows = 4; this.Pub2.Add(tb); this.Pub2.AddBR(); Button btn = new Button(); btn.ID = "Btn_Save"; btn.Text = "Save"; btn.CssClass = "Btn"; btn.Click += new EventHandler(btn_Click); this.Pub2.Add(" "); this.Pub2.Add(btn); if (this.MyPK != null) { this.Pub2.Add(" <a href=\"javascript:DoDel('" + this.NodeID + "','" + this.Event + "')\"><img src='/WF/Img/Btn/Delete.gif' />删除</a>"); } this.Pub2.AddFieldSetEnd(); }