Пример #1
0
 /// <summary>
 /// 增加样式
 /// </summary>
 /// <param name="NewStyle">样式</param>
 public void Append(ColStyle NewStyle)
 {
     if (NewStyle.Name != null)
     {
         NewStyle.Group = this;
         string Key = NewStyle.Name.ToLower();
         if (!this.myHashtable.ContainsKey(Key))
         {
             this.myHashtable.Add(Key, NewStyle);
             this.mySortList.Add(MaxId++, Key);
         }
     }
 }
Пример #2
0
        /// <summary>
        /// 根据列名字获得参数
        /// </summary>
        public DataParameter this[string ColName]
        {
            get
            {
                if (ColName == null || ColName == "")
                {
                    return(null);
                }
                ColName = ColName.ToLower().Trim('@');
                object result = this.myHashtable[ColName];
                if (result == null)
                {
                    if (this.ParentReport is ReportCell)
                    {
                        ReportCell myReportCell = this.ParentReport as ReportCell;
                        if (myReportCell.ColStyle.IsContainsKey(ColName))
                        {
                            ColStyle item = myReportCell.ColStyle[ColName];
                            this.Append(ColName, null, item.DbType);
                        }
                    }
                    else if (this.ParentReport is ReportDetail)                         // 如果是细节屏
                    {
//						ReportDetail myReportDetail = this.ParentReport as ReportDetail;
//						if(myReportDetail.Fields.IsContainsKey(ColName))
//						{
//							FieldAttrib item = myReportDetail.Fields[ColName];
//							this.Append(ColName, item.v
//						}
                    }
                    result = this.myHashtable[ColName];
                }

                return(result as DataParameter);
            }
        }