Example #1
0
        public string ActiveDDL_Init()
        {
            DataSet ds = new DataSet();

            //加载外键字段.
            Paras ps = new Paras();

            ps.SQL = "SELECT KeyOfEn AS No, Name FROM Sys_MapAttr WHERE UIContralType=1 AND FK_MapData=" + SystemConfig.AppCenterDBVarStr + "FK_MapData AND KeyOfEn!=" + SystemConfig.AppCenterDBVarStr + "KeyOfEn";
            ps.Add("FK_MapData", this.FK_MapData);
            ps.Add("KeyOfEn", this.KeyOfEn);
            //var sql = "SELECT KeyOfEn AS No, Name FROM Sys_MapAttr WHERE UIContralType=1 AND FK_MapData='" + this.FK_MapData + "' AND KeyOfEn!='" + this.KeyOfEn + "'";
            DataTable dt = BP.DA.DBAccess.RunSQLReturnTable(ps);

            dt.TableName = "Sys_MapAttr";

            dt.Columns[0].ColumnName = "No";
            dt.Columns[1].ColumnName = "Name";
            ds.Tables.Add(dt);

            if (dt.Rows.Count == 0)
            {
                return("err@表单中没有要级联的下拉框.");
            }

            //加载数据源.
            SFDBSrcs srcs = new SFDBSrcs();

            srcs.RetrieveAll();
            DataTable dtSrc = srcs.ToDataTableField();

            dtSrc.TableName = "Sys_SFDBSrc";
            ds.Tables.Add(dtSrc);

            // 加载mapext 数据.
            MapExt me = new MapExt();
            int    i  = me.Retrieve(MapExtAttr.ExtType, MapExtXmlList.ActiveDDL,
                                    MapExtAttr.FK_MapData, this.FK_MapData,
                                    MapExtAttr.AttrOfOper, this.KeyOfEn);

            if (i == 0)
            {
                me.FK_MapData = this.FK_MapData;
                me.AttrOfOper = this.KeyOfEn;
                me.FK_DBSrc   = "local";
            }

            if (me.FK_DBSrc == "")
            {
                me.FK_DBSrc = "local";
            }

            //去掉 ' 号.
            me.SetValByKey("Doc", me.Doc);

            dt           = me.ToDataTableField();
            dt.TableName = "Sys_MapExt";
            ds.Tables.Add(dt);

            return(BP.Tools.Json.ToJson(ds));
        }
        /// <summary>
        ///  初始化sf2.
        /// </summary>
        /// <returns></returns>
        public string SF2_Init()
        {
            SFDBSrcs srcs = new SFDBSrcs();

            srcs.RetrieveAll();
            return(srcs.ToJson());
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                MapExt me = new MapExt();

                me.Retrieve(MapExtAttr.FK_MapData, this.FK_MapData, MapExtAttr.ExtType, this.ExtType, MapExtAttr.AttrOfOper, this.RefNo);
                this.TB_SQL.Text = me.Doc;

                BP.Sys.SFDBSrcs srcs = new SFDBSrcs();
                srcs.RetrieveAll();
                BP.Web.Controls.Glo.DDL_BindEns(this.DDL_DBSrc, srcs, me.FK_DBSrc);
            }
        }
Example #4
0
        public string DDLFullCtrl_Init()
        {
            DataSet ds = new DataSet();

            //加载数据源.
            SFDBSrcs srcs = new SFDBSrcs();

            srcs.RetrieveAll();
            DataTable dtSrc = srcs.ToDataTableField();

            dtSrc.TableName = "Sys_SFDBSrc";
            ds.Tables.Add(dtSrc);

            // 加载 mapext 数据.
            MapExt me = new MapExt();
            int    i  = me.Retrieve(MapExtAttr.ExtType, MapExtXmlList.DDLFullCtrl,
                                    MapExtAttr.FK_MapData, this.FK_MapData,
                                    MapExtAttr.AttrOfOper, this.KeyOfEn);

            if (i == 0)
            {
                me.FK_MapData = this.FK_MapData;
                me.AttrOfOper = this.KeyOfEn;
                me.FK_DBSrc   = "local";
            }

            me.W = i;

            if (me.FK_DBSrc == "")
            {
                me.FK_DBSrc = "local";
            }

            //去掉 ' 号.
            me.SetValByKey("Doc", me.Doc);

            DataTable dt = me.ToDataTableField();

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

            return(BP.Tools.Json.ToJson(ds));
        }
Example #5
0
        public void BindSFTable(SFTable en)
        {
            string star = "<font color=red><b>(*)</b></font>";

            this.Ucsys1.AddTable();

            if (this.FromApp == "SL")
            {
                if (this.RefNo == null)
                {
                    this.Ucsys1.AddCaption("新建表");
                }
                else
                {
                    this.Ucsys1.AddCaption("编辑表");
                }
            }
            else
            {
                if (this.RefNo == null)
                {
                    this.Ucsys1.AddCaption("<a href='Do.aspx?DoType=AddF&MyPK=" + this.MyPK + "&IDX=" + this.IDX + "'><img src='/WF/Img/Btn/Back.gif'>返回</a> - <a href='Do.aspx?DoType=AddSFTable&MyPK=" + this.MyPK + "&IDX=" + this.IDX + "'>外键</a> - 新建表");
                }
                else
                {
                    this.Ucsys1.AddCaption("<a href='Do.aspx?DoType=AddF&MyPK=" + this.MyPK + "&IDX=" + this.IDX + "'><img src='/WF/Img/Btn/Back.gif'>返回</a> - <a href='Do.aspx?DoType=AddSFTable&MyPK=" + this.MyPK + "&IDX=" + this.IDX + "'>外键</a> - 编辑表");
                }
            }

            if (this.RefNo == null)
            {
                this.Title = "新建表";
            }
            else
            {
                this.Title = "编辑表";
            }

            int  idx    = 0;
            bool isItem = false;

            this.Ucsys1.AddTR();
            this.Ucsys1.AddTDTitle("Idx");
            this.Ucsys1.AddTDTitle("项目");
            this.Ucsys1.AddTDTitle("采集");


            // this.Ucsys1.AddFieldSet("帮助", help);

            this.Ucsys1.AddTDTitle("备注");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("数据源" + star);

            BP.Web.Controls.DDL ddl = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_FK_SFDBSrc";
            SFDBSrcs srcs = new SFDBSrcs();

            srcs.RetrieveDBSrc();
            ddl.Bind(srcs, en.FK_SFDBSrc);
            this.Ucsys1.AddTD(ddl);

            //  this.Ucsys1.AddTD("外键表的数据源必须与该表单的数据源一致.");
            this.Ucsys1.AddTD("选择数据源,点击这里<a href=\"javascript:WinOpen('/WF/Comm/Search.aspx?EnsName=BP.Sys.SFDBSrcs')\">创建</a>,<a href='SFSQL.aspx?DoType=New&MyPK=" + this.MyPK + "&Idx='>刷新</a>。");
            this.Ucsys1.AddTREnd();


            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("表中文名称" + star);
            BP.Web.Controls.TB tb = new BP.Web.Controls.TB();
            tb.ID           = "TB_Name";
            tb.Text         = en.Name;
            tb.AutoPostBack = true;
            tb.TextChanged += new EventHandler(tbName_TextChanged);
            this.Ucsys1.AddTD(tb);
            this.Ucsys1.AddTD("该表的中文名称,比如:物料类别,科目。");
            this.Ucsys1.AddTREnd();


            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("表英文名称" + star);
            tb      = new BP.Web.Controls.TB();
            tb.ID   = "TB_No";
            tb.Text = en.No;
            if (this.RefNo == null)
            {
                tb.Enabled = true;
            }
            else
            {
                tb.Enabled = false;
            }

            if (tb.Text == "")
            {
                tb.Text = "";
            }

            this.Ucsys1.AddTD(tb);
            this.Ucsys1.AddTDBigDoc("必须以字母或者下划线开头,不能包含特殊字符。");
            this.Ucsys1.AddTREnd();



            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("数据结构");
            ddl    = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_" + SFTableAttr.CodeStruct;
            ddl.BindSysEnum(SFTableAttr.CodeStruct, (int)en.CodeStruct);
            this.Ucsys1.AddTD(ddl);
            this.Ucsys1.AddTD("用于在下拉框中不同格式的展现.");
            this.Ucsys1.AddTREnd();

            //isItem = this.Ucsys1.AddTR(isItem);
            //this.Ucsys1.AddTDIdx(idx++);
            //this.Ucsys1.AddTD("数据源" + star);
            //ddl = new BP.Web.Controls.DDL();
            //SFDBSrcs srcs = new SFDBSrcs();
            //BP.En.QueryObject qo = new QueryObject(srcs);
            //qo.AddWhere(SFDBSrcAttr.DBSrcType, " < ", "100");
            //qo.DoQuery();
            //ddl.Bind(srcs, en.FK_SFDBSrc);
            //this.Ucsys1.AddTD(ddl);
            //this.Ucsys1.AddTD("选择数据源,点击这里<a href=\"javascript:WinOpen('/WF/Comm/Search.aspx?EnsName=BP.Sys.SFDBSrcs')\">创建</a>,<a href='SFSQL.aspx?DoType=New&MyPK=" + this.MyPK + "&Idx='>刷新</a>。");
            //this.Ucsys1.AddTREnd();


            //isItem = this.Ucsys1.AddTR(isItem);
            //this.Ucsys1.AddTDIdx(idx++);
            //this.Ucsys1.AddTD("描述" + star);
            //tb = new BP.Web.Controls.TB();
            //tb.ID = "TB_TableDesc";
            //tb.Text = en.TableDesc;
            //this.Ucsys1.AddTD(tb);
            //this.Ucsys1.AddTD("对该表的备注,比如:物料类别字典表,科目字典表。");
            //this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.Add("<TD colspan=3 align=center>");
            Button btn = new Button();

            btn.ID       = "Btn_Save";
            btn.CssClass = "Btn";
            if (this.RefNo == null)
            {
                btn.Text = "创建";
            }
            else
            {
                btn.Text = "保存";
            }

            btn.Click += new EventHandler(btn_Save_Click);
            this.Ucsys1.Add(btn);


            btn      = new Button();
            btn.ID   = "Btn_Edit";
            btn.Text = "编辑数据"; // "编辑数据"
            if (this.RefNo == null)
            {
                btn.Enabled = false;
            }
            if (en.IsClass)
            {
                btn.Attributes["onclick"] = "WinOpen('../Search.aspx?EnsName=" + en.No + "', 'dg'); return false;";
            }
            else
            {
                btn.Attributes["onclick"] = "WinOpen('SFTableEditData.aspx?RefNo=" + this.RefNo + "', 'dg'); return false;";
            }

            this.Ucsys1.Add(btn);

            if (this.FromApp != "SL")
            {
                btn          = new Button();
                btn.ID       = "Btn_Add";
                btn.CssClass = "Btn";

                btn.Text = "添加到表单";;  // "添加到表单";
                btn.Attributes["onclick"] = " return confirm('您确认吗?');";
                btn.Click += new EventHandler(btn_Add_Click);
                if (this.RefNo == null)
                {
                    btn.Enabled = false;
                }
            }

            this.Ucsys1.Add(btn);
            btn          = new Button();
            btn.ID       = "Btn_Del";
            btn.CssClass = "Btn";

            btn.Text = "删除";
            btn.Attributes["onclick"] = " return confirm('您确认吗?');";
            if (this.RefNo == null)
            {
                btn.Enabled = false;
            }

            btn.Click += new EventHandler(btn_Del_Click);
            this.Ucsys1.Add(btn);

            //string help = "<ul>";
            //help += "<li>输入:新表名或已经存在的表名或者视图,必须是英文字母或者下划线。</li>";
            //help += "<li>如果该表或者视图已经存在本机中,系统就会把他注册到ccform的数据源(Sys_SFTable)里,您可以打开Sys_SFTable查看ccform对外部数据源管理的信息。</li>";
            //help += "<li>如果不存在ccform就会自动创建表,该表有No,Name两个列,并且初始化3笔数据,您可以对该表进行编辑。</li>";
            //help += "</ul>";

            this.Ucsys1.Add(BP.WF.Glo.GenerHelpCCForm("帮助", null, null));

            this.Ucsys1.Add("</TD>");
            this.Ucsys1.AddTREnd();
            this.Ucsys1.AddTableEnd();
        }
Example #6
0
        public void BindSFTable(SFTable en)
        {
            bool   isItem = false;
            string star   = "<font color=red><b>(*)</b></font>";

            this.Ucsys1.AddTable();

            #region 生成标题.
            if (this.FromApp == "SL")
            {
                if (this.RefNo == null)
                {
                    this.Ucsys1.AddCaption("新建表");
                }
                else
                {
                    this.Ucsys1.AddCaption("编辑表");
                }
            }
            else
            {
                if (this.RefNo == null)
                {
                    this.Ucsys1.AddCaption("<a href='Do.aspx?DoType=AddF&MyPK=" + this.MyPK + "&IDX=" + this.IDX + "'><img src='/WF/Img/Btn/Back.gif'>返回</a> - <a href='Do.aspx?DoType=AddSFSQL&MyPK=" + this.MyPK + "&IDX=" + this.IDX + "'>外部表</a> - 新建表");
                }
                else
                {
                    this.Ucsys1.AddCaption("<a href='Do.aspx?DoType=AddF&MyPK=" + this.MyPK + "&IDX=" + this.IDX + "'><img src='/WF/Img/Btn/Back.gif'>返回</a> - <a href='Do.aspx?DoType=AddSFSQL&MyPK=" + this.MyPK + "&IDX=" + this.IDX + "'>外部表</a> - 编辑表");
                }
            }

            if (this.RefNo == null)
            {
                this.Title = "新建表";
            }
            else
            {
                this.Title = "编辑表";
            }

            #endregion 生成标题.

            int idx = 0;
            this.Ucsys1.AddTR();
            this.Ucsys1.AddTDTitle("Idx");
            this.Ucsys1.AddTDTitle("项目");
            this.Ucsys1.AddTDTitle("采集");
            this.Ucsys1.AddTDTitle("备注");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("数据源" + star);

            BP.Web.Controls.DDL ddl = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_FK_SFDBSrc";

            SFDBSrcs srcs = new SFDBSrcs();
            srcs.RetrieveDBSrc();

            ddl.Bind(srcs, en.FK_SFDBSrc);
            this.Ucsys1.AddTD(ddl);
            this.Ucsys1.AddTD("选择数据源,点击这里<a href=\"javascript:WinOpen('/WF/Comm/Search.aspx?EnsName=BP.Sys.SFDBSrcs')\">创建</a>,<a href='SFSQL.aspx?DoType=New&MyPK=" + this.MyPK + "&Idx='>刷新</a>。");
            this.Ucsys1.AddTREnd();


            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("中文名称" + star);
            BP.Web.Controls.TB tb = new BP.Web.Controls.TB();
            tb.ID           = "TB_" + SFTableAttr.Name;
            tb.Text         = en.Name;
            tb.Columns      = 35;
            tb.AutoPostBack = true;
            tb.TextChanged += new EventHandler(tbName_TextChanged);
            this.Ucsys1.AddTD(tb);
            this.Ucsys1.AddTD("该表的中文名称,比如:物料类别,科目。");
            this.Ucsys1.AddTREnd();


            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("英文名称" + star);
            tb      = new BP.Web.Controls.TB();
            tb.ID   = "TB_" + SFTableAttr.No;
            tb.Text = en.No;
            if (this.RefNo == null)
            {
                tb.Enabled = true;
            }
            else
            {
                tb.Enabled = false;
            }

            if (tb.Text == "")
            {
                tb.Text = "";
            }
            tb.Columns = 35;
            tb.Attributes["onkeyup"] = "return IsDigit(this);";


            this.Ucsys1.AddTD(tb);
            this.Ucsys1.AddTDBigDoc("必须以字母或者下划线开头,不能包含特殊字符。");
            this.Ucsys1.AddTREnd();


            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("数据结构");
            ddl    = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_" + SFTableAttr.CodeStruct;
            ddl.BindSysEnum(SFTableAttr.CodeStruct, (int)en.CodeStruct);
            this.Ucsys1.AddTD(ddl);
            this.Ucsys1.AddTD("字典表的数据结构,用于在下拉框中不同格式的展现。");
            this.Ucsys1.AddTREnd();

            //isItem = this.Ucsys1.AddTR(isItem);
            //this.Ucsys1.AddTDIdx(idx++);
            //this.Ucsys1.AddTD("描述");
            //tb = new BP.Web.Controls.TB();
            //tb.ID = "TB_"+SFTableAttr.TableDesc;
            //tb.Text = en.TableDesc;
            //this.Ucsys1.AddTD(tb);
            //this.Ucsys1.AddTD("对该表的备注,比如:物料类别字典表,科目字典表。");
            //this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("colspan=3", "查询SQL" + star + "支持ccform表达式,允许有@WebUser.No,@WebUser.Name,@WebUser.FK_Dept变量。");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            tb          = new BP.Web.Controls.TB();
            tb.ID       = "TB_" + SFTableAttr.SelectStatement; //查询.
            tb.Text     = en.SelectStatement;                  //查询语句.
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 4;
            tb.Columns  = 70;
            //tb.Attributes["width"] = "98%";
            this.Ucsys1.AddTD("colspan=3", tb);
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("colspan=3", "比如:SELECT BH AS No, MC as Name FROM CC_USER WHERE CCType=3<br>SELECT BH AS No, MC as Name FROM CC_USER WHERE [email protected]_Dept");
            this.Ucsys1.AddTREnd();

            //isItem = this.Ucsys1.AddTR(isItem);
            //this.Ucsys1.AddTDIdx(idx++);
            //this.Ucsys1.AddTD("数据缓存(分钟)" + star);
            //tb = new BP.Web.Controls.TB();
            //tb.ID = "TB_"+SFTableAttr.CashMinute;
            //tb.TextExtInt = en.CashMinute;
            //tb.Columns = 5;
            //this.Ucsys1.AddTD(tb);
            //this.Ucsys1.AddTD("默认为0表示不缓存,缓存的数据存储在Sys_Dict里面.");
            //this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.Add("<TD colspan=3 align=center>");
            Button btn = new Button();
            btn.ID       = "Btn_Save";
            btn.CssClass = "Btn";
            if (this.RefNo == null)
            {
                btn.Text = "创建";
            }
            else
            {
                btn.Text = "保存";
            }
            btn.Click += new EventHandler(btn_Save_Click);
            this.Ucsys1.Add(btn);

            //btn = new Button();
            //btn.ID = "Btn_Edit";
            //btn.CssClass = "Btn";
            //btn.Text =  "查看数据"; // "编辑数据"
            //if (this.RefNo == null)
            //    btn.Enabled = false;
            //if (en.IsClass)
            //    btn.Attributes["onclick"] = "WinOpen('../Search.aspx?EnsName=" + en.No + "','dg' ); return false;";
            //else
            //    btn.Attributes["onclick"] = "WinOpen('SFTableEditData.aspx?RefNo=" + this.RefNo + "','dg' ); return false;";
            //this.Ucsys1.Add(btn);

            if (this.FromApp != "SL")
            {
                btn          = new Button();
                btn.ID       = "Btn_Add";
                btn.CssClass = "Btn";
                btn.Text     = "添加到表单";; // "添加到表单";
                btn.Attributes["onclick"] = " return confirm('您确认吗?');";
                btn.Click += new EventHandler(btn_Add_Click);
                if (this.RefNo == null)
                {
                    btn.Enabled = false;
                }
                this.Ucsys1.Add(btn);
            }

            btn          = new Button();
            btn.ID       = "Btn_Del";
            btn.CssClass = "Btn";
            btn.Text     = "删除";
            btn.Attributes["onclick"] = " return confirm('您确认吗?');";
            if (this.RefNo == null)
            {
                btn.Enabled = false;
            }

            btn.Click += new EventHandler(btn_Del_Click);
            this.Ucsys1.Add(btn);
            this.Ucsys1.Add("</TD>");
            this.Ucsys1.AddTREnd();
            this.Ucsys1.AddTableEnd();

            //string help = "<ul>";
            //help += "<li>输入:新表名或已经存在的表名或者视图,必须是英文字母或者下划线。</li>";
            //help += "<li>如果该表或者视图已经存在本机中,系统就会把他注册到ccform的数据源(Sys_SFTable)里,您可以打开Sys_SFTable查看ccform对外部数据源管理的信息。</li>";
            //help += "<li>如果不存在ccform就会自动创建表,该表有No,Name两个列,并且初始化3笔数据,您可以对该表进行编辑。</li>";
            //help += "</ul>";
            //this.Ucsys1.AddFieldSet("帮助", help);
        }
Example #7
0
        public void BindSFTable(SFTable en)
        {
            bool   isItem = false;
            string star   = "<font color=red><b>(*)</b></font>";

            this.Ucsys1.AddTable();

            #region 生成标题.
            if (this.FromApp == "SL")
            {
                if (this.RefNo == null)
                {
                    this.Ucsys1.AddCaption("新建WebService数据源接口");
                }
                else
                {
                    this.Ucsys1.AddCaption("编辑WebService数据源接口");
                }
            }
            else
            {
                this.Ucsys1.AddCaption("<a href='Do.aspx?DoType=AddF&MyPK=" + this.MyPK + "&IDX=" + this.IDX + "'><img src='/WF/Img/Btn/Back.gif'>返回</a> - <a href='Do.aspx?DoType=AddSFWS&MyPK=" + this.MyPK + "&IDX=" + this.IDX + "'>WebService数据源接口</a> - 新建WebService数据源接口");
            }

            if (this.RefNo == null)
            {
                this.Title = "新建WebService数据源接口";
            }
            else
            {
                this.Title = "编辑WebService数据源接口";
            }

            #endregion 生成标题.

            int idx = 0;
            this.Ucsys1.AddTR();
            this.Ucsys1.AddTDTitle("Idx");
            this.Ucsys1.AddTDTitle("项目");
            this.Ucsys1.AddTDTitle("采集");
            this.Ucsys1.AddTDTitle("备注");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("接口英文名称" + star);
            var tb = new BP.Web.Controls.TB();
            tb.ID   = "TB_" + SFTableAttr.No;
            tb.Text = en.No;
            if (this.RefNo == null)
            {
                tb.Enabled = true;
            }
            else
            {
                tb.Enabled = false;
            }

            if (tb.Text == "")
            {
                tb.Text = "SF_";
            }

            this.Ucsys1.AddTD(tb);
            this.Ucsys1.AddTDBigDoc("必须以字母或者下划线开头,不能包含特殊字符。");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("接口中文名称" + star);
            tb      = new BP.Web.Controls.TB();
            tb.ID   = "TB_" + SFTableAttr.Name;
            tb.Text = en.Name;
            this.Ucsys1.AddTD(tb);
            this.Ucsys1.AddTD("WebService中的接口方法的中文名称。");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("数据源" + star);
            BP.Web.Controls.DDL ddl  = new BP.Web.Controls.DDL();
            SFDBSrcs            srcs = new SFDBSrcs();
            BP.En.QueryObject   qo   = new QueryObject(srcs);
            qo.AddWhere(SFDBSrcAttr.DBSrcType, " = ", "100");
            qo.DoQuery();
            ddl.Bind(srcs, en.FK_SFDBSrc);
            ddl.ID                    = "DDL_" + SFTableAttr.FK_SFDBSrc;
            ddl.AutoPostBack          = true;
            ddl.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged);
            this.Ucsys1.AddTD(ddl);
            this.Ucsys1.AddTD("选择数据源,点击这里<a href=\"javascript:WinOpen('/WF/Comm/Search.aspx?EnsName=BP.Sys.SFDBSrcs')\">创建</a>,<a href='SFWS.aspx?DoType=New&MyPK=" + this.MyPK + "&Idx='>刷新</a>。");
            this.Ucsys1.AddTREnd();

            var rt = en.TableDesc.Split(',');

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("选择接口" + star);
            ddl    = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_" + SFTableAttr.TableDesc;

            if (srcs.Count > 0)
            {
                var ms = GetWebServiceMethods(!string.IsNullOrWhiteSpace(en.FK_SFDBSrc) ? (SFDBSrc)srcs.GetEntityByKey(SFDBSrcAttr.No, en.FK_SFDBSrc) : (SFDBSrc)srcs[0]);

                foreach (var m in ms)
                {
                    ddl.Items.Add(new ListItem(m.Value, m.Key));
                }

                ddl.SetSelectItem(rt.Length == 2 ? rt[0] : ms.Count > 0 ? ms.First().Key : string.Empty);
            }

            this.Ucsys1.AddTD(ddl);
            this.Ucsys1.AddTDBigDoc("选择WebService中的接口方法名。");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("colspan=3", "接口参数定义" + star + "支持ccform表达式,允许有@WebUser.No,@WebUser.Name,@WebUser.FK_Dept变量。");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            tb          = new BP.Web.Controls.TB();
            tb.ID       = "TB_" + SFTableAttr.SelectStatement;
            tb.Text     = en.SelectStatement;
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 3;
            tb.Columns  = 70;
            this.Ucsys1.AddTD("colspan=3", tb);
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("colspan=3", "如:WorkId=@WorkID&FK_Flow=@FK_Flow&FK_Node=@FK_Node&SearchType=1,带@的参数值在运行时自动使用发起流程的相关参数值替换,而不带@的参数值使用后面的赋值;参数个数与WebServices接口方法的参数个数一致,且顺序一致,且值均为字符类型。");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("返回值类型" + star);
            ddl    = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_ResultType";

            ddl.Items.Add(new ListItem("DataTable数据表", "DataTable"));
            ddl.Items.Add(new ListItem("DataSet数据集", "DataSet"));
            ddl.Items.Add(new ListItem("Json字符串", "Json"));
            ddl.Items.Add(new ListItem("Xml字符串", "Xml"));

            if (rt.Length == 2)
            {
                ddl.SetSelectItem(rt[1]);
            }

            this.Ucsys1.AddTDBegin();
            this.Ucsys1.Add(ddl);
            this.Ucsys1.AddBR();
            this.Ucsys1.Add("注意:所有返回值类型都需有No,Name这两列。" +
                            "<script type='text/javascript'>" +
                            "   var info = '1. DataTable数据表,必须为DataTable命名。\\n" +
                            "2. DataSet数据集,只取数据集里面的第1个DataTable。\\n" +
                            "3. Json字符串,格式如:\\n" +
                            "[\\n" +
                            "  {\"No\":\"001\",\"Name\":\"生产部\"},\\n" +
                            "  {\"No\":\"002\",\"Name\":\"研发部\"},\\n" +
                            "  ...\\n" +
                            "]\\n" +
                            "4. Xml字符串,格式如:\\n" +
                            "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\\n" +
                            "<Array>\\n" +
                            "  <Item>\\n" +
                            "    <No>001</No>\\n" +
                            "    <Name>生产部</Name>\\n" +
                            "  </Item>\\n" +
                            "  <Item>\\n" +
                            "    <No>002</No>\\n" +
                            "    <Name>研发部</Name>\\n" +
                            "  </Item>\\n" +
                            "  ...\\n" +
                            "</Array>';" +
                            "</script>" +
                            "<a href='javascript:void(0)' onclick='alert(info)'>格式说明</a>");
            this.Ucsys1.AddTDEnd();
            this.Ucsys1.AddTDBigDoc("选择WebService中的接口方法返回值的类型。");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.AddTD("返回数据结构");
            ddl    = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_" + SFTableAttr.CodeStruct;
            ddl.BindSysEnum(SFTableAttr.CodeStruct, (int)en.CodeStruct);
            this.Ucsys1.AddTD(ddl);
            this.Ucsys1.AddTD("WebService接口返回的数据结构,用于在下拉框中不同格式的展现。");
            this.Ucsys1.AddTREnd();

            isItem = this.Ucsys1.AddTR(isItem);
            this.Ucsys1.AddTDIdx(idx++);
            this.Ucsys1.Add("<TD colspan=3 align=center>");
            Button btn = new Button();
            btn.ID       = "Btn_Save";
            btn.CssClass = "Btn";
            if (this.RefNo == null)
            {
                btn.Text = "创建";
            }
            else
            {
                btn.Text = "保存";
            }
            btn.Click += new EventHandler(btn_Save_Click);
            this.Ucsys1.Add(btn);

            if (this.FromApp != "SL")
            {
                btn          = new Button();
                btn.ID       = "Btn_Add";
                btn.CssClass = "Btn";
                btn.Text     = "添加到表单";; // "添加到表单";
                btn.Attributes["onclick"] = " return confirm('您确认吗?');";
                btn.Click += new EventHandler(btn_Add_Click);
                if (this.RefNo == null)
                {
                    btn.Enabled = false;
                }
                this.Ucsys1.Add(btn);
            }

            btn          = new Button();
            btn.ID       = "Btn_Del";
            btn.CssClass = "Btn";
            btn.Text     = "删除";
            btn.Attributes["onclick"] = " return confirm('您确认吗?');";
            if (this.RefNo == null)
            {
                btn.Enabled = false;
            }

            btn.Click += new EventHandler(btn_Del_Click);
            this.Ucsys1.Add(btn);
            this.Ucsys1.Add("</TD>");
            this.Ucsys1.AddTREnd();
            this.Ucsys1.AddTableEnd();
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MapExt me = new MapExt();
            // me.MyPK = this.FK_MapData + "_" + this.ExtType + "_" + me.AttrOfOper + "_" + me.AttrsOfActive;

            int i = me.Retrieve(MapExtAttr.FK_MapData, this.FK_MapData, MapExtAttr.ExtType, MapExtXmlList.ActiveDDL,
                                MapExtAttr.AttrOfOper, this.RefNo);

            this.Pub1.AddEasyUiPanelInfoBegin("为下拉框[" + this.RefNo + "]设置联动.", "icon-edit");
            me.FK_MapData = this.FK_MapData;

            this.Pub1.AddTableNormal();

            MapAttrs attrs = new MapAttrs(this.FK_MapData);

            this.Pub1.AddTR();
            this.Pub1.AddTDGroupTitle("联动下拉框:");
            BP.Web.Controls.DDL ddl = new BP.Web.Controls.DDL();
            ddl.ID = "DDL_Attr";
            foreach (MapAttr attr in attrs)
            {
                if (attr.UIVisible == false)
                {
                    continue;
                }

                if (attr.UIIsEnable == false)
                {
                    continue;
                }

                if (attr.UIContralType != UIContralType.DDL)
                {
                    continue;
                }

                if (attr.KeyOfEn == this.RefNo)
                {
                    continue;
                }

                ddl.Items.Add(new ListItem(attr.KeyOfEn + " - " + attr.Name, attr.KeyOfEn));
            }
            ddl.SetSelectItem(me.AttrsOfActive);
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTD("要实现联动的菜单");
            this.Pub1.AddTREnd();

            // 数据源列表.
            this.Pub1.AddTR();
            this.Pub1.AddTDGroupTitle("colspan=1", "数据源");

            ddl = new DDL();
            SFDBSrcs srcs = new SFDBSrcs();

            srcs.RetrieveAll();
            ddl.BindEntitiesNoName(srcs);

            this.Pub1.AddTD(ddl);
            // this.Pub1.AddTD("ccform允许从其他数据源中取数据,<a href=\"javascript:WinOpen('/WF/Comm/Search.aspx?EnsName=BP.Sys.SFDBSrcs')\" ><img src='/WF/Img/Setting.png' border=0/>设置/新建数据源</a>, <a href=\"javascript:window.localhost.href=window.localhost.href;\" >刷新数据源</a>");
            this.Pub1.AddTD("ccform允许从其他数据源中取数据,<a href=\"javascript:WinOpen('/WF/Comm/Search.aspx?EnsName=BP.Sys.SFDBSrcs','d2')\" ><img src='/WF/Img/Setting.png' border=0/>设置/新建数据源</a>, <a href=\"javascript:window.localhost.href=window.localhost.href;\" >刷新数据源</a>");

            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDBegin("colspan='3'");
            RadioButton rb = new RadioButton();

            rb.Text      = "通过sql获取联动";
            rb.GroupName = "sdr";
            rb.ID        = "RB_0";
            if (me.DoWay == 0)
            {
                rb.Checked = true;
            }

            this.Pub1.Add("在下面文本框中输入一个SQL,具有编号,标签列,用来绑定下从动下拉框。<br />");
            this.Pub1.Add("比如:SELECT No, Name FROM CN_City WHERE FK_SF = '@Key' ");
            this.Pub1.AddBR();
            TextBox tb = new TextBox();

            tb.ID       = "TB_Doc";
            tb.Text     = me.Doc;
            tb.Columns  = 80;
            tb.CssClass = "TH";
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 7;
            tb.Style.Add("width", "99%");
            this.Pub1.Add(tb);
            this.Pub1.AddBR();
            this.Pub1.Add("说明:@Key是ccflow约定的关键字,是主下拉框传递过来的值");
            //this.Pub1.AddFieldSetEnd();

            rb           = new RadioButton();
            rb.Text      = "通过编码标识获取";
            rb.GroupName = "sdr";
            rb.Enabled   = false;
            rb.ID        = "RB_1";
            if (me.DoWay == 1)
            {
                rb.Checked = true;
            }

            //this.Pub1.AddFieldSet(rb);
            this.Pub1.Add("主菜单是编号的是从动菜单编号的前几位,不必联动内容。<br />");
            this.Pub1.Add("比如: 主下拉框是省份,联动菜单是城市。");
            //this.Pub1.AddFieldSetEnd();

            //this.Pub1.Add("</TD>");
            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();

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

            btn.Click += new EventHandler(btn_SaveJiLian_Click);
            this.Pub1.AddTD("colspan=2", btn);

            if (i != 0)
            {
                btn        = new LinkBtn(false, NamesOfBtn.Delete, "删除");
                btn.Click += new EventHandler(btn_Del_Click);
                this.Pub1.AddTD("colspan=1", btn);
            }

            this.Pub1.AddTREnd();
            this.Pub1.AddTableEnd();
            this.Pub1.AddEasyUiPanelInfoEnd();
        }
Example #9
0
        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, "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;编辑数据");
                        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;
            }
        }