/// <summary> /// Pub1中添加LinkBtn按钮 /// </summary> /// <param name="btnId">按钮的id</param> /// <param name="btnText">按钮的文字</param> private void AddButton(string btnId, string btnText) { LinkBtn btn = new LinkBtn(false, btnId, " " + btnText); btn.Click += new EventHandler(btn_Click); Pub1.Add(btn); }
protected void Page_Load(object sender, EventArgs e) { // BP.Sys.MapData.GenerSpanHeight(null, 2); BP.WF.Flow fl = new BP.WF.Flow(this.FK_Flow); string sql = "SELECT Title FROM " + fl.PTable + " WHERE OID=" + this.WorkID; if (this.FID != 0) { sql = "SELECT Title FROM " + fl.PTable + " WHERE OID=" + this.FID; } string title = BP.DA.DBAccess.RunSQLReturnStringIsNull(sql, null); if (title == null) { this.Pub1.AddFieldSet("错误", "系统出现异常,请联系管理员。"); } this.Title = "工作抄送"; this.Pub1.AddTable("width='100%' border=1"); this.Pub1.AddCaptionLeft("请选择或者输入人员(多个人员用逗号隔开),然后点发送按钮..."); this.Pub1.AddTR(); //this.Pub1.AddTDTitle("接受人:"); this.Pub1.Add("<TD style='text-align:center;' width='20%' valign='middle'><h5>接受人:</h5></TD>"); HiddenField hidden = new HiddenField(); hidden.ID = "HID_SelectedEmps"; TextBox tb = new TextBox(); tb.ID = "TB_Accepter"; tb.Width = 500; Pub1.AddTDBegin("width='530'"); Pub1.Add(tb); Pub1.Add(hidden); Pub1.AddTDEnd(); Button mybtn = new Button(); mybtn.CssClass = "Btn"; mybtn.Text = "选择接受人"; mybtn.OnClientClick += "javascript:ShowIt(" + tb.ClientID + "," + hidden.ClientID + ");"; this.Pub1.AddTD(mybtn); this.Pub1.AddTREnd(); this.Pub1.AddTR(); //this.Pub1.AddTDTitle("标题:"); this.Pub1.Add("<TD style='text-align:center;' valign='middle'><h5>标题:</h5></TD>"); tb = new TextBox(); tb.ID = "TB_Title"; tb.Width = 500; tb.Text = title; this.Pub1.AddTD(" colspan=2", tb); //this.Pub1.AddTD(); this.Pub1.AddTREnd(); this.Pub1.AddTR(); //this.Pub1.AddTDTitle("消<BR>息<BR>内<br>容"); this.Pub1.Add("<TD style='text-align:center;' valign='middle'><h5>消<BR><BR>息<BR><BR>内<br><BR>容</h5></TD>"); tb = new TextBox(); tb.ID = "TB_Doc"; tb.Width = 500; tb.TextMode = TextBoxMode.MultiLine; tb.Rows = 12; this.Pub1.AddTD(" colspan=2", tb); this.Pub1.AddTREnd(); this.Pub1.AddTR(); this.Pub1.AddTD(""); Button btn = new Button(); btn.CssClass = "Btn"; btn.ID = "btn"; btn.Click += new EventHandler(btn_Click); btn.Text = "执行抄送"; this.Pub1.AddTD(" colspan=2", btn); //this.Pub1.AddTD(""); this.Pub1.AddTREnd(); this.Pub1.AddTableEnd(); }
protected void Page_Load(object sender, EventArgs e) { string receiver = this.Request.QueryString["RE"]; string mypk = this.Request.QueryString["MyPK"]; BP.WF.SMS sms = null; if (mypk != null) { sms = new SMS(); sms.MyPK = mypk; sms.RetrieveFromDBSources(); } this.Pub1.AddTable(); // (" id='recTable' class='Table' cellpadding='0' cellspacing='0' border='0' style='width:100%;margin-left:auto;margin-right:auto;' "); this.Pub1.AddCaptionMsg("消息回复"); //("<caption><div class='CaptionMsg'>消息</div></caption>"); this.Pub1.AddTR(); this.Pub1.AddTD("接受人:"); TB tb = new TB(); tb.ID = "rec"; tb.Width = 430; if (!string.IsNullOrEmpty(receiver) && !string.IsNullOrEmpty(mypk)) { Emp emp = new Emp(receiver); tb.Text = emp.Name; tb.ReadOnly = true; this.Pub1.AddTD(tb); } else { this.Pub1.AddTDBegin(); this.Pub1.Add(tb); HiddenField hid = new HiddenField(); hid.ID = "Hid_FQR"; Pub1.Add(hid); this.Pub1.Add("<a onclick=\"openSelectEmp('" + hid.ClientID + "','" + tb.ClientID + "')\" href='javascript:;'>添加人员</a>"); this.Pub1.AddTDEnd(); } this.Pub1.AddTREnd(); this.Pub1.AddTR(); this.Pub1.AddTD("标题"); tb = new TB(); tb.ID = "title"; if (sms != null) { tb.Text = "RE:" + sms.Title; } tb.Width = 430; this.Pub1.AddTD(tb); this.Pub1.AddTREnd(); this.Pub1.AddTR(); this.Pub1.AddTD("正文"); tb = new TB(); tb.ID = "con"; tb.TextMode = TextBoxMode.MultiLine; tb.Width = 430; tb.Height = 120; if (sms != null) { tb.Text = "\t\n ------------------ \t\n " + sms.DocOfEmail; } this.Pub1.AddTD(tb); this.Pub1.AddTREnd(); this.Pub1.AddTR(); this.Pub1.AddTDBegin(" colspan=2 "); Button btn = new Button(); btn.ID = "Btn_Save"; btn.Text = "发送"; btn.Click += new EventHandler(btn_Save_Click); Button btnClose = new Button(); btnClose.ID = "Btn_Close"; btnClose.Text = "取消"; btnClose.Click += new EventHandler(btnClose_Click); this.Pub1.Add(btn); this.Pub1.Add(btnClose); this.Pub1.AddTDEnd(); this.Pub1.AddTREnd(); this.Pub1.AddTableEnd(); }
protected void Page_Load(object sender, EventArgs e) { PushMsgs msgs = new PushMsgs(this.FK_Flow); var msg = msgs.GetEntityByKey(PushMsgAttr.FK_Event, this.Event, PushMsgAttr.FK_Node, int.Parse(this.NodeID)) as PushMsg; if (msg == null) { msg = new PushMsg(); msg.FK_Event = this.Event; msg.FK_Node = int.Parse(this.NodeID); } if (!string.IsNullOrWhiteSpace(this.ThePushWay)) { if (this.ThePushWay != msg.PushWay.ToString()) { msg.PushDoc = string.Empty; msg.Tag = string.Empty; } msg.PushWay = int.Parse(this.ThePushWay); } this.Pub1.AddTable("class='Table' cellspacing='1' cellpadding='1' border='1' style='width:100%'"); this.Pub1.AddTR(); this.Pub1.AddTD("style='width:100px'", "推送设置方式:"); var ddl = new DDL(); ddl.BindSysEnum(PushMsgAttr.PushWay); ddl.ID = "DDL_" + PushMsgAttr.PushWay; ddl.SetSelectItem((int)msg.PushWay); ddl.AutoPostBack = true; ddl.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged); this.Pub1.AddTD(ddl); this.Pub1.AddTREnd(); switch ((PushWay)msg.PushWay) { case PushWay.ByParas: #region 照系统指定参数 Pub1.AddTR(); Pub1.AddTD("输入参数名:"); Pub1.AddTDBegin(); var rad = new RadioBtn(); rad.GroupName = "Para"; rad.ID = "RB_0"; rad.Text = "系统参数"; rad.Checked = msg.PushDoc == "0"; Pub1.Add(rad); var tb = new TB(); tb.ID = "TB_" + PushMsgAttr.Tag; if (msg.PushDoc == "0") { tb.Text = msg.Tag; } else { tb.Text = "NoticeTo"; } Pub1.Add(tb); Pub1.Add(" 默认为NoticeTo"); Pub1.AddBR(); rad = new RadioBtn(); rad.GroupName = "Para"; rad.ID = "RB_1"; rad.Text = "表单字段参数"; rad.Checked = msg.PushDoc == "1"; Pub1.Add(rad); MapAttrs attrs = new MapAttrs(); attrs.Retrieve(MapAttrAttr.FK_MapData, "ND" + this.NodeID); MapAttrs attrNs = new MapAttrs(); foreach (MapAttr attr in attrs) { if (attr.IsBigDoc) { continue; } switch (attr.KeyOfEn) { case "Title": case "FK_Emp": case "MyNum": case "FK_NY": case WorkAttr.Emps: case WorkAttr.OID: case StartWorkAttr.Rec: case StartWorkAttr.FID: continue; default: break; } attrNs.AddEntity(attr); } ddl = new DDL(); ddl.ID = "DDL_" + PushMsgAttr.Tag; ddl.BindEntities(attrNs, MapAttrAttr.MyPK, MapAttrAttr.Name); ddl.AutoPostBack = false; if (msg.PushDoc == "1") { ddl.SetSelectItem(msg.Tag); } Pub1.Add(ddl); Pub1.AddTREnd(); #endregion break; case PushWay.NodeWorker: #region 照指定结点的工作人员 Pub1.AddTR(); Pub1.AddTDBegin("colspan='2'"); Pub1.Add("请选择要推送到的节点工作人员:<br />"); Nodes nds = new Nodes(this.FK_Flow); CheckBox cb = null; foreach (BP.WF.Node nd in nds) { if (nd.NodeID == int.Parse(this.NodeID)) { continue; } cb = new CheckBox(); cb.ID = "CB_" + nd.NodeID; cb.Text = nd.NodeID + " " + nd.Name; cb.Checked = msg.PushDoc.Contains("@" + nd.NodeID + "@"); Pub1.Add(cb); Pub1.AddBR(); } Pub1.AddTDEnd(); Pub1.AddTREnd(); #endregion break; case PushWay.SpecDepts: #region 照指定的部门 Pub1.AddTR(); Pub1.AddTDBegin("colspan='2'"); this.Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); this.Pub1.AddTR(); this.Pub1.AddTD("colspan='3' class='GroupTitle'", "部门选择"); this.Pub1.AddTREnd(); //NodeDepts ndepts = new NodeDepts(int.Parse(this.NodeID)); Depts depts = new Depts(); depts.RetrieveAll(); int i = 0; //foreach (NodeDept dept in ndepts) foreach (Dept dept in depts) { i++; if (i == 4) { i = 1; } if (i == 1) { Pub1.AddTR(); } cb = new CheckBox(); //cb.ID = "CB_" + dept.FK_Dept; //cb.Text = (depts.GetEntityByKey(dept.FK_Dept) as Dept).Name; cb.ID = "CB_" + dept.No; cb.Text = dept.Name; //if (msg.PushDoc.Contains("@" + dept.FK_Dept + "@")) if (msg.PushDoc.Contains("@" + dept.No + "@")) { cb.Checked = true; } this.Pub1.AddTD(cb); if (i == 3) { Pub1.AddTREnd(); } } switch (i) { case 1: Pub1.AddTD(); Pub1.AddTD(); Pub1.AddTREnd(); break; case 2: Pub1.AddTD(); Pub1.AddTREnd(); break; default: break; } this.Pub1.AddTableEnd(); Pub1.AddTDEnd(); Pub1.AddTREnd(); #endregion break; case PushWay.SpecEmps: #region 照指定的人员 Pub1.AddTR(); //Pub1.AddTDBegin("colspan='2'"); Pub1.AddTD("选择人员:"); Pub1.AddTDBegin(); tb = new TB(); tb.ID = "TB_Users"; tb.TextMode = TextBoxMode.MultiLine; tb.Style.Add("width", "99%"); tb.Rows = 4; tb.ReadOnly = true; var hf = new HiddenField(); hf.ID = "HID_Users"; //加载已经选择的人员 if (!string.IsNullOrWhiteSpace(msg.PushDoc)) { hf.Value = msg.PushDoc.Replace("@@", ",").Trim('@'); var emps = new Emps(); emps.RetrieveAll(); tb.Text = hf.Value.Split(',').Select(o => (emps.GetEntityByKey(o) as Emp).Name).Aggregate( string.Empty, (curr, next) => curr + next + ",").TrimEnd(','); } Pub1.Add(tb); Pub1.Add(hf); Pub1.AddBR(); Pub1.AddBR(); Pub1.Add( "<a class='easyui-linkbutton' data-options=\"iconCls:'icon-user'\" href='javascript:void(0)' onclick=\"showWin('../Comm/Port/SelectUser_Jq.aspx','" + tb.ClientID + "','" + hf.ClientID + "');\">选择人员...</a>"); Pub1.AddTDEnd(); //Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); //depts = new Depts(); //depts.RetrieveAll(); //var emps = new Emps(); //emps.RetrieveAll(); //var empDepts = new EmpDepts(); //empDepts.RetrieveAll(); //var nemps = new NodeEmps(int.Parse(this.NodeID)); //Emp emp = null; //foreach (Dept dept in depts) //{ // this.Pub1.AddTR(); // var mycb = new CheckBox(); // mycb.Text = dept.Name; // mycb.ID = "CB_D_" + dept.No; // this.Pub1.AddTD("colspan='3' class='GroupTitle'", mycb); // this.Pub1.AddTREnd(); // i = 0; // string ctlIDs = ""; // foreach (EmpDept ed in empDepts) // { // if (ed.FK_Dept != dept.No) // continue; // //排除非当前结点绑定的人员 // if (nemps.GetEntityByKey(NodeEmpAttr.FK_Emp, ed.FK_Emp) == null) // continue; // i++; // if (i == 4) // i = 1; // if (i == 1) // Pub1.AddTR(); // emp = emps.GetEntityByKey(ed.FK_Emp) as Emp; // cb = new CheckBox(); // cb.ID = "CB_E_" + emp.No; // ctlIDs += cb.ID + ","; // cb.Text = emp.Name; // if (msg.PushDoc.Contains("@" + emp.No + "@")) // cb.Checked = true; // Pub1.AddTD(cb); // if (i == 3) // Pub1.AddTREnd(); // } // mycb.Attributes["onclick"] = "SetSelected(this,'" + ctlIDs + "')"; // switch (i) // { // case 1: // Pub1.AddTD(); // Pub1.AddTD(); // Pub1.AddTREnd(); // break; // case 2: // Pub1.AddTD(); // Pub1.AddTREnd(); // break; // default: // break; // } //} //Pub1.AddTableEnd(); //Pub1.AddTDEnd(); Pub1.AddTREnd(); #endregion break; case PushWay.SpecSQL: #region 照指定的SQL查询语句 Pub1.AddTR(); this.Pub1.AddTDBegin("colspan='2'"); this.Pub1.Add("SQL查询语句:<br />"); tb = new TB(); tb.ID = "TB_" + PushMsgAttr.PushDoc; tb.Columns = 50; tb.Style.Add("width", "99%"); tb.TextMode = TextBoxMode.MultiLine; tb.Rows = 4; tb.Text = msg.PushDoc; this.Pub1.Add(tb); this.Pub1.AddTDEnd(); Pub1.AddTREnd(); #endregion break; case PushWay.SpecStations: #region 照指定的岗位 Pub1.AddTR(); Pub1.AddTDBegin("colspan='2'"); if (BP.WF.Glo.OSModel == OSModel.WorkFlow) { SysEnums ses = new SysEnums("StaGrade"); Stations sts = new Stations(); sts.RetrieveAll(); string sql = "SELECT No,Name FROM Port_Station WHERE StaGrade NOT IN (SELECT IntKey FROM Sys_Enum WHERE EnumKey='StaGrade')"; DataTable dt = DBAccess.RunSQLReturnTable(sql); if (dt.Rows.Count != 0) { if (ses.Count == 0) { SysEnum se = new SysEnum(); se.EnumKey = "StaGrade"; se.Lab = "普通岗"; se.IntKey = 0; se.Insert(); ses.AddEntity(se); } foreach (Station st in sts) { st.StaGrade = 0; st.Save(); } } this.Pub1.AddTable("class='Table' cellSpacing='0' cellPadding='0' border='0' style='width:100%'"); foreach (SysEnum se in ses) { this.Pub1.AddTR(); CheckBox mycb = new CheckBox(); mycb.Text = se.Lab; mycb.ID = "CB_SG_" + se.IntKey; this.Pub1.AddTD("colspan='3' class='GroupTitle'", mycb); this.Pub1.AddTREnd(); i = 0; string ctlIDs = ""; foreach (Station st in sts) { if (st.StaGrade != se.IntKey) { continue; } i++; if (i == 4) { i = 1; } if (i == 1) { Pub1.AddTR(); } cb = new CheckBox(); cb.ID = "CB_S_" + st.No; ctlIDs += cb.ID + ","; cb.Text = st.Name; if (msg.PushDoc.Contains("@" + st.No + "@")) { cb.Checked = true; } Pub1.AddTD(cb); if (i == 3) { Pub1.AddTREnd(); } } mycb.Attributes["onclick"] = "SetSelected(this,'" + ctlIDs + "')"; switch (i) { case 1: Pub1.AddTD(); Pub1.AddTD(); Pub1.AddTREnd(); break; case 2: Pub1.AddTD(); Pub1.AddTREnd(); break; default: break; } } this.Pub1.AddTableEnd(); } else { /*BPM 模式*/ BP.GPM.StationTypes tps = new BP.GPM.StationTypes(); tps.RetrieveAll(); BP.GPM.Stations sts = new BP.GPM.Stations(); sts.RetrieveAll(); string sql = "SELECT No,Name FROM Port_Station WHERE FK_StationType NOT IN (SELECT No FROM Port_StationType)"; DataTable dt = DBAccess.RunSQLReturnTable(sql); if (dt.Rows.Count != 0) { if (tps.Count == 0) { var stp = new BP.GPM.StationType { No = "01", Name = "普通岗" }; stp.Save(); tps.AddEntity(stp); } //更新所有对不上岗位类型的岗位,岗位类型为01或第一个 foreach (BP.GPM.Station st in sts) { st.FK_StationType = tps[0].No; st.Update(); } } this.Pub1.AddTable("class='Table' cellSpacing='0' cellPadding='0' border='0' style='width:100%'"); foreach (BP.GPM.StationType tp in tps) { this.Pub1.AddTR(); CheckBox mycb = new CheckBox(); mycb.Text = tp.Name; mycb.ID = "CB_ST_" + tp.No; this.Pub1.AddTD("colspan='3' class='GroupTitle'", mycb); this.Pub1.AddTREnd(); i = 0; string ctlIDs = ""; foreach (BP.GPM.Station st in sts) { if (st.FK_StationType != tp.No) { continue; } i++; if (i == 4) { i = 1; } if (i == 1) { Pub1.AddTR(); } cb = new CheckBox(); cb.ID = "CB_S_" + st.No; ctlIDs += cb.ID + ","; cb.Text = st.Name; if (msg.PushDoc.Contains("@" + st.No + "@")) { cb.Checked = true; } this.Pub1.AddTD(cb); if (i == 3) { Pub1.AddTREnd(); } } mycb.Attributes["onclick"] = "SetSelected(this,'" + ctlIDs + "')"; switch (i) { case 1: Pub1.AddTD(); Pub1.AddTD(); Pub1.AddTREnd(); break; case 2: Pub1.AddTD(); Pub1.AddTREnd(); break; default: break; } } this.Pub1.AddTableEnd(); } #region 原逻辑,只考虑了一种模式,停用 //Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); //SysEnums ses = new SysEnums("StaGrade"); //Stations sts = new Stations(); //NodeStations nsts = new NodeStations(int.Parse(this.NodeID)); //sts.RetrieveAll(); //foreach (SysEnum se in ses) //{ // this.Pub1.AddTR(); // var mycb = new CheckBox(); // mycb.Text = se.Lab; // mycb.ID = "CB_SG_" + se.IntKey; // this.Pub1.AddTD("colspan=3 class='GroupTitle'", mycb); // this.Pub1.AddTREnd(); // i = 0; // string ctlIDs = ""; // foreach (Station st in sts) // { // if (st.StaGrade != se.IntKey) // continue; // //排除非当前结点的岗位 // if (nsts.GetEntityByKey(NodeStationAttr.FK_Station, st.No) == null) // continue; // i++; // if (i == 4) // i = 1; // if (i == 1) // Pub1.AddTR(); // cb = new CheckBox(); // cb.ID = "CB_S_" + st.No; // ctlIDs += cb.ID + ","; // cb.Text = st.Name; // if (msg.PushDoc.Contains("@" + st.No + "@")) // cb.Checked = true; // Pub1.AddTD(cb); // if (i == 3) // Pub1.AddTREnd(); // } // mycb.Attributes["onclick"] = "SetSelected(this,'" + ctlIDs + "')"; // switch (i) // { // case 1: // Pub1.AddTD(); // Pub1.AddTD(); // Pub1.AddTREnd(); // break; // case 2: // Pub1.AddTD(); // Pub1.AddTREnd(); // break; // default: // break; // } //} //Pub1.AddTableEnd(); #endregion Pub1.AddTDEnd(); Pub1.AddTREnd(); #endregion break; } 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(msg.MyPK)) { Pub1.AddSpace(1); btn = new LinkBtn(false, NamesOfBtn.Delete, "删除"); btn.Click += new EventHandler(btn_Delete_Click); btn.Attributes["onclick"] = "return confirm('你确定要删除此消息推送设置吗?');"; Pub1.Add(btn); } }
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>"); }
public void BindCond() { Cond cond = new Cond(); cond.MyPK = this.GenerMyPK; cond.RetrieveFromDBSources(); /*BPM 模式*/ BP.GPM.StationTypes tps = new BP.GPM.StationTypes(); tps.RetrieveAll(); BP.GPM.Stations sts = new BP.GPM.Stations(); sts.RetrieveAll(); string sql = "SELECT No,Name FROM Port_Station WHERE FK_StationType NOT IN (SELECT No FROM Port_StationType)"; DataTable dt = DBAccess.RunSQLReturnTable(sql); if (dt.Rows.Count != 0) { if (tps.Count == 0) { var stp = new BP.GPM.StationType { No = "01", Name = "普通岗" }; stp.Save(); tps.AddEntity(stp); } //更新所有对不上岗位类型的岗位,岗位类型为01或第一个 foreach (BP.GPM.Station st in sts) { st.FK_StationType = tps[0].No; st.Update(); } } this.Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); foreach (BP.GPM.StationType tp in tps) { this.Pub1.AddTR(); CheckBox mycb = new CheckBox(); mycb.Text = tp.Name; mycb.ID = "CB_s_d" + tp.No; this.Pub1.AddTD("colspan=3 class='GroupTitle'", mycb); this.Pub1.AddTREnd(); int i = 0; string ctlIDs = ""; foreach (BP.GPM.Station st in sts) { if (st.FK_StationType != tp.No) { continue; } i++; if (i == 4) { i = 1; } if (i == 1) { Pub1.AddTR(); } CheckBox cb = new CheckBox(); cb.ID = "CB_" + st.No; ctlIDs += cb.ID + ","; cb.Text = st.Name; if (cond.OperatorValue.ToString().Contains("@" + st.No + "@")) { cb.Checked = true; } this.Pub1.AddTD(cb); if (i == 3) { Pub1.AddTREnd(); } } mycb.Attributes["onclick"] = "SetSelected(this,'" + ctlIDs + "')"; switch (i) { case 1: Pub1.AddTD(); Pub1.AddTD(); Pub1.AddTREnd(); break; case 2: Pub1.AddTD(); Pub1.AddTREnd(); break; default: break; } } this.Pub1.AddTableEnd(); Pub1.AddBR(); #region //增加“指定的操作员”选项,added by liuxc,2015-10-7 var ddl = new DDL(); ddl.ID = "DDL_" + CondAttr.SpecOperWay; ddl.Width = 200; ddl.Items.Add(new ListItem("当前操作员", "0")); ddl.Items.Add(new ListItem("指定节点的操作员", "1")); ddl.Items.Add(new ListItem("指定表单字段作为操作员", "2")); ddl.Items.Add(new ListItem("指定操作员编号", "3")); ddl.SetSelectItem((int)cond.SpecOperWay); ddl.AutoPostBack = true; ddl.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged); Pub1.Add("指定的操作员:"); Pub1.Add(ddl); Pub1.AddBR(); Pub1.AddBR(); var lbl = new Label(); lbl.ID = "LBL1"; switch (cond.SpecOperWay) { case SpecOperWay.SpecNodeOper: lbl.Text = "节点编号:"; break; case SpecOperWay.SpecSheetField: lbl.Text = "表单字段:"; break; case SpecOperWay.SpenEmpNo: lbl.Text = "操作员编号:"; break; case SpecOperWay.CurrOper: lbl.Text = "参数:"; break; } Pub1.Add(lbl); var tb = new TB(); tb.ID = "TB_" + CondAttr.SpecOperPara; tb.Width = 200; tb.Text = cond.SpecOperPara; tb.Enabled = cond.SpecOperWay != SpecOperWay.CurrOper; Pub1.Add(tb); Pub1.AddSpace(1); Pub1.Add("多个值请用英文“逗号”来分隔。"); Pub1.AddBR(); Pub1.AddBR(); #endregion Pub1.AddSpace(1); var btn = new LinkBtn(false, NamesOfBtn.Save, "保存"); btn.Click += new EventHandler(btn_Save_Click); this.Pub1.Add(btn); Pub1.AddSpace(1); btn = new LinkBtn(false, NamesOfBtn.Delete, "删除"); btn.Attributes["onclick"] = " return confirm('您确定要删除吗?');"; btn.Click += new EventHandler(btn_Save_Click); this.Pub1.Add(btn); }
protected void Page_Load(object sender, EventArgs e) { GloVar gvar = new GloVar(); gvars = gvar.GetNewEntities as GloVars; gvars.Retrieve(GloVarAttr.GroupKey, "IntegrationSet"); gvarSModel = gvars.GetEntityByKey("StructureModel") as GloVar; gvarSMKind = gvars.GetEntityByKey("StructureMngKind") as GloVar; gvarSSource = gvars.GetEntityByKey("StructureSource") as GloVar; GenerateCheckedInfo(); switch (Step) { case 1: #region 设置组织结构模式 Pub1.Add("选择组织结构模式:"); if (gvarSModel == null) { gvarSModel = new GloVar(); gvarSModel.No = "StructureModel"; gvarSModel.Name = "组织结构模式"; gvarSModel.Val = "1"; gvarSModel.GroupKey = "IntegrationSet"; gvarSModel.Note = GetJoinStringFromArray(_smodels); gvarSModel.Insert(); } BPRadioButtonList rads = new BPRadioButtonList(); rads.ID = "Rads_StructureModel"; AddCheckItems(rads, _smodels); rads.RepeatDirection = RepeatDirection.Horizontal; rads.RepeatLayout = RepeatLayout.Flow; rads.SetSelectItem(gvarSModel.Val); Pub1.Add(rads); Pub1.AddBR(); Pub1.AddBR(); AddButton(NamesOfBtn.Save, "保存并继续"); #endregion break; case 2: #region 设置组织结构维护方式 Pub1.Add("设置组织结构维护方式:"); if (gvarSMKind == null) { gvarSMKind = new GloVar(); gvarSMKind.No = "StructureMngKind"; gvarSMKind.Name = "组织结构维护方式"; gvarSMKind.Val = "1"; gvarSMKind.GroupKey = "IntegrationSet"; gvarSMKind.Note = GetJoinStringFromArray(_smkinds); gvarSMKind.Insert(); } rads = new BPRadioButtonList(); rads.ID = "Rads_StructureMngKind"; AddCheckItems(rads, _smkinds); rads.RepeatDirection = RepeatDirection.Horizontal; rads.RepeatLayout = RepeatLayout.Flow; rads.SetSelectItem(gvarSMKind.Val); Pub1.Add(rads); Pub1.AddBR(); Pub1.AddBR(); AddButton(NamesOfBtn.Save, "保存并继续"); Pub1.AddSpace(1); AddButton(NamesOfBtn.Back, "上一步"); #endregion break; case 3: #region 择组织结构来源 Pub1.Add("选择组织结构来源:"); if (gvarSSource == null) { gvarSSource = new GloVar(); gvarSSource.No = "StructureSource"; gvarSSource.Name = "选择组织结构来源"; gvarSSource.Val = "1"; gvarSSource.GroupKey = "IntegrationSet"; gvarSSource.Note = GetJoinStringFromArray(_ssources); gvarSSource.Insert(); } rads = new BPRadioButtonList(); rads.ID = "Rads_StructureSource"; AddCheckItems(rads, _ssources); rads.RepeatDirection = RepeatDirection.Horizontal; rads.RepeatLayout = RepeatLayout.Flow; rads.SetSelectItem(gvarSSource.Val); Pub1.Add(rads); Pub1.AddBR(); Pub1.AddBR(); AddButton(NamesOfBtn.Save, "保存并继续"); Pub1.AddSpace(1); AddButton(NamesOfBtn.Back, "上一步"); #endregion break; case 4: #region 配置查询语句 string msg = string.Empty; if (gvarSModel == null) { msg = "“<a href='?step=1'>组织结构模式</a>”、"; } if (gvarSMKind == null) { msg += "“<a href='?step=2'>组织结构维护方式</a>”、"; } if (gvarSSource == null) { msg += "“<a href='?step=3'>组织结构来源</a>”"; } if (!string.IsNullOrWhiteSpace(msg)) { Pub1.AddEasyUiPanelInfo("信息", "请先配置" + msg.TrimEnd('、') + ",然后配置此项!"); Pub1.AddBR(); AddButton(NamesOfBtn.Back, "上一步"); return; } //如果组织结构来源选择的是WebService和AD,则提示用户编写提供的通用webservice,以联接这两方载体 if (gvarSSource.Val == "2" || gvarSSource.Val == "3") { Pub1.AddEasyUiPanelInfo("信息", "您选择的组织结构数据来源是“<span style='font-weight:bold;'>" + _ssources[int.Parse(gvarSSource.Val) - 1] + "</span>”,该种方式目前请自行修改位于CCFlow项目下的WebService文件:\\DataUser\\PortalInterface.asmx,此WebService用来提供组织结构的相关数据。"); Pub1.AddBR(); AddButton(NamesOfBtn.Back, "上一步"); return; } if (gvarSModel.Val == "1") { //一个用户一个部门 _oneones = new Dictionary <string, Dictionary <string, string> >(); maps = new[] { new BP.Port.Station().EnMap, new BP.Port.Dept().EnMap, new BP.Port.Emp().EnMap, new BP.Port.EmpStation().EnMap }; GenerateMapAttrs(_oneones, maps); } else { //一个用户多个部门 _onemores = new Dictionary <string, Dictionary <string, string> >(); maps = new[] { new BP.GPM.StationType().EnMap, new BP.GPM.Station().EnMap, new BP.GPM.Dept().EnMap, new BP.GPM.Duty().EnMap, new BP.GPM.DeptDuty().EnMap, new BP.GPM.Emp().EnMap, new BP.GPM.DeptEmp().EnMap, new BP.GPM.DeptStation().EnMap, new BP.GPM.DeptEmpStation().EnMap }; GenerateMapAttrs(_onemores, maps); } //如果组织结构维护方式选择的是由“CCBPM组织结构维护”,则下面的配置查询语句就不需要了 if (gvarSMKind.Val == "1") { msg = "您选择的组织结构数据来源是“<span style='font-weight:bold;'>" + _ssources[int.Parse(gvarSSource.Val) - 1] + "</span>”,组织结构维护方式选择的是“<span style='font-weight:bold;'>" + _smkinds[int.Parse(gvarSMKind.Val) - 1] + "</span>”,组织结构模式是“<span style='font-weight:bold;'>" + _smodels[int.Parse(gvarSModel.Val) - 1] + "</span>”,此种模式下,在ccbpm的主库中需要维护的相关表有:<br />"; if (gvarSModel.Val == "1") { //一个用户一个部门 msg += "1.岗位类型[Sys_Enum]。Sys_Enum枚举表中EnumKey='StaGrade'的枚举。<br />"; for (int i = 0; i < maps.Length; i++) { msg += string.Format("{0}.{1}[{2}]。<br />", i + 2, maps[i].EnDesc, maps[i].PhysicsTable); } } else { //一个用户多个部门 for (int i = 0; i < maps.Length; i++) { msg += string.Format("{0}.{1}[{2}]。<br />", i + 1, maps[i].EnDesc, maps[i].PhysicsTable); } } msg += " <hr> 在这种运行模式下,ccbpm系统已经为您提供了一套维护组织机构的功能,您可以左边的组织机构树进行维护。"; Pub1.AddEasyUiPanelInfo("信息", msg); Pub1.AddBR(); AddButton(NamesOfBtn.Back, "上一步"); } else { Pub1.Add( "您选择的组织结构数据来源是“<span style='font-weight:bold;'>" + _ssources[int.Parse(gvarSSource.Val) - 1] + "</span>”,组织结构维护方式选择的是“<span style='font-weight:bold;'>" + _smkinds[int.Parse(gvarSMKind.Val) - 1] + "</span>”,组织结构模式是“<span style='font-weight:bold;'>" + _smodels[int.Parse(gvarSModel.Val) - 1] + "</span>”。<br />"); gvarDBSrc = gvars.GetEntityByKey("StructureDBSrc") as GloVar; if (gvarDBSrc == null) { gvarDBSrc = new GloVar(); gvarDBSrc.No = "StructureDBSrc"; gvarDBSrc.Name = "数据源编号"; gvarDBSrc.Val = "local"; gvarDBSrc.Note = "数据源是Sys_SFDBSrc表"; gvarDBSrc.GroupKey = "IntegrationSet"; gvarDBSrc.Save(); } //gvarDBOver = gvars.GetEntityByKey("StructureDBOver") as GloVar; //if (gvarDBOver == null) //{ // gvarDBOver = new GloVar(); // gvarDBOver.No = "StructureDBOver"; // gvarDBOver.Name = "数据源SQL配置是否完成"; // gvarDBOver.Val = "False"; // gvarDBOver.Note = "若组织结构配置的SQL已经配置完成,且有效,则为True;反之,为False"; // gvarDBOver.GroupKey = "IntegrationSet"; // gvarDBOver.Save(); //} SFDBSrcs srcs = new SFDBSrcs(); srcs.RetrieveAll(SFDBSrcAttr.DBSrcType); //根据传来的数据源编号,变更当前的数据源 if (!string.IsNullOrWhiteSpace(Request.QueryString["src"]) && srcs.IsExits(SFDBSrcAttr.No, Request.QueryString["src"])) { gvarDBSrc.Val = Request.QueryString["src"]; gvarDBSrc.Update(); } DDL ddl = new DDL(); ddl.CssClass = "easyui-combobox"; ddl.Attributes["data-options"] = "onSelect:function(rcd){location.href='Integration.aspx?step=4&src=' + rcd.value;}"; ddl.ID = "DDL_DBSrcs"; ddl.AutoPostBack = true; ddl.BindEntities(srcs); ddl.SetSelectItem(gvarDBSrc.Val); Pub1.AddBR(); Pub1.Add("选择数据源:"); Pub1.Add(ddl); Pub1.AddSpace(1); Pub1.Add("<a href=\"javascript: OpenEasyUiDialog('../../Comm/Sys/SFDBSrcNewGuide.aspx', 'eudlgframe', '新建数据源', 760, 470, 'icon-add', true, function () {location.href = location.href;})\" class='easyui-linkbutton' data-optinos=\"iconCls:'icon-add'\">新建数据源</a>"); Pub1.AddBR(); Pub1.AddBR(); //if (gvarDBSrc.Val == "local") //{ // Pub1.AddEasyUiPanelInfo("信息", string.Format("“<span style='font-weight:bold;'>{0}</span>”是CCFlow主数据源,不需要进行组织结构的SQL配置。", ddl.SelectedItem.Text)); // Pub1.AddBR(); // AddButton(NamesOfBtn.Back, "上一步"); // return; //} Pub1.Add("选择此数据源,需要配置的相关表的SQL查询语句如下:"); Pub1.AddBR(); Pub1.AddBR(); if (gvarSModel.Val == "1") { #region //一个用户一个部门 Pub1.Add("1.<span style='font-weight:bold;'>岗位类型数据</span>。<br />"); LinkBtn btn = new LinkBtn(false, NamesOfBtn.Edit, " 编辑数据"); btn.PostBackUrl = "javascript:void(0)"; btn.OnClientClick = "OpenEasyUiDialog('../../Comm/Sys/EnumList.aspx?RefNo=StaGrade&t=' + Math.random(), 'euiframe','编辑岗位类型',600,374,'icon-edit')"; Pub1.Add(btn); Pub1.AddBR(); Pub1.AddBR(); #endregion } int idx = gvarSModel.Val == "1" ? 2 : 1; TB tb = null; foreach (BP.En.Map map in maps) { gvar = CheckGloVar(gvars, map.PhysicsTable, map.EnDesc); Pub1.Add(GenerateAttrDescs(map, idx++)); tb = new TB(); tb.ID = "TB_" + map.PhysicsTable; tb.TextMode = TextBoxMode.MultiLine; tb.Text = (gvar.Val ?? string.Empty).Replace('~', '\''); tb.Wrap = true; tb.Width = 760; tb.Height = 60; Pub1.Add(tb); Pub1.AddBR(); AddButton(NamesOfBtn.DataCheck + "_" + map.PhysicsTable, "检查正确性"); Pub1.AddSpace(1); AddButton(NamesOfBtn.Open + "_" + map.PhysicsTable, "打开数据源"); Pub1.AddBR(); Pub1.AddBR(); } AddButton(NamesOfBtn.Setting, "设置全部"); Pub1.AddSpace(1); AddButton(NamesOfBtn.Back, "上一步"); Pub1.AddBR(); Pub1.AddBR(); } #endregion break; } }
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(" 要执行的内容<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)); } }
public void BindCond() { Cond cond = new Cond(); cond.MyPK = this.GenerMyPK; cond.RetrieveFromDBSources(); BP.WF.Node nd = new BP.WF.Node(this.FK_MainNode); BP.WF.Node tond = new BP.WF.Node(this.ToNodeID); this.Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); this.Pub1.AddTR(); this.Pub1.AddTD("colspan=3 class='GroupTitle'", "部门选择"); this.Pub1.AddTREnd(); Depts sts = new Depts(); sts.RetrieveAllFromDBSource(); int i = 0; foreach (Dept st in sts) { i++; if (i == 4) { i = 1; } if (i == 1) { Pub1.AddTR(); } CheckBox cb = new CheckBox(); cb.ID = "CB_" + st.No; cb.Text = st.Name; if (cond.OperatorValue.ToString().Contains("@" + st.No + "@")) { cb.Checked = true; } this.Pub1.AddTD(cb); if (i == 3) { Pub1.AddTREnd(); } } switch (i) { case 1: Pub1.AddTD(); Pub1.AddTD(); Pub1.AddTREnd(); break; case 2: Pub1.AddTD(); Pub1.AddTREnd(); break; default: break; } this.Pub1.AddTableEnd(); Pub1.AddBR(); #region //增加“指定的操作员”选项,added by liuxc,2015-10-7 var ddl = new DDL(); ddl.ID = "DDL_" + CondAttr.SpecOperWay; ddl.Width = 200; ddl.Items.Add(new ListItem("当前操作员", "0")); ddl.Items.Add(new ListItem("指定节点的操作员", "1")); ddl.Items.Add(new ListItem("指定表单字段作为操作员", "2")); ddl.Items.Add(new ListItem("指定操作员编号", "3")); ddl.SetSelectItem((int)cond.SpecOperWay); ddl.AutoPostBack = true; ddl.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged); Pub1.Add("指定的操作员:"); Pub1.Add(ddl); Pub1.AddBR(); Pub1.AddBR(); var lbl = new Label(); lbl.ID = "LBL1"; switch (cond.SpecOperWay) { case SpecOperWay.SpecNodeOper: lbl.Text = "节点编号:"; break; case SpecOperWay.SpecSheetField: lbl.Text = "表单字段:"; break; case SpecOperWay.SpenEmpNo: lbl.Text = "操作员编号:"; break; case SpecOperWay.CurrOper: lbl.Text = "参数:"; break; } Pub1.Add(lbl); var tb = new TB(); tb.ID = "TB_" + CondAttr.SpecOperPara; tb.Width = 200; tb.Text = cond.SpecOperPara; tb.Enabled = cond.SpecOperWay != SpecOperWay.CurrOper; Pub1.Add(tb); Pub1.AddSpace(1); Pub1.Add("多个值请用英文“逗号”来分隔。"); Pub1.AddBR(); Pub1.AddBR(); #endregion Pub1.AddSpace(1); var btn = new LinkBtn(false, NamesOfBtn.Save, "保存"); btn.Click += new EventHandler(btn_Save_Click); this.Pub1.Add(btn); Pub1.AddSpace(1); btn = new LinkBtn(false, NamesOfBtn.Delete, "删除"); btn.Attributes["onclick"] = " return confirm('您确定要删除吗?');"; btn.Click += new EventHandler(btn_Save_Click); this.Pub1.Add(btn); }
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); }
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(" 要执行的内容<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)); } }
protected void Page_Load(object sender, EventArgs e) { #region Step = 1 if (this.Step == 1) { BP.Sys.SFDBSrcs ens = new BP.Sys.SFDBSrcs(); ens.RetrieveAll(); Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); Pub1.AddTR(); Pub1.AddTDGroupTitle("", "第1步:选择下拉框数据来源类型"); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDBegin(); Pub1.AddUL("class='navlist'"); this.Pub1.AddLi("<a href='/WF/MapDef/SFTable.aspx?DoType=New&MyPK=" + this.MyPK + "&Idx=" + this.Idx + "&FromApp=SL' ><b><img src='./Img/Table.png' border=0 style='width:17px;height:17px;' />外键型表或视图</b></a> - 比如:岗位、税种、行业、科目,本机上一个表组成一个下拉框。"); this.Pub1.AddLi("<a href='/WF/MapDef/SFSQL.aspx?DoType=New&MyPK=" + this.MyPK + "&Idx=" + this.Idx + "&FromApp=SL'><b><img src='./Img/View.png' border=0 style='width:17px;height:17px;' />外部表SQL数据源</b></a> - 比如:配置一个SQL通过数据库连接或获取的外部数据,组成一个下拉框。"); this.Pub1.AddLi("<a href='/WF/MapDef/SFWS.aspx?DoType=AddSFWebServeces&MyPK=" + this.MyPK + "&FType=Class&Idx=" + this.Idx + "&GroupField=" + this.GroupField + "&FromApp=SL'><b><img src='./Img/WS.png' border=0 />WebServices数据</b></a> - 比如:通过调用Webservices接口获得数据,组成一个下拉框。"); //// Pub1.AddLi("<div><a href='SFGuide.aspx?Step=12&FK_SFDBsrc=local'><img src='../../Img/New.gif' align='middle' /><span>创建本地编码字典表</span></a></div>"); // foreach (BP.Sys.SFDBSrc item in ens) // { // Pub1.AddLi("<div><a href='SFGuide.aspx?Step=2&FK_SFDBSrc=" + item.No + "'><span class='nav'>" +item.IP+ item.No + " - " + item.Name + "</span></a></div>"); // } // this.Pub1.AddFieldSet("新增下拉框(外键、外部表、WebServices)字段(通常只有编号名称两个列)"); // this.Pub1.AddUL(); // this.Pub1.AddLi("<a href='Do.aspx?DoType=AddSFTable&MyPK=" + this.MyPK + "&FType=Class&Idx=" + this.Idx + "&GroupField=" + this.GroupField + "'><b>外键型</b></a> - 比如:岗位、税种、行业、科目,本机上一个表组成一个下拉框。"); // this.Pub1.AddLi("<a href='Do.aspx?DoType=AddSFSQL&MyPK=" + this.MyPK + "&FType=Class&Idx=" + this.Idx + "&GroupField=" + this.GroupField + "'><b>外部表</b></a> - 比如:配置一个SQL通过数据库连接或获取的外部数据,组成一个下拉框。"); // this.Pub1.AddLi("<a href='Do.aspx?DoType=AddSFWebServeces&MyPK=" + this.MyPK + "&FType=Class&Idx=" + this.Idx + "&GroupField=" + this.GroupField + "'><b>WebServices</b></a> - 比如:通过调用Webservices接口获得数据,组成一个下拉框。"); // this.Pub1.AddULEnd(); // this.Pub1.AddFieldSetEnd(); //创建. //Pub1.AddLi("<div><a href=\"javascript:WinOpen('../RefFunc/UIEn.aspx?EnsName=BP.Sys.SFDBSrcs')\" ><img src='../../Img/New.gif' align='middle' /><span class='nav'>新建数据源</span></a></div>"); //Pub1.AddLi("<div><a href='SFGuide.aspx?Step=22'><img src='../../Img/New.gif' align='middle' /><span class='nav'>新建WebService数据源</span></a></div>"); Pub1.AddULEnd(); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTREnd(); Pub1.AddTableEnd(); } #endregion #region Step = 2 if (this.Step == 2) { SFDBSrc src = new SFDBSrc(this.FK_SFDBSrc); Pub1.Add("<div class='easyui-layout' data-options=\"fit:true\">"); Pub1.Add(string.Format("<div data-options=\"region:'west',split:true,title:'选择 {0} 表/视图'\" style='width:200px;'>", src.No)); var lb = new LB(); lb.ID = "LB_Table"; lb.BindByTableNoName(src.GetTables()); lb.Style.Add("width", "100%"); lb.Style.Add("height", "100%"); lb.AutoPostBack = true; lb.SelectedIndexChanged += new EventHandler(lb_SelectedIndexChanged); Pub1.Add(lb); Pub1.AddDivEnd(); Pub1.Add("<div data-options=\"region:'center',title:'第2步:请填写基础信息'\" style='padding:5px;'>"); Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); var dbType = src.DBSrcType; if (dbType == DBSrcType.Localhost) { switch (SystemConfig.AppCenterDBType) { case DBType.MSSQL: dbType = DBSrcType.SQLServer; break; case DBType.Oracle: dbType = DBSrcType.Oracle; break; case DBType.MySQL: dbType = DBSrcType.MySQL; break; case DBType.Informix: dbType = DBSrcType.Informix; break; default: throw new Exception("没有涉及到的连接测试类型..."); } } var islocal = (src.DBSrcType == DBSrcType.Localhost).ToString().ToLower(); Pub1.AddTR(); Pub1.AddTDGroupTitle("style='width:100px'", "值(编号):"); var ddl = new DDL(); ddl.ID = "DDL_ColValue"; ddl.Attributes.Add("onchange", string.Format("generateSQL('{0}','{1}','{2}',{3})", src.No, src.DBName, dbType, islocal)); Pub1.AddTDBegin(); Pub1.Add(ddl); Pub1.Add(" 编号列,比如:类别编号"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDGroupTitle("标签(名称):"); ddl = new DDL(); ddl.ID = "DDL_ColText"; ddl.Attributes.Add("onchange", string.Format("generateSQL('{0}','{1}','{2}',{3})", src.No, src.DBName, dbType, islocal)); Pub1.AddTDBegin(); Pub1.Add(ddl); Pub1.Add(" 显示的列,比如:类别名称"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDGroupTitle("父结点值(字段):"); ddl = new DDL(); ddl.ID = "DDL_ColParentNo"; ddl.Attributes.Add("onchange", string.Format("generateSQL('{0}','{1}','{2}',{3})", src.No, src.DBName, dbType, islocal)); Pub1.AddTDBegin(); Pub1.Add(ddl); Pub1.Add(" 如果是树类型实体,该列设置有效,比如:上级类别编号"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDGroupTitle("字典表类型:"); ddl = new DDL(); ddl.ID = "DDL_CodeStruct"; ddl.SelfBindSysEnum(SFTableAttr.CodeStruct); ddl.Attributes.Add("onchange", string.Format("generateSQL('{0}','{1}','{2}',{3})", src.No, src.DBName, dbType, islocal)); Pub1.AddTD(ddl); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDGroupTitle("查询语句:"); var tb = new TB(); tb.ID = "TB_SelectStatement"; tb.TextMode = TextBoxMode.MultiLine; tb.Columns = 60; tb.Rows = 10; tb.Style.Add("width", "99%"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add("<br /> 说明:查询语句可以修改,但请保证查询语句的准确性及有效性!"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTableEnd(); Pub1.AddBR(); Pub1.AddBR(); Pub1.AddSpace(1); var btn = new LinkBtn(false, NamesOfBtn.Next, "下一步"); btn.Click += new EventHandler(btn_Click); Pub1.Add(btn); Pub1.AddSpace(1); Pub1.Add("<a href='" + Request.UrlReferrer + "' class='easyui-linkbutton'>上一步</a>"); Pub1.AddDivEnd(); Pub1.AddDivEnd(); if (!IsPostBack && lb.Items.Count > 0) { lb.SelectedIndex = 0; ShowSelectedTableColumns(); } } #endregion #region Step = 12 if (this.Step == 12) { Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); Pub1.AddTR(); Pub1.AddTDGroupTitle("colspan='2'", "第2步:创建"); Pub1.AddTREnd(); TextBox tb = new TextBox(); tb.ID = "TB_No"; Pub1.AddTR(); Pub1.AddTDGroupTitle("style='width:100px'", "表英文名称:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 必须以字母或者下画线开头"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.Name; Pub1.AddTR(); Pub1.AddTDGroupTitle("", "表中文名称:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 显示的标签"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.TableDesc; Pub1.AddTR(); Pub1.AddTDGroupTitle("", "描述:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 表描述"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTableEnd(); Pub1.AddBR(); Pub1.AddBR(); Pub1.AddSpace(1); var btn = new LinkBtn(false, NamesOfBtn.Apply, "执行创建"); btn.Click += new EventHandler(btn_Create_Local_Click); Pub1.Add(btn); Pub1.AddSpace(1); Pub1.Add("<a href='" + Request.UrlReferrer + "' class='easyui-linkbutton'>上一步</a>"); } #endregion #region Step = 22 if (this.Step == 22) { Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); Pub1.AddTR(); Pub1.AddTDGroupTitle("colspan='2'", "第2步:创建本地WebService数据源表"); Pub1.AddTREnd(); TextBox tb = new TextBox(); tb.ID = "TB_No"; Pub1.AddTR(); Pub1.AddTDGroupTitle("style='width:100px'", "WebService数据源编号:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 必须以字母或者下画线开头,比如:HR,CRM"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.Name; Pub1.AddTR(); Pub1.AddTDGroupTitle("", "WebService数据源名称:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 显示的数据源名称,比如:人力资源系统,客户关系管理系统."); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.TableDesc; tb.Style.Add("width", "300px"); Pub1.AddTR(); Pub1.AddTDGroupTitle("", "WebService连接Url:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" WebService地址,比如:http://127.0.0.1/CCFormTester.asmx"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.SrcTable; tb.Style.Add("width", "300px"); Pub1.AddTR(); Pub1.AddTDGroupTitle("", "WebService接口名称:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 比如:GetEmps"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.SelectStatement; tb.Style.Add("width", "300px"); Pub1.AddTR(); Pub1.AddTDGroupTitle("", "WebService接口参数:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDGroupTitle("格式说明"); Pub1.AddTDDoc("如:WorkId=@WorkID&FK_Flow=@FK_Flow&FK_Node=@FK_Node&SearchType=1,带@的参数值在运行时自动使用发起流程的相关参数值替换,而不带@的参数值使用后面的赋值;参数个数与WebServices接口方法的参数个数一致,且顺序一致,且值均为字符类型。"); Pub1.AddTREnd(); Pub1.AddTableEnd(); Pub1.AddBR(); Pub1.AddBR(); Pub1.AddSpace(1); var btn = new LinkBtn(false, NamesOfBtn.Apply, "执行创建"); btn.Click += new EventHandler(btn_Create_WebService_Click); Pub1.Add(btn); Pub1.AddSpace(1); Pub1.Add("<a href='" + Request.UrlReferrer + "' class='easyui-linkbutton'>上一步</a>"); } #endregion #region Step = 3 if (this.Step == 3) { Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); Pub1.AddTR(); Pub1.AddTDGroupTitle("colspan='2'", "第3步:创建"); Pub1.AddTREnd(); TextBox tb = new TextBox(); tb.ID = "TB_No"; Pub1.AddTR(); Pub1.AddTDGroupTitle("style='width:100px'", "表英文名称:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 必须以字母或者下画线开头"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.Name; Pub1.AddTR(); Pub1.AddTDGroupTitle("", "表中文名称:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 显示的标签"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.TableDesc; Pub1.AddTR(); Pub1.AddTDGroupTitle("", "描述:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 表描述"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTableEnd(); Pub1.AddBR(); Pub1.AddBR(); Pub1.AddSpace(1); var btn = new LinkBtn(false, NamesOfBtn.Apply, "执行创建"); btn.Click += new EventHandler(btn_Create_Click); Pub1.Add(btn); Pub1.AddSpace(1); Pub1.Add("<a href='" + Request.UrlReferrer + "' class='easyui-linkbutton'>上一步</a>"); } #endregion }
protected void Page_Load(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(FK_Flow)) { Pub1.AddEasyUiPanelInfo("错误", "FK_Flow参数不能为空!"); return; } Flow flow = new Flow(FK_Flow); if (string.IsNullOrWhiteSpace(flow.No)) { Pub1.AddEasyUiPanelInfo("错误", string.Format("FK_Flow参数不正确,未找到编号为{0}的流程!", FK_Flow)); return; } string tmpPath = Server.MapPath(Glo.CCFlowAppPath) + @"\WF\Admin\AttrFlow\APICodeFEE.cs"; if (!File.Exists(tmpPath)) { Pub1.AddEasyUiPanelInfo("错误", string.Format(@"未找到事件编写模板文件“{0}”,请联系管理员!", tmpPath)); return; } Title = flow.Name + "[" + flow.No + "]"; string code = File.ReadAllText(tmpPath, System.Text.Encoding.UTF8).Replace("F001Templepte", string.Format("FEE{0}", flow.No)).Replace("@FlowName", flow.Name).Replace("@FlowNo", flow.No); if (Download) { Response.ClearHeaders(); Response.Clear(); Response.Expires = 0; Response.Buffer = true; Response.AddHeader("Content-Type", "text/html; charset=utf-8"); Response.AddHeader("content-disposition", string.Format("attachment; filename=FEE{0}.cs", flow.No)); Response.ContentType = "application/octet-stream"; Response.Write(code); Response.End(); return; } //此处将重要行标示出来,根据下面的数组中的项来检索重要行号 string[] lineStrings = new[] { "namespace BP.FlowEvent", ": BP.WF.FlowEventBase", "public override string FlowMark", "public override string SendWhen()", "public override string SendSuccess()", "public override string SendError()", "public override string FlowOverBefore()", "public override string FlowOverAfter()", "public override string BeforeFlowDel()", "public override string AfterFlowDel()", "public override string SaveAfter()", "public override string SaveBefore()", "public override string UndoneBefore()", "public override string UndoneAfter()", "public override string ReturnBefore()", "public override string ReturnAfter()", "public override string AskerAfter()", "public override string AskerReAfter()" }; //this.Pub1.AddFieldSet("使用帮助"); //this.Pub1.AddUL(); //this.Pub1.AddLi("ccbpm提供了可以让程序员编写代码与流程引擎,表单引擎进行交互,以处理复杂的业务逻辑。"); //this.Pub1.AddLi("ccbpm预留一个基类 BP.WF.FlowEventBase ,只要从这个基类上集成下来的子类,按照约定的格式重写相关的方法属性,流程引擎就会把这些代码注册到流程引擎中,并在运动中执行。"); //this.Pub1.AddLi("该功能提供了一个自动生成的代码模版,如果您有编程基础,就很容易明白如何通过该子类实现复杂的业务逻辑。"); //this.Pub1.AddLi("下载下来该类后,您必须把他放入一个以BP.开头的类库里,ccflow才能被注册到引擎中去。"); //this.Pub1.AddULEnd(); //this.Pub1.AddFieldSetEnd(); this.Pub1.AddLi(string.Format("<a href=\"APICodeFEE.aspx?FK_Flow={0}&Download=1\" target=\"_blank\" class=\"easyui-linkbutton\" data-options=\"iconCls:'icon-save',plain:true\">下载代码</a><br />", FK_Flow)); Pub1.Add(string.Format("<pre type=\"syntaxhighlighter\" class=\"brush: csharp; html-script: false; highlight: [{2}]\" title=\"{0}[编号:{1}] 流程自定义事件代码生成\">", flow.Name, flow.No, GetImportantLinesNumbers(lineStrings, code))); Pub1.Add(code.Replace("<", "<")); //SyntaxHighlighter中,使用<Pre>包含的代码要将左尖括号改成其转义形式 Pub1.Add("</pre>"); Pub1.Add("<script type=\"text/javascript\">SyntaxHighlighter.highlight();</script>"); Pub1.Add(string.Format( "<a href=\"APICodeFEE.aspx?FK_Flow={0}&Download=1\" target=\"_blank\" class=\"easyui-linkbutton\" data-options=\"iconCls:'icon-save',plain:true\">下载代码</a> 您需要把该代码整合到您的类库里,并且该类库必须以BP 开头命名。<br />", FK_Flow)); }
/// <summary> /// 新建文本框自动完成 /// </summary> public void EditAutoFullDtl_TB() { MapExt myme = new MapExt(this.MyPK); MapDtls dtls = new MapDtls(myme.FK_MapData); if (dtls.Count == 0) { this.Pub1.Clear(); Pub1.AddEasyUiPanelInfo("设置自动填充从表", "<p>该表单下没有从表,所以您不能为从表设置自动填充。<a href='?ExtType=" + this.ExtType + "&MyPK=" + this.MyPK + "&FK_MapData=" + this.FK_MapData + "&RefNo=" + this.RefNo + "'>返回</a></p>"); return; } Pub1.AddTableNormal(); Pub1.AddTRGroupTitle("设置自动填充从表. <a href='?ExtType=" + this.ExtType + "&MyPK=" + this.MyPK + "&FK_MapData=" + this.FK_MapData + "&RefNo=" + this.RefNo + "'>返回</a>"); string[] strs = myme.Tag1.Split('$'); foreach (MapDtl dtl in dtls) { TextBox tb = new TextBox(); tb.ID = "TB_" + dtl.No; tb.Columns = 70; tb.Style.Add("width", "100%"); tb.Rows = 5; tb.TextMode = TextBoxMode.MultiLine; foreach (string s in strs) { if (s == null) { continue; } if (s.Contains(dtl.No + ":") == false) { continue; } string[] ss = s.Split(':'); tb.Text = ss[1]; } //this.Pub1.AddFieldSet("编号:" + dtl.No + ",名称:" + dtl.Name); Pub1.AddTR(); Pub1.AddTDBegin(); Pub1.Add("编号:" + dtl.No + ",名称:" + dtl.Name); Pub1.AddBR(); Pub1.Add(tb); Pub1.AddBR(); string fs = "可填充的字段:"; MapAttrs attrs = new MapAttrs(dtl.No); foreach (MapAttr item in attrs) { if (item.KeyOfEn == "OID" || item.KeyOfEn == "RefPKVal") { continue; } fs += item.KeyOfEn + ","; } this.Pub1.Add(fs.Substring(0, fs.Length - 1)); //this.Pub1.AddFieldSetEnd(); Pub1.AddTDEnd(); Pub1.AddTREnd(); } //this.Pub1.AddHR(); Pub1.AddTableEnd(); Pub1.AddBR(); //Button mybtn = new Button(); var mybtn = new LinkBtn(false, NamesOfBtn.Save, "保存"); mybtn.Click += new EventHandler(mybtn_SaveAutoFullDtl_Click); this.Pub1.Add(mybtn); Pub1.AddSpace(1); mybtn = new LinkBtn(false, NamesOfBtn.Cancel, "取消"); mybtn.Click += new EventHandler(mybtn_SaveAutoFullDtl_Click); this.Pub1.Add(mybtn); Pub1.AddBR(); //this.Pub1.AddFieldSetEnd(); //this.Pub1.AddFieldSet("帮助:"); Pub1.AddEasyUiPanelInfoBegin("帮助", "icon-help"); this.Pub1.Add("在这里您需要设置一个查询语句"); this.Pub1.AddBR("例如:SELECT XLMC AS suozaixianlu, bustype as V_BusType FROM [V_XLVsBusType] WHERE jbxx_htid='@Key'"); this.Pub1.AddBR("这个查询语句要与从表的列对应上就可以在文本框的值发生改变时而自动填充。"); this.Pub1.AddBR("注意:"); this.Pub1.AddBR("1,@Key 是主表字段传递过来的变量。"); this.Pub1.AddBR("2,从表列字段字名,与填充sql列字段大小写匹配。"); //this.Pub1.AddFieldSetEnd(); Pub1.AddEasyUiPanelInfoEnd(); }
/// <summary> /// 新建文本框自动完成 /// </summary> public void EditAutoFullM2M_TB() { MapExt myme = new MapExt(this.MyPK); MapM2Ms m2ms = new MapM2Ms(myme.FK_MapData); if (m2ms.Count == 0) { this.Pub1.Clear(); //this.Pub1.AddFieldSet("设置自动填充从表. <a href='?ExtType=" + this.ExtType + "&MyPK=" + this.MyPK + "&FK_MapData=" + this.FK_MapData + "&RefNo=" + this.RefNo + "'>返回</a>"); //this.Pub1.Add("该表单下没有从表,所以您不能为从表设置自动填充。"); //this.Pub1.AddFieldSetEnd(); Pub1.AddEasyUiPanelInfo("设置自动填充从表", "<p>该表单下没有从表,所以您不能为从表设置自动填充。<a href='?ExtType=" + this.ExtType + "&MyPK=" + this.MyPK + "&FK_MapData=" + this.FK_MapData + "&RefNo=" + this.RefNo + "'>返回</a></p>"); return; } Pub1.AddTableNormal(); Pub1.AddTRGroupTitle("设置自动填充从表. <a href='?ExtType=" + this.ExtType + "&MyPK=" + this.MyPK + "&FK_MapData=" + this.FK_MapData + "&RefNo=" + this.RefNo + "'>返回</a>"); string[] strs = myme.Tag2.Split('$'); bool isHaveM2M = false; bool isHaveM2MM = false; foreach (MapM2M m2m in m2ms) { if (m2m.HisM2MType == M2MType.M2M) { isHaveM2M = true; } if (m2m.HisM2MType == M2MType.M2MM) { isHaveM2MM = true; } TextBox tb = new TextBox(); tb.ID = "TB_" + m2m.NoOfObj; tb.Columns = 70; tb.Style.Add("width", "100%"); tb.Rows = 5; tb.TextMode = TextBoxMode.MultiLine; foreach (string s in strs) { if (s == null) { continue; } if (s.Contains(m2m.NoOfObj + ":") == false) { continue; } string[] ss = s.Split(':'); tb.Text = ss[1]; } //this.Pub1.AddFieldSet("编号:" + m2m.NoOfObj + ",名称:" + m2m.Name); Pub1.AddTR(); Pub1.AddTDBegin(); Pub1.Add("编号:" + m2m.NoOfObj + ",名称:" + m2m.Name); Pub1.Add(tb); Pub1.AddTDEnd(); Pub1.AddTREnd(); //this.Pub1.AddFieldSetEnd(); } //this.Pub1.AddHR(); Pub1.AddTableEnd(); Pub1.AddBR(); //Button mybtn = new Button(); var mybtn = new LinkBtn(false, NamesOfBtn.Save, "保存"); mybtn.Click += new EventHandler(mybtn_SaveAutoFullM2M_Click); this.Pub1.Add(mybtn); Pub1.AddSpace(1); mybtn = new LinkBtn(false, NamesOfBtn.Cancel, "取消"); mybtn.Click += new EventHandler(mybtn_SaveAutoFullM2M_Click); this.Pub1.Add(mybtn); Pub1.AddBR(); //this.Pub1.AddFieldSetEnd(); if (isHaveM2M) { //this.Pub1.AddFieldSet("帮助:一对多"); Pub1.AddEasyUiPanelInfoBegin("帮助:一对多", "icon-help"); this.Pub1.Add("在主表相关数据发生变化后,一对多数据要发生变化,变化的格式为:"); this.Pub1.AddBR("实例:SELECT No,Name FROM WF_Emp WHERE FK_Dept='@Key' "); this.Pub1.AddBR("相关内容的值发生改变时而自动填充checkbox。"); this.Pub1.AddBR("注意:"); this.Pub1.AddBR("1,@Key 是主表字段传递过来的变量。"); this.Pub1.AddBR("2,必须并且仅有No,Name两个列,顺序不要颠倒。"); //this.Pub1.AddFieldSetEnd(); Pub1.AddEasyUiPanelInfoEnd(); } if (isHaveM2MM) { //this.Pub1.AddFieldSet("帮助:一对多多"); Pub1.AddEasyUiPanelInfoBegin("帮助:一对多多", "icon-help"); this.Pub1.Add("在主表相关数据发生变化后,一对多多数据要发生变化,变化的格式为:"); this.Pub1.AddBR("实例:SELECT a.FK_Emp M1ID, a.FK_Station as M2ID, b.Name as M2Name FROM " + BP.WF.Glo.EmpStation + " a, Port_Station b WHERE A.FK_Station=B.No and a.FK_Emp='@Key'"); this.Pub1.AddBR("相关内容的值发生改变时而自动填充checkbox。"); this.Pub1.AddBR("注意:"); this.Pub1.AddBR("1,@Key 是主表字段传递过来的变量。"); this.Pub1.AddBR("2,必须并且仅有3个列 M1ID,M2ID,M2Name,顺序不要颠倒。第1列的ID对应列表的ID,第2,3列对应的是列表数据源的ID与名称。"); //this.Pub1.AddFieldSetEnd(); Pub1.AddEasyUiPanelInfoEnd(); } }
protected void Page_Load(object sender, EventArgs e) { #region Step = 1 if (this.Step == 1) { BP.Sys.SFDBSrcs ens = new BP.Sys.SFDBSrcs(); ens.RetrieveAll(); Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); Pub1.AddTR(); Pub1.AddTDGroupTitle("", "第1步:请选择数据源"); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDBegin(); Pub1.AddUL("class='navlist'"); Pub1.AddLi("<div><a href='SFGuide.aspx?Step=12&FK_SFDBsrc=local'><img src='../../Img/New.gif' align='middle' /><span>创建本地编码字典表</span></a></div>"); foreach (BP.Sys.SFDBSrc item in ens) { Pub1.AddLi("<div><a href='SFGuide.aspx?Step=2&FK_SFDBSrc=" + item.No + "'><span class='nav'>" + item.No + " - " + item.Name + "</span></a></div>"); } Pub1.AddLi("<div><a href=\"javascript:WinOpen('../RefFunc/UIEn.aspx?EnsName=BP.Sys.SFDBSrcs')\" ><img src='../../Img/New.gif' align='middle' /><span class='nav'>新建数据源</span></a></div>"); Pub1.AddULEnd(); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTableEnd(); } #endregion #region Step = 2 if (this.Step == 2) { SFDBSrc src = new SFDBSrc(this.FK_SFDBSrc); Pub1.Add("<div class='easyui-layout' data-options=\"fit:true\">"); Pub1.Add(string.Format("<div data-options=\"region:'west',split:true,title:'选择 {0} 表/视图'\" style='width:200px;'>", src.No)); var lb = new LB(); lb.ID = "LB_Table"; lb.BindByTableNoName(src.GetTables()); lb.Style.Add("width", "100%"); lb.Style.Add("height", "100%"); lb.AutoPostBack = true; lb.SelectedIndexChanged += new EventHandler(lb_SelectedIndexChanged); Pub1.Add(lb); Pub1.AddDivEnd(); Pub1.Add("<div data-options=\"region:'center',title:'第2步:请填写基础信息'\" style='padding:5px;'>"); Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); var dbType = src.DBSrcType; if (dbType == DBSrcType.Localhost) { switch (SystemConfig.AppCenterDBType) { case DBType.MSSQL: dbType = DBSrcType.SQLServer; break; case DBType.Oracle: dbType = DBSrcType.Oracle; break; case DBType.MySQL: dbType = DBSrcType.MySQL; break; case DBType.Informix: dbType = DBSrcType.Infomax; break; default: throw new Exception("没有涉及到的连接测试类型..."); } } var islocal = (src.DBSrcType == DBSrcType.Localhost).ToString().ToLower(); Pub1.AddTR(); Pub1.AddTDGroupTitle("style='width:100px'", "值(编号):"); var ddl = new DDL(); ddl.ID = "DDL_ColValue"; ddl.Attributes.Add("onchange", string.Format("generateSQL('{0}','{1}','{2}',{3})", src.No, src.DBName, dbType, islocal)); Pub1.AddTDBegin(); Pub1.Add(ddl); Pub1.Add(" 编号列,比如:类别编号"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDGroupTitle("标签(名称):"); ddl = new DDL(); ddl.ID = "DDL_ColText"; ddl.Attributes.Add("onchange", string.Format("generateSQL('{0}','{1}','{2}',{3})", src.No, src.DBName, dbType, islocal)); Pub1.AddTDBegin(); Pub1.Add(ddl); Pub1.Add(" 显示的列,比如:类别名称"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDGroupTitle("父结点值(字段):"); ddl = new DDL(); ddl.ID = "DDL_ColParentNo"; ddl.Attributes.Add("onchange", string.Format("generateSQL('{0}','{1}','{2}',{3})", src.No, src.DBName, dbType, islocal)); Pub1.AddTDBegin(); Pub1.Add(ddl); Pub1.Add(" 如果是树类型实体,该列设置有效,比如:上级类别编号"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDGroupTitle("字典表类型:"); ddl = new DDL(); ddl.ID = "DDL_SFTableType"; ddl.SelfBindSysEnum(SFTableAttr.SFTableType); ddl.Attributes.Add("onchange", string.Format("generateSQL('{0}','{1}','{2}',{3})", src.No, src.DBName, dbType, islocal)); Pub1.AddTD(ddl); Pub1.AddTREnd(); Pub1.AddTR(); Pub1.AddTDGroupTitle("查询语句:"); var tb = new TB(); tb.ID = "TB_SelectStatement"; tb.TextMode = TextBoxMode.MultiLine; tb.Columns = 60; tb.Rows = 10; tb.Style.Add("width", "99%"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add("<br /> 说明:查询语句可以修改,但请保证查询语句的准确性及有效性!"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTableEnd(); Pub1.AddBR(); Pub1.AddBR(); Pub1.AddSpace(1); var btn = new LinkBtn(false, NamesOfBtn.Next, "下一步"); btn.Click += new EventHandler(btn_Click); Pub1.Add(btn); Pub1.AddSpace(1); Pub1.Add("<a href='" + Request.UrlReferrer + "' class='easyui-linkbutton'>上一步</a>"); Pub1.AddDivEnd(); Pub1.AddDivEnd(); if (!IsPostBack && lb.Items.Count > 0) { lb.SelectedIndex = 0; ShowSelectedTableColumns(); } } #endregion #region Step = 12 if (this.Step == 12) { Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); Pub1.AddTR(); Pub1.AddTDGroupTitle("colspan='2'", "第2步:创建"); Pub1.AddTREnd(); TextBox tb = new TextBox(); tb.ID = "TB_No"; Pub1.AddTR(); Pub1.AddTDGroupTitle("style='width:100px'", "表英文名称:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 必须以字母或者下画线开头"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.Name; Pub1.AddTR(); Pub1.AddTDGroupTitle("", "表中文名称:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 显示的标签"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.TableDesc; Pub1.AddTR(); Pub1.AddTDGroupTitle("", "描述:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 表描述"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTableEnd(); Pub1.AddBR(); Pub1.AddBR(); Pub1.AddSpace(1); var btn = new LinkBtn(false, NamesOfBtn.Apply, "执行创建"); btn.Click += new EventHandler(btn_Create_Local_Click); Pub1.Add(btn); Pub1.AddSpace(1); Pub1.Add("<a href='" + Request.UrlReferrer + "' class='easyui-linkbutton'>上一步</a>"); } #endregion #region Step = 3 if (this.Step == 3) { Pub1.AddTable("class='Table' cellSpacing='1' cellPadding='1' border='1' style='width:100%'"); Pub1.AddTR(); Pub1.AddTDGroupTitle("colspan='2'", "第3步:创建"); Pub1.AddTREnd(); TextBox tb = new TextBox(); tb.ID = "TB_No"; Pub1.AddTR(); Pub1.AddTDGroupTitle("style='width:100px'", "表英文名称:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 必须以字母或者下画线开头"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.Name; Pub1.AddTR(); Pub1.AddTDGroupTitle("", "表中文名称:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 显示的标签"); Pub1.AddTDEnd(); Pub1.AddTREnd(); tb = new TextBox(); tb.ID = "TB_" + SFTableAttr.TableDesc; Pub1.AddTR(); Pub1.AddTDGroupTitle("", "描述:"); Pub1.AddTDBegin(); Pub1.Add(tb); Pub1.Add(" 表描述"); Pub1.AddTDEnd(); Pub1.AddTREnd(); Pub1.AddTableEnd(); Pub1.AddBR(); Pub1.AddBR(); Pub1.AddSpace(1); var btn = new LinkBtn(false, NamesOfBtn.Apply, "执行创建"); btn.Click += new EventHandler(btn_Create_Click); Pub1.Add(btn); Pub1.AddSpace(1); Pub1.Add("<a href='" + Request.UrlReferrer + "' class='easyui-linkbutton'>上一步</a>"); } #endregion }