Example #1
0
 public NodeFormat()
 {
     Name = "format";
     Attrs.Add("FontSize", "10");
     Attrs.Add("FontName", "宋体");
     Attrs.Add("Rotate", "0");
 }
Example #2
0
        public NodePage()
        {
            Name = "Page";
            Attrs.Add("Num", "1");
            for (int i = 0; i < Config.DefaultElementNumList.Length; i++)
            {
                Dictionary <string, object> childAttrs = new Dictionary <string, object>();
                childAttrs.Add("Num", Config.DefaultElementNumList[i]);
                childAttrs.Add("Key", Config.DefaultElementKeyList[i]);
                childAttrs.Add("Type", Config.DefaultElementTypeList[i]);
                childAttrs.Add("Desc", Config.DefaultElementDescList[i]);

                List <NodeBase> childChildNodes = new List <NodeBase>();
                childChildNodes.Add(new NodeFormat(Config.DefaultElementTypeList[i]));
                childChildNodes.Add(Config.DefaultElementPositionList[i]);
                if (Config.DefaultElementKeyList[i].Substring(0, 1) != "1")
                {
                    childChildNodes.Add(new NodeRequirement(Config.DefaultElementKeyList[i]));
                }
                childChildNodes.Add(new NodeBase {
                    Name = "data", Content = Config.DefaultElementDataList[i], Attrs = null, ChildNodes = null
                });

                ChildNodes.Add(new NodeBase {
                    Name = "element", Content = "", Attrs = childAttrs, ChildNodes = childChildNodes
                });
            }
        }
        public IViewBuilder ContentMultiple(string property, IEnumerable <Types.IView> content)
        {
            var getter = FSharpValueOption <FSharpFunc <TView, object> > .Some(FuncConvert.FromFunc <TView, object>(control => control.Children));

            var setter = FSharpValueOption <FSharpFunc <Tuple <TView, object>, Unit> > .None;
            var list   = Microsoft.FSharp.Collections.ListModule.OfSeq(content);

            Attrs.Add(Avalonia.FuncUI.Builder.AttrBuilder <TView> .CreateContentMultiple(property, getter, setter, list));
            return(this);
        }
Example #4
0
        public static Attrs GetMyAttrs(Entities ens, Map map)
        {
            string vals = SystemConfig.GetConfigXmlEns("ListAttrs", ens.ToString());

            if (vals == null)
            {
                return(map.Attrs);
            }
            Attrs attrs = new Attrs();

            foreach (Attr attr in map.Attrs)
            {
                if (vals.Contains("," + attr.Key + ","))
                {
                    attrs.Add(attr);
                }
            }
            return(attrs);
        }
Example #5
0
        public static Attrs GetMyAttrs(Entities ens, Map map)
        {
            string vals = SystemConfig.GetConfigXmlEns("ListAttrs", ens.ToString());

            if (vals == null)
            {
                return(map.Attrs);
            }
            Attrs attrs = new Attrs();

            foreach (Attr attr in map.Attrs)
            {
                if (vals.Contains("," + attr.Key + ","))
                {
                    attrs.Add(attr);
                }
            }
            return(attrs);

            //string no = Web.WebUser.No;
            //if (no == null)
            //    throw new Exception("@您的登陆时间太长。。。");

            //CField cf = new CField(no, ens.ToString());
            //if (cf.Attrs == "")
            //    return ens.GetNewEntity.EnMap.Attrs;

            //Attrs myattrs = new Attrs();
            //Attrs attrs = ens.GetNewEntity.EnMap.Attrs;
            //foreach (Attr attr in attrs)
            //{
            //    if (attr.IsPK)
            //    {
            //        myattrs.Add(attr);
            //        continue;
            //    }
            //    if (cf.Attrs.IndexOf("@" + attr.Key + "@") >= 0)
            //        myattrs.Add(attr);
            //}
            //return myattrs;
        }
Example #6
0
        public static string[] GetBillParas(string cfile, string ensStrs, Entities ens)
        {
            string[] paras = Bill_Cash[cfile + "Para"] as string[];
            if (paras != null)
            {
                return(paras);
            }

            Attrs attrs = new Attrs();

            foreach (Entity en in ens)
            {
                string perKey = en.ToString();

                Attrs enAttrs = en.EnMap.Attrs;
                foreach (Attr attr in enAttrs)
                {
                    Attr attrN = new Attr();
                    attrN.Key = perKey + "." + attr.Key;

                    //attrN.Key = attrN.Key.Replace("\\f2","");
                    //attrN.Key = attrN.Key.Replace("\\f3", "");

                    if (attr.IsRefAttr)
                    {
                        attrN.Field = perKey + "." + attr.Key + "Text";
                    }
                    attrN.MyDataType  = attr.MyDataType;
                    attrN.MyFieldType = attr.MyFieldType;
                    attrN.UIBindKey   = attr.UIBindKey;
                    attrN.Field       = attr.Field;
                    attrs.Add(attrN);
                }
            }

            paras = Cash.GetBillParas_Gener(cfile, attrs);
            _Bill_Cash[cfile + "Para"] = paras;
            return(paras);
        }
Example #7
0
        public NodeFormat(string elementType)
        {
            Name = "format";

            switch (elementType)
            {
            case "Text":
                Attrs.Add("FontSize", "10");
                break;

            case "ActiveText":
                Attrs.Add("FontSize", "12");
                break;

            case "Image":
            case "ActiveImage":
            case "BackGroundImage":
                Attrs.Add("Rotate", "0");
                break;

            case "Line":
                Attrs.Add("Rotate", "0");
                Attrs.Add("LineWidth", "1");
                Attrs.Add("Color", "definegreen");
                break;

            case "Table":
                Attrs.Add("FontSize", "8");
                Attrs.Add("FontName", "楷体");
                Attrs.Add("BorderWidth", "2");
                Attrs.Add("BorderColor", "black");
                Attrs.Add("WidthAligned", "left");
                Attrs.Add("HeightAligned", "left");
                Attrs.Add("CellAlignedW", "left");
                Attrs.Add("CellAlignedH", "left");
                break;
            }
        }
Example #8
0
        public void SetDGData()
        {
            Map map = this.HisEn.EnMap;

            #region 检查布局 条件 是否合理。
            try
            {
                // 判断选择的两个对象是否相同。
                if (this.DDL_M2.SelectedItemStringVal == this.DDL_M1.SelectedItemStringVal)
                {
                    throw new Exception("对比分析的两个对象[" + this.ContrastLab + "1]与[" + this.ContrastLab + "2]不能相同,这样不符合业务逻辑。");
                }

                // 取出来隶属属性相同的全局配置。
                GlobalKeyVals xmls = new GlobalKeyVals();
                xmls.RetrieveBy(GlobalKeyValAttr.Key, GlobalKeyValList.Subjection);
                foreach (GlobalKeyVal xml in xmls)
                {
                    if (xml.Val.Contains("@" + this.ContrastKey + "@") == false)
                    {
                        continue;
                    }

                    /*
                     * 如果当前的比较对象,包含在全局的系列配置中,
                     * 就把查询条件中的所有与此有关系的都要设置为全部。
                     */
                    string[] myattrs = xml.Val.Split('@');
                    foreach (string s in myattrs)
                    {
                        if (s == null || s == "")
                        {
                            continue;
                        }

                        // 把隶属与条件都设置为查询全部。
                        if (this.ToolBar1.FindControl("DDL_" + s) != null)
                        {
                            if (s == "FK_Dept")
                            {
                                this.ToolBar1.GetDDLByKey("DDL_FK_Dept").SelectedIndex = 0;
                            }
                            else
                            {
                                this.ToolBar1.GetDDLByKey("DDL_" + s).SetSelectItem("all");
                            }
                        }
                    }

                    if (xml.Val.Contains("@" + this.DDL_Key.SelectedItemStringVal + "@"))
                    {
                        /* 分析项目与分组条件不能同选择。*/
                        throw new Exception("您不能选择[" + map.GetAttrByKey(this.DDL_Key.SelectedItemStringVal).Desc + "]做为分类条件。这样不符合业务逻辑,因为它与[" + map.GetAttrByKey(this.ContrastKey).Desc + "]之间有隶属关系。");
                    }
                }

                if (this.ToolBar1.IsExitsContral("DDL_" + this.ContrastKey))
                {
                    /*如果在查询条件里面有,就自动设置它为全部的查询条件,因为比较对象的明细已经确定了。*/
                    if (this.ContrastKey == "FK_Dept")
                    {
                        /* 设置为最大的查询条件 */
                        this.ToolBar1.GetDDLByKey("DDL_FK_Dept").SelectedIndex = 0;
                    }
                    else
                    {
                        this.ToolBar1.GetDDLByKey("DDL_" + this.ContrastKey).SetSelectItem("all");
                    }
                }

                //if (this.ToolBar1.IsExitsContral("DDL_" + this.DDL_GroupField.SelectedItemStringVal))
                //{
                //    /*如果在查询条件里面有。*/
                //    this.ToolBar1.GetDDLByKey("DDL_" + this.DDL_GroupField.SelectedItemStringVal).SetSelectItem("all");
                //}
            }
            catch (Exception ex)
            {
                this.UCSys1.AddMsgOfWarning("在检查对比条件时间出现如下问题:", ex.Message);
                return;
            }
            #endregion

            this.Label2.Text = this.ContrastLab + "1";
            this.Label3.Text = this.ContrastLab + "2";

            try
            {
                Attrs attrs = new Attrs();
                attrs.Add(map.GetAttrByKey(this.DDL_Key.SelectedItemStringVal));

                Entities ens = this.HisEns;
                //  QueryObject qo = this.ToolBar1.InitTableByEnsV2(ens, ens.GetNewEntity, 10000, 1);

                QueryObject qo = new QueryObject();
                //= this.ToolBar1.InitQueryObjectByEns(ens,
                //  map.IsShowSearchKey,map.DTSearchWay, map.DTSearchKey, map.Attrs, map.AttrsOfSearch, map.AttrsOfSearch);

                Attr attr = new Attr();
                attr = map.GetAttrByKey(this.DDL_GroupField.SelectedItemStringVal);
                qo.addAnd();
                if (this.ContrastKey == "FK_Dept")
                {
                    qo.AddWhereDept(this.DDL_M1.SelectedItemStringVal);
                }
                else
                {
                    qo.AddWhere(this.ContrastKey, this.DDL_M1.SelectedItemStringVal);
                }

                //第1个时间段
                DataTable dt1 = qo.DoGroupReturnTable(this.HisEn, attrs, attr, (GroupWay)this.DDL_GroupWay.SelectedItemIntVal, (OrderWay)this.DDL_OrderWay.SelectedItemIntVal);

                //第2个时间段
                Attrs attrs2 = new Attrs();
                attrs2.Add(map.GetAttrByKey(this.DDL_Key.SelectedItemStringVal));

                Entities ens2 = this.HisEns;
                //QueryObject qo2 = this.ToolBar1.InitTableByEnsV2(ens2, ens2.GetNewEntity, 10000, 1);
                QueryObject qo2 = new QueryObject();

                //qo2.addAnd();

                if (this.ContrastKey == "FK_Dept")
                {
                    qo2.AddWhereDept(this.DDL_M2.SelectedItemStringVal);
                }
                else
                {
                    qo2.AddWhere(this.ContrastKey, this.DDL_M2.SelectedItemStringVal);
                }

                DataTable dt2 = qo2.DoGroupReturnTable(this.HisEn, attrs2, attr, (GroupWay)this.DDL_GroupWay.SelectedItemIntVal, (OrderWay)this.DDL_OrderWay.SelectedItemIntVal);


                #region 生成要url条件
                string url = "ContrastDtl.aspx?EnsName=" + this.EnsName;
                //Map map = ens.GetNewEntity;
                foreach (Attr attrS in map.SearchAttrs)
                {
                    if (attrS.MyFieldType == FieldType.RefText)
                    {
                        continue;
                    }

                    if (this.ContrastKey == attrS.Key)
                    {
                        continue;
                    }

                    string s = this.ToolBar1.GetDDLByKey("DDL_" + attrS.Key).SelectedItemStringVal;
                    if (s == "all")
                    {
                        continue;
                    }

                    //ToolbarDDL ddl = (ToolbarDDL)ctl;
                    url += "&" + attrS.Key + "=" + s;
                }
                #endregion


                this.SaveState();
                this.Bind(dt1, dt2, url);
            }
            catch (Exception ex)
            {
                this.ResponseWriteRedMsg(ex);
            }
        }
Example #9
0
        public void DataPanelDtl(Entities ens, string ctrlId)
        {
            //   this.Controls.Clear();
            Entity  myen   = ens.GetNewEntity;
            string  pk     = myen.PK;
            string  clName = myen.ToString();
            Attrs   attrs  = myen.EnMap.Attrs;
            MapData md     = new MapData(this.EnsName);

            #region 求出可显示的属性。
            Attrs    selectedAttrs = new Attrs();
            string   attrKeyShow   = md.AttrsInTable;
            string[] strs          = md.AttrsInTable.Split('@');
            foreach (string str in strs)
            {
                if (str == null || str == "")
                {
                    continue;
                }

                string[] kv = str.Split('=');
                if (kv[0] == "MyNum")
                {
                    continue;
                }

                selectedAttrs.Add(myen.EnMap.GetAttrByKey(kv[0]));
            }
            #endregion 求出可显示的属性.

            this.Pub1.AddTable();
            this.Pub1.AddCaptionLeft(myen.EnMap.EnDesc + " 记录:" + ens.Count + "条");
            this.Pub1.AddTR();
            this.Pub1.AddTDTitle("序");
            this.Pub1.AddTDTitle("标题");
            foreach (Attr attrT in selectedAttrs)
            {
                if (attrT.UIVisible == false)
                {
                    continue;
                }

                if (attrT.Key == "MyNum")
                {
                    continue;
                }
                this.Pub1.AddTDTitle(attrT.Desc);
            }

            bool isRefFunc = false;
            isRefFunc = true;
            int pageidx = this.PageIdx - 1;
            int idx     = BP.SystemConfig.PageSize * pageidx;
            this.Pub1.AddTREnd();
            string style = WebUser.Style;
            foreach (Entity en in ens)
            {
                this.Pub1.AddTR();
                idx++;
                this.Pub1.AddTDIdx(idx);
                this.Pub1.Add("<TD class='TD'><a href=\"javascript:WinOpen('../WorkOpt/OneWork/Track.aspx?FK_Flow=" + this.FK_Flow + "&WorkID=" + en.GetValStrByKey("OID") + "');\" ><img src='../Img/Track.png' border=0 />" + en.GetValStrByKey("Title") + "</a></TD>");
                foreach (Attr attr in selectedAttrs)
                {
                    if (attr.UIVisible == false || attr.Key == "Title" || attr.Key == "MyNum")
                    {
                        continue;
                    }
                    if (attr.UIContralType == UIContralType.DDL)
                    {
                        if (attr.UIBindKey == "BP.Pub.NYs")
                        {
                            this.Pub1.AddTD(en.GetValStrByKey(attr.Key));
                        }
                        else
                        {
                            this.Pub1.AddTD(en.GetValRefTextByKey(attr.Key));
                        }
                        continue;
                    }

                    if (attr.UIHeight != 0)
                    {
                        this.Pub1.AddTDDoc("...", "...");
                        continue;
                    }

                    string str = en.GetValStrByKey(attr.Key);
                    switch (attr.MyDataType)
                    {
                    case DataType.AppDate:
                    case DataType.AppDateTime:
                        if (str == "" || str == null)
                        {
                            str = "&nbsp;";
                        }
                        this.Pub1.AddTD(str);
                        break;

                    case DataType.AppString:
                        if (str == "" || str == null)
                        {
                            str = "&nbsp;";
                        }
                        if (attr.UIHeight != 0)
                        {
                            this.Pub1.AddTDDoc(str, str);
                        }
                        else
                        {
                            this.Pub1.AddTD(str);
                        }
                        break;

                    case DataType.AppBoolean:
                        if (str == "1")
                        {
                            this.Pub1.AddTD("是");
                        }
                        else
                        {
                            this.Pub1.AddTD("否");
                        }
                        break;

                    case DataType.AppFloat:
                    case DataType.AppInt:
                    case DataType.AppRate:
                    case DataType.AppDouble:
                        this.Pub1.AddTDNum(str);
                        break;

                    case DataType.AppMoney:
                        this.Pub1.AddTDNum(decimal.Parse(str).ToString("0.00"));
                        break;

                    default:
                        throw new Exception("no this case ...");
                    }
                }
                this.Pub1.AddTREnd();
            }
            #region  求合计代码写在这里。

            bool IsHJ = false;
            foreach (Attr attr in selectedAttrs)
            {
                if (attr.MyFieldType == FieldType.RefText || attr.UIContralType == UIContralType.DDL)
                {
                    continue;
                }
                if (attr.Key == "OID" || attr.Key == "FID" ||
                    attr.Key == "MID" || attr.Key.ToUpper() == "WORKID")
                {
                    continue;
                }
                switch (attr.MyDataType)
                {
                case DataType.AppDouble:
                case DataType.AppFloat:
                case DataType.AppInt:
                case DataType.AppMoney:
                    IsHJ = true;
                    break;

                default:
                    break;
                }
            }
            if (IsHJ)
            {
                // 找出配置是不显示合计的列。
                this.Pub1.Add("<TR class='TRSum'>");
                this.Pub1.AddTD("class=Sum", "合计");
                this.Pub1.AddTD("class=Sum", "");
                foreach (Attr attr in selectedAttrs)
                {
                    if (attr.MyFieldType == FieldType.RefText ||
                        attr.UIVisible == false ||
                        attr.Key == "MyNum")
                    {
                        continue;
                    }

                    if (attr.MyDataType == DataType.AppBoolean)
                    {
                        this.Pub1.AddTD("class=Sum", "");
                        continue;
                    }

                    if (attr.UIContralType == UIContralType.DDL)
                    {
                        this.Pub1.AddTD("class=Sum", "");
                        continue;
                    }

                    if (attr.Key == "OID" || attr.Key == "FID" ||
                        attr.Key == "MID" || attr.Key.ToUpper() == "WORKID")
                    {
                        this.Pub1.AddTD("class=Sum", "");
                        continue;
                    }

                    switch (attr.MyDataType)
                    {
                    case DataType.AppDouble:
                        this.Pub1.AddTDNum(ens.GetSumDecimalByKey(attr.Key));
                        break;

                    case DataType.AppFloat:
                        this.Pub1.AddTDNum(ens.GetSumDecimalByKey(attr.Key));
                        break;

                    case DataType.AppInt:
                        this.Pub1.AddTDNum(ens.GetSumDecimalByKey(attr.Key));
                        break;

                    case DataType.AppMoney:
                        this.Pub1.AddTDJE(ens.GetSumDecimalByKey(attr.Key));
                        break;

                    default:
                        this.Pub1.AddTD("class=Sum", "");
                        break;
                    }
                }
                this.Pub1.AddTREnd();
            }
            #endregion

            this.Pub1.AddTableEnd();
        }
Example #10
0
 /// <summary>
 /// 增加一个纬度属性。
 /// </summary>
 /// <param name="attrKey">属性</param>
 public void AddDAttrByKey(string attrKey)
 {
     DAttrs.Add(this.HisEn.EnMap.GetAttrByKey(attrKey), false, false);
 }
Example #11
0
 public Geom AddAttr(Attr attr)
 {
     Attrs.Add(attr);
     return(this);
 }
Example #12
0
        protected string ExportDGToExcel(System.Data.DataTable dt, Entity en, string title)
        {
            string filename = title + "_" + BP.DA.DataType.CurrentDataCNOfLong + "_" + WebUser.Name + ".xls";//"Ep" + this.Session.SessionID + ".xls";
            string file     = filename;
            bool   flag     = true;
            string filepath = BP.Sys.SystemConfig.PathOfTemp;

            #region 参数及变量设置
            //			//参数校验
            //			if (dg == null || dg.Items.Count <=0 || filename == null || filename == "" || filepath == null || filepath == "")
            //				return null;

            //如果导出目录没有建立,则建立.
            if (Directory.Exists(filepath) == false)
            {
                Directory.CreateDirectory(filepath);
            }

            filename = filepath + filename;

            if (File.Exists(filename))
            {
                File.Delete(filename);
            }

            FileStream   objFileStream   = new FileStream(filename, FileMode.OpenOrCreate, FileAccess.Write);
            StreamWriter objStreamWriter = new StreamWriter(objFileStream, System.Text.Encoding.Unicode);
            #endregion

            #region 生成导出文件
            try
            {
                Attrs           attrs         = en.EnMap.Attrs;
                Attrs           selectedAttrs = null;
                BP.Sys.UIConfig cfg           = new UIConfig(en);

                if (cfg.ShowColumns.Length == 0)
                {
                    selectedAttrs = attrs;
                }
                else
                {
                    selectedAttrs = new Attrs();

                    foreach (Attr attr in attrs)
                    {
                        bool contain = false;

                        foreach (string col in cfg.ShowColumns)
                        {
                            if (col == attr.Key)
                            {
                                contain = true;
                                break;
                            }
                        }

                        if (contain)
                        {
                            selectedAttrs.Add(attr);
                        }
                    }
                }

                objStreamWriter.WriteLine();
                objStreamWriter.WriteLine(Convert.ToChar(9) + title + Convert.ToChar(9));
                objStreamWriter.WriteLine();
                string strLine = "";

                //生成文件标题
                foreach (Attr attrT in selectedAttrs)
                {
                    if (attrT.UIVisible == false)
                    {
                        continue;
                    }

                    if (attrT.Key == "MyNum")
                    {
                        continue;
                    }

                    strLine = strLine + attrT.Desc + Convert.ToChar(9);
                }

                objStreamWriter.WriteLine(strLine);
                strLine = "";

                foreach (DataRow dr in dt.Rows)
                {
                    foreach (Attr attr in selectedAttrs)
                    {
                        if (attr.UIVisible == false)
                        {
                            continue;
                        }

                        if (attr.Key == "MyNum")
                        {
                            continue;
                        }

                        if (attr.MyDataType == DataType.AppBoolean)
                        {
                            strLine = strLine + (dr[attr.Key].Equals(1) ? "是" : "否") + Convert.ToChar(9);
                        }
                        else
                        {
                            strLine = strLine + dr[attr.IsFKorEnum ? (attr.Key + "Text") : attr.Key] + Convert.ToChar(9);
                        }
                    }

                    objStreamWriter.WriteLine(strLine);
                    strLine = "";
                }


                objStreamWriter.WriteLine();
                objStreamWriter.WriteLine(Convert.ToChar(9) + " 制表人:" + Convert.ToChar(9) + WebUser.Name + Convert.ToChar(9) + "日期:" + Convert.ToChar(9) + DateTime.Now.ToShortDateString());
            }
            catch
            {
                flag = false;
            }
            finally
            {
                objStreamWriter.Close();
                objFileStream.Close();
            }
            #endregion

            #region  除掉旧的文件
            //DelExportedTempFile(filepath);
            #endregion

            if (flag)
            {
                this.WinOpen("/DataUser/Temp/" + file);
                //this.Write_Javascript(" window.open('"+ Request.ApplicationPath + @"/Report/Exported/" + filename +"'); " );
                //this.Write_Javascript(" window.open('"+Request.ApplicationPath+"/Temp/" + file +"'); " );
            }

            return(file);
        }
Example #13
0
 public void AddFKSearchAttrs(string fk)
 {
     HisFKSearchAttrs.Add(this.HisEn.EnMap.GetAttrByKey(fk), false, false);
 }
Example #14
0
 /// <summary>
 /// 增加
 /// </summary>
 /// <param name="attrKey">属性</param>
 public void AddAttrOfD1ByKey(string attrKey)
 {
     AttrsOfD1.Add(this.HisEn.EnMap.GetAttrByKey(attrKey), false, false);
 }
Example #15
0
        public void BindEns(Entities ens, string ctrlId)
        {
            MapData md = new MapData(this.EnsName);

            this.Title = md.Name + " - 流程通用查询";

            this.UCSys1.Controls.Clear();
            Entity myen   = ens.GetNewEntity;
            string pk     = myen.PK;
            string clName = myen.ToString();
            Attrs  attrs  = myen.EnMap.Attrs;

            #region 求出可显示的属性。
            Attrs    selectedAttrs = new Attrs();
            string   attrKeyShow   = md.AttrsInTable;
            string[] strs          = md.AttrsInTable.Split('@');
            foreach (string str in strs)
            {
                if (str == null || str == "")
                {
                    continue;
                }

                string[] kv = str.Split('=');
                if (kv[0] == "MyNum")
                {
                    continue;
                }
                selectedAttrs.Add(myen.EnMap.GetAttrByKey(kv[0]));
            }
            #endregion 求出可显示的属性.

            #region  生成标题
            this.UCSys1.AddTable();
            this.UCSys1.AddTR();
            this.UCSys1.AddTDTitle("序");
            this.UCSys1.AddTDTitle("标题");
            foreach (Attr attr in selectedAttrs)
            {
                if (attr.IsRefAttr || attr.Key == "Title")
                {
                    continue;
                }
                this.UCSys1.AddTDTitle(attr.Desc);
            }
            #endregion  生成标题

            bool isRefFunc = false;
            isRefFunc = true;
            int  pageidx = this.PageIdx - 1;
            int  idx     = SystemConfig.PageSize * pageidx;
            bool is1     = false;

            #region 用户界面属性设置
            string focusField = "Title";
            int    WinCardH   = 500;
            int    WinCardW   = 400;
            #endregion 用户界面属性设置

            #region 数据输出.
            this.UCSys1.AddTREnd();
            string urlExt = "";
            foreach (Entity en in ens)
            {
                #region 处理keys
                string style = WebUser.Style;
                string url   = this.GenerEnUrl(en, attrs);
                #endregion

                this.UCSys1.AddTR();

                #region 输出字段。
                idx++;
                this.UCSys1.AddTDIdx(idx);
                this.UCSys1.AddTD("<a href=\"javascript:WinOpen('./../WFRpt.aspx?FK_Flow=" + this.FK_Flow + "&WorkID=" + en.GetValStrByKey("OID") + "&FID=" + en.GetValStrByKey("FID") + "','tdr');\" ><img src='../Img/Track.png' border=0 />" + en.GetValByKey("Title") + "</a>");
                string val = "";
                foreach (Attr attr in selectedAttrs)
                {
                    if (attr.IsRefAttr || attr.Key == "MyNum" || attr.Key == "Title")
                    {
                        continue;
                    }

                    if (attr.UIContralType == UIContralType.DDL)
                    {
                        string s = en.GetValRefTextByKey(attr.Key);
                        if (s == null || s == "")
                        {
                            switch (attr.Key)
                            {
                            case "FK_NY":
                                s = en.GetValStringByKey(attr.Key);
                                break;

                            default:
                                break;
                            }
                        }
                        this.UCSys1.AddTD(s);
                        continue;
                    }

                    if (attr.UIHeight != 0)
                    {
                        this.UCSys1.AddTDDoc("...", "...");
                        return;
                    }

                    string str = en.GetValStrByKey(attr.Key);
                    if (focusField == attr.Key)
                    {
                        //str = "<b><font color='blue' ><a href=" + urlExt + ">" + str + "</font></b></a>";
                        str = "<b><font color='blue' >" + str + "</font></a>";
                    }
                    switch (attr.MyDataType)
                    {
                    case DataType.AppDate:
                    case DataType.AppDateTime:
                        if (str == "" || str == null)
                        {
                            str = "&nbsp;";
                        }
                        this.UCSys1.AddTD(str);
                        break;

                    case DataType.AppString:
                        if (str == "" || str == null)
                        {
                            str = "&nbsp;";
                        }

                        if (attr.UIHeight != 0)
                        {
                            this.UCSys1.AddTDDoc(str, str);
                        }
                        else
                        {
                            this.UCSys1.AddTD(str);
                        }
                        break;

                    case DataType.AppBoolean:
                        if (str == "1")
                        {
                            this.UCSys1.AddTD("是");
                        }
                        else
                        {
                            this.UCSys1.AddTD("否");
                        }
                        break;

                    case DataType.AppFloat:
                    case DataType.AppInt:
                    case DataType.AppRate:
                    case DataType.AppDouble:
                        this.UCSys1.AddTDNum(str);
                        break;

                    case DataType.AppMoney:
                        this.UCSys1.AddTDNum(decimal.Parse(str).ToString("0.00"));
                        break;

                    default:
                        throw new Exception("no this case ...");
                    }
                }
                #endregion 输出字段。


                this.UCSys1.AddTREnd();
            }
            #endregion 数据输出.

            #region  求合计代码写在这里。
            bool IsHJ = false;
            foreach (Attr attr in selectedAttrs)
            {
                if (attr.MyFieldType == FieldType.RefText || attr.Key == "Title")
                {
                    continue;
                }

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

                if (attr.Key == "OID" ||
                    attr.Key == "MID" ||
                    attr.Key == "FID" ||
                    attr.Key.ToUpper() == "WORKID")
                {
                    continue;
                }

                switch (attr.MyDataType)
                {
                case DataType.AppDouble:
                case DataType.AppFloat:
                case DataType.AppInt:
                case DataType.AppMoney:
                    IsHJ = true;
                    break;

                default:
                    break;
                }
            }

            if (IsHJ)
            {
                this.UCSys1.Add("<TR class='Sum' >");
                this.UCSys1.AddTD("合计");
                this.UCSys1.AddTD();
                foreach (Attr attr in selectedAttrs)
                {
                    if (attr.Key == "MyNum")
                    {
                        continue;
                    }

                    if (attr.UIContralType == UIContralType.DDL)
                    {
                        this.UCSys1.AddTD();
                        continue;
                    }

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

                    if (attr.Key == "OID" || attr.Key == "MID" || attr.Key.ToUpper() == "WORKID" || attr.Key == "FID")
                    {
                        this.UCSys1.AddTD();
                        continue;
                    }

                    switch (attr.MyDataType)
                    {
                    case DataType.AppDouble:
                        this.UCSys1.AddTDNum(ens.GetSumDecimalByKey(attr.Key));
                        break;

                    case DataType.AppFloat:
                        this.UCSys1.AddTDNum(ens.GetSumDecimalByKey(attr.Key));
                        break;

                    case DataType.AppInt:
                        this.UCSys1.AddTDNum(ens.GetSumDecimalByKey(attr.Key));
                        break;

                    case DataType.AppMoney:
                        this.UCSys1.AddTDJE(ens.GetSumDecimalByKey(attr.Key));
                        break;

                    default:
                        this.UCSys1.AddTD();
                        break;
                    }
                } /*结束循环*/
                this.UCSys1.AddTREnd();
            }
            #endregion

            this.UCSys1.AddTableEnd();
        }