コード例 #1
0
        /// <summary>
        /// 获得该节点下已经绑定该类型的实体.
        /// </summary>
        /// <returns></returns>
        public string ActionDtl_Init()
        {
            DataSet ds = new DataSet();

            //事件实体.
            FrmEvents ndevs = new FrmEvents();

            ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData);

            DataTable dt = ndevs.ToDataTableField("FrmEvents");

            ds.Tables.Add(dt);

            //业务单元集合.
            DataTable dtBuess = new DataTable();

            dtBuess.Columns.Add("No", typeof(string));
            dtBuess.Columns.Add("Name", typeof(string));
            dtBuess.TableName = "BuessUnits";
            ArrayList al = BP.En.ClassFactory.GetObjects("BP.Sys.BuessUnitBase");

            foreach (BuessUnitBase en in al)
            {
                DataRow dr = dtBuess.NewRow();
                dr["No"]   = en.ToString();
                dr["Name"] = en.Title;
                dtBuess.Rows.Add(dr);
            }

            ds.Tables.Add(dtBuess);

            return(BP.Tools.Json.ToJson(ds));
        }
コード例 #2
0
        /// <summary>
        /// 事件基类
        /// </summary>
        /// <returns></returns>
        public string Action_Init()
        {
            DataSet ds = new DataSet();

            //事件实体.
            FrmEvents ndevs = new FrmEvents();

            if (BP.DA.DataType.IsNullOrEmpty(this.FK_MapData) == false)
            {
                ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData);
            }

            ////已经配置的事件类实体.
            //DataTable dtFrm = ndevs.ToDataTableField("FrmEvents");
            //ds.Tables.Add(dtFrm);

            //把事件类型列表放入里面.(发送前,发送成功时.)
            EventLists xmls = new EventLists();

            xmls.Retrieve("EventType", this.ShowType);

            DataTable dt = xmls.ToDataTable();

            dt.TableName = "EventLists";
            ds.Tables.Add(dt);

            return(BP.Tools.Json.ToJson(ds));
        }
コード例 #3
0
        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();
            }

            MapDtl dtl = new MapDtl(this.FK_MapData);

            this.Pub3.AddCaptionLeft("从表:" + dtl.Name);

            this.Title = "设置:从表事件";
            FrmEvents ndevs = new FrmEvents();

            ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData);
            EventListDtls xmls = new EventListDtls();

            xmls.RetrieveAll();

            string myEvent = this.Event;

            BP.WF.XML.EventListDtl myEnentXml = null;

            this.Pub1.Add("<a href='http://ccflow.org' target=_blank ><img src='/DataUser/ICON/" + SystemConfig.CompanyID + "/LogBiger.png' /></a>");
            this.Pub1.AddUL();
            foreach (BP.WF.XML.EventListDtl xml in xmls)
            {
                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?FK_MapData=" + this.FK_MapData + "&Event=" + xml.No, 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?FK_MapData=" + this.FK_MapData + "&Event=" + xml.No + "&MyPK=" + nde.MyPK, "<b>" + xml.Name + "</b>");
                    }
                }
            }
            this.Pub1.AddULEnd();

            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.Pub2.AddFieldSet(myEnentXml.Name);
            this.Pub2.Add("要执行的内容<br>");
            TextBox tb = new TextBox();

            tb.ID       = "TB_Doc";
            tb.Columns  = 70;
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 5;
            tb.Text     = mynde.DoDoc;
            this.Pub2.Add(tb);
            this.Pub2.AddHR();

            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.AddHR();

            tb          = new TextBox();
            tb.ID       = "TB_MsgOK";
            tb.Columns  = 70;
            tb.Text     = mynde.MsgOKString;
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 3;

            this.Pub2.Add("执行成功信息提示<br>");
            this.Pub2.Add(tb);
            this.Pub2.AddHR();

            this.Pub2.Add("执行失败信息提示<br>");
            tb          = new TextBox();
            tb.ID       = "TB_MsgErr";
            tb.Columns  = 70;
            tb.Text     = mynde.MsgErrorString;
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 3;
            this.Pub2.Add(tb);
            this.Pub2.AddFieldSetEnd();

            Button btn = new Button();

            btn.ID       = "Btn_Save";
            btn.CssClass = "Btn";
            btn.Text     = "  Save  ";
            btn.Click   += new EventHandler(btn_Click);
            this.Pub2.Add(btn);

            if (this.MyPK != null)
            {
                this.Pub2.Add("&nbsp;&nbsp;<a href=\"javascript:DoDel('" + this.FK_MapData + "','" + this.Event + "')\"><img src='/WF/Img/Btn/Delete.gif' />删除</a>");
            }
        }
コード例 #4
0
        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>");
        }
コード例 #5
0
        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>");
        }
コード例 #6
0
        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("&nbsp;要执行的内容<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("&nbsp;&nbsp;");
            this.Pub2.Add(btn);
            if (this.MyPK != null)
            {
                this.Pub2.Add("&nbsp;&nbsp;<a href=\"javascript:DoDel('" + this.NodeID + "','" + this.Event + "')\"><img src='/WF/Img/Btn/Delete.gif' />删除</a>");
            }
            this.Pub2.AddFieldSetEnd();
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            FrmEvents ndevs = new FrmEvents();

            ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData);

            FrmEvent mynde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, this.Event) as FrmEvent;

            if (mynde == null)
            {
                mynde          = new FrmEvent();
                mynde.FK_Event = this.Event;
            }

            if (!string.IsNullOrWhiteSpace(this.EventDoType))
            {
                mynde.HisDoType = (EventDoType)Enum.Parse(typeof(EventDoType), this.EventDoType);
            }

            this.Pub1.AddTable("class='Table' cellspacing='1' cellpadding='1' border='1' style='width:100%'");

            //删除旧类型.
            BP.DA.DBAccess.RunSQL("delete from sys_enum where enumkey='EventDoType'");

            this.Pub1.AddTR();
            this.Pub1.AddTD("width='200'", "内容类型:");
            DDL ddl = new DDL();

            ddl.BindSysEnum("EventDoType");
            ddl.ID = "DDL_EventDoType";
            ddl.SetSelectItem((int)mynde.HisDoType);
            ddl.Attributes["onchange"] = string.Format("location.href='ActionEvent.aspx?NodeID={0}&MyPK={1}&Event={2}&FK_MapData={3}&EventDoType=' + this.options[this.selectedIndex].value + '&tk=' + Math.random()", this.NodeID, this.MyPK, this.Event, this.FK_MapData);
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTREnd();

            TextBox tb = null;

            #region //执行DLL类方法设置, edited by liuxc,2016-01-17
            if (mynde.HisDoType == BP.Sys.EventDoType.SpecClass)
            {
                this.Pub1.AddTR();
                this.Pub1.AddTD("选择一个DLL文件:");
                //绑定 DLL 文件.
                ddl    = new DDL();
                ddl.ID = "DDL_MonthedDLL";
                string[] fs = System.IO.Directory.GetFiles(BP.Sys.SystemConfig.PathOfWebApp + "\\Bin\\", "*.dll");
                foreach (string str in fs)
                {
                    string mystr = str.Replace(BP.Sys.SystemConfig.PathOfWebApp + "\\Bin\\", "");
                    switch (mystr)
                    {
                    case "BitmapCutter.Core.dll":
                    case "BP.Demo.dll":
                    //   case "BP.En30.dll":
                    case "BP.GPM.dll":
                    case "BP.GPMClient.dll":
                    case "BP.Web.Controls.dll":
                    //  case "BP.WF.dll":
                    case "CCFlow.dll":
                    case "ChineseConverter.dll":
                    case "FtpSupport.dll":
                    case "FusionCharts.dll":
                    case "IBM.Data.Informix.dll":
                    case "ICSharpCode.SharpZipLib.dll":
                    case "Interop.Excel.dll":
                    case "Interop.VBIDE.dll":
                    case "Microsoft.Expression.Interactions.dll":
                    case "Microsoft.Web.UI.WebControls.dll":
                    case "Newtonsoft.Json.dll":
                    case "NPOI.dll":
                    case "NPOI.OOXML.dll":
                    case "NPOI.OpenXml4Net.dll":
                    case "NPOI.OpenXmlFormats.dll":
                    case "office.dll":
                    case "Silverlight.DataSetConnector.dll":
                    case "System.Windows.Interactivity.dll":
                        continue;

                    default:
                        break;
                    }

                    ddl.Items.Add(new ListItem(mystr, str));
                    //ddl.Items.Add(new ListItem(str, str));
                }
                ddl.SetSelectItem(mynde.MonthedDLL);
                ddl.AutoPostBack          = true;
                ddl.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged);
                this.Pub1.AddTD(ddl);
                this.Pub1.AddTREnd();


                //获得类名.
                this.Pub1.AddTR();
                this.Pub1.AddTD("选择一个类名:");

                Assembly abl   = Assembly.LoadFrom(ddl.SelectedItemStringVal); // 载入程序集
                Type[]   types = abl.GetTypes();
                ddl    = new DDL();
                ddl.ID = "DDL_MonthedClass";

                //绑定类名称.
                Type mytype = this.InitClassName(ddl, types, mynde.MonthedClass);
                ddl.SetSelectItem(mynde.MonthedClass);
                ddl.AutoPostBack          = true;
                ddl.SelectedIndexChanged += new EventHandler(ddl_Class_SelectedIndexChanged);
                this.Pub1.AddTD(ddl);
                this.Pub1.AddTREnd();


                this.Pub1.AddTR();
                this.Pub1.AddTD("选择一个方法:");

                ddl    = new DDL();
                ddl.ID = "DDL_MonthedName";
                //绑定方法.
                ParameterInfo[] myPI = this.InitMethodName(ddl, mytype.GetMethods(), mynde.MonthedName);
                ddl.SetSelectItem(mynde.MonthedName);
                ddl.AutoPostBack          = true;
                ddl.SelectedIndexChanged += new EventHandler(ddl_Monthed_SelectedIndexChanged);
                this.Pub1.AddTD(ddl);
                this.Pub1.AddTREnd();

                #region 参数与参数格式.

                this.Pub1.AddTR();
                this.Pub1.AddTD("执行方法的参数");
                //参数.
                tb         = new TextBox();
                tb.ID      = "TB_MonthedParas";
                tb.Text    = mynde.MonthedParas.Replace("~", "@");
                tb.Columns = 80;
                this.Pub1.AddTD(tb);
                this.Pub1.AddTREnd();


                this.Pub1.AddTR();
                this.Pub1.AddTD("参数格式:");

                Label lab = new Label();
                lab.ID   = "Lab_Note";
                lab.Text = this.GenerParas(myPI);
                this.Pub1.AddTD(lab);
                this.Pub1.AddTREnd();

                #endregion 参数与参数格式.
            }
            #endregion

            this.Pub1.AddTR();
            this.Pub1.AddTDBegin("colspan=2");
            this.Pub1.Add("&nbsp;要执行的内容<br>");
            tb         = new TextBox();
            tb.ID      = "TB_Doc";
            tb.Columns = 50;
            tb.Style.Add("width", "99%");
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 5;
            tb.Text     = mynde.DoDoc;
            this.Pub1.Add(tb);
            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDBegin("colspan=2");
            tb    = new TextBox();
            tb.ID = "TB_MsgOK";
            tb.Style.Add("width", "99%");
            tb.Text = mynde.MsgOKString;
            this.Pub1.Add("执行成功信息提示(可为空)<br>");
            this.Pub1.Add(tb);
            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDBegin("colspan=2");
            this.Pub1.Add("执行失败信息提示(可为空)<br>");
            tb    = new TextBox();
            tb.ID = "TB_MsgErr";
            tb.Style.Add("width", "99%");
            tb.Text = mynde.MsgErrorString;
            this.Pub1.Add(tb);
            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();
            this.Pub1.AddTableEnd();
            Pub1.AddBR();
            Pub1.AddSpace(1);

            var btn = new LinkBtn(false, NamesOfBtn.Save, "保存");
            btn.Click += new EventHandler(btn_Click);
            Pub1.Add(btn);

            if (!string.IsNullOrWhiteSpace(this.MyPK))
            {
                Pub1.AddSpace(1);
                Pub1.Add(
                    string.Format(
                        "<a href='javascript:void(0)' onclick=\"DoDel('{2}','{0}','{1}')\" class='easyui-linkbutton' data-options=\"iconCls:'icon-delete'\">删除</a>",
                        NodeID, Event, FK_Flow));
            }
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            FrmEvents ndevs = new FrmEvents();

            ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData);

            FrmEvent mynde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, this.Event) as FrmEvent;

            if (mynde == null)
            {
                mynde          = new FrmEvent();
                mynde.FK_Event = this.Event;
            }

            this.Pub1.AddTable("class='Table' cellspacing='1' cellpadding='1' border='1' style='width:100%'");

            this.Pub1.AddTR();
            this.Pub1.AddTD("控制方式");
            var ddl = new DDL();

            ddl.BindSysEnum("MsgCtrl");
            ddl.ID = "DDL_" + FrmEventAttr.MsgCtrl;
            ddl.SetSelectItem((int)mynde.MsgCtrl);
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTD("");
            CheckBox cb = new CheckBox();

            cb.ID      = "CB_" + FrmEventAttr.MsgMailEnable;
            cb.Text    = "是否启用邮件通知?";
            cb.Checked = mynde.MsgMailEnable;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTD("邮件标题模版");
            var tb = new TextBox();

            tb.ID   = "TB_" + FrmEventAttr.MailTitle;
            tb.Text = mynde.MailTitle_Real;
            tb.Style.Add("width", "99%");
            this.Pub1.AddTD(tb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTD("邮件内容模版:");
            tb          = new TextBox();
            tb.ID       = "TB_" + FrmEventAttr.MailDoc;
            tb.Text     = mynde.MailDoc_Real;
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Columns  = 50;
            tb.Rows     = 4;
            tb.Style.Add("width", "99%");
            this.Pub1.AddTD(tb);
            this.Pub1.AddTREnd();

            //手机短信....
            this.Pub1.AddTR();
            this.Pub1.AddTD("默认:不启用");
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmEventAttr.SMSEnable;
            cb.Text    = "是否启用手机短信通知?";
            cb.Checked = mynde.SMSEnable;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();

            tb      = new TextBox();
            tb.ID   = "TB_" + FrmEventAttr.SMSDoc;
            tb.Text = mynde.SMSDoc_Real;
            tb.Style.Add("width", "99%");
            tb.Rows = 2;
            this.Pub1.AddTR();
            if (string.IsNullOrEmpty(tb.Text) == true)
            {
                this.Pub1.AddTD("短信模版:");
            }
            else
            {
                this.Pub1.AddTD("短信模版");
            }

            this.Pub1.AddTD(tb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTD("默认:启用");
            cb         = new CheckBox();
            cb.ID      = "CB_" + FrmEventAttr.MobilePushEnable;
            cb.Text    = "是否启用手机应用,平板应用信息推送?";
            cb.Checked = mynde.MobilePushEnable;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();
            this.Pub1.AddTableEnd();

            Pub1.AddBR();
            Pub1.AddSpace(1);

            var btn = new LinkBtn(false, NamesOfBtn.Save, "保存");

            btn.Click += new EventHandler(btn_Click);
            Pub1.Add(btn);
        }
コード例 #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            FrmEvents ndevs = new FrmEvents();

            ndevs.Retrieve(FrmEventAttr.FK_MapData, this.FK_MapData);

            FrmEvent mynde = ndevs.GetEntityByKey(FrmEventAttr.FK_Event, this.Event) as FrmEvent;

            if (mynde == null)
            {
                mynde          = new FrmEvent();
                mynde.FK_Event = this.Event;
            }

            this.Pub1.AddTable("class='Table' cellspacing='1' cellpadding='1' border='1' style='width:100%'");

            this.Pub1.AddTR();
            this.Pub1.AddTD("内容类型:");
            DDL ddl = new DDL();

            ddl.BindSysEnum("EventDoType");
            ddl.ID = "DDL_EventDoType";
            ddl.SetSelectItem((int)mynde.HisDoType);
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDBegin("colspan=2");
            this.Pub1.Add("&nbsp;要执行的内容<br>");
            TextBox tb = new TextBox();

            tb.ID      = "TB_Doc";
            tb.Columns = 50;
            tb.Style.Add("width", "99%");
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 20;
            tb.Text     = mynde.DoDoc;
            this.Pub1.Add(tb);
            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDBegin("colspan=2");
            tb    = new TextBox();
            tb.ID = "TB_MsgOK";
            tb.Style.Add("width", "99%");
            tb.Text = mynde.MsgOKString;
            this.Pub1.Add("执行成功信息提示(可为空)<br>");
            this.Pub1.Add(tb);
            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDBegin("colspan=2");
            this.Pub1.Add("执行失败信息提示(可为空)<br>");
            tb    = new TextBox();
            tb.ID = "TB_MsgErr";
            tb.Style.Add("width", "99%");
            tb.Text = mynde.MsgErrorString;
            this.Pub1.Add(tb);
            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();
            this.Pub1.AddTableEnd();
            Pub1.AddBR();
            Pub1.AddSpace(1);

            var btn = new LinkBtn(false, NamesOfBtn.Save, "保存");

            btn.Click += new EventHandler(btn_Click);
            Pub1.Add(btn);

            if (!string.IsNullOrWhiteSpace(this.MyPK))
            {
                Pub1.AddSpace(1);
                Pub1.Add(
                    string.Format(
                        "<a href='javascript:void(0)' onclick=\"DoDel('{0}','{1}')\" class='easyui-linkbutton' data-options=\"iconCls:'icon-delete'\">删除</a>",
                        NodeID, Event));
            }
        }