Example #1
0
        public void LoadFromString(string xml)
        {
            if (string.IsNullOrEmpty(xml))
            {
                return;
            }
            try
            {
                LevelExpandSchemaDoc  doc = new LevelExpandSchemaDoc();
                LevelExpandSchemaType xmlLevelExpandSchema = new LevelExpandSchemaType(doc.LoadFromString(xml));

                int count = xmlLevelExpandSchema.GetDesignTimeExpandItems().GetLevelExpandItemCount();
                for (int i = 0; i < count; i++)
                {
                    LevelExpandItem lei = new LevelExpandItem();
                    lei.ColumnName = xmlLevelExpandSchema.GetDesignTimeExpandItems().GetLevelExpandItemAt(i).ColumnName.Value;
                    lei.Depth      = (int)xmlLevelExpandSchema.GetDesignTimeExpandItems().GetLevelExpandItemAt(i).Depth.Value;
                    lei.ExpandType = (LevelExpandEnum)xmlLevelExpandSchema.GetDesignTimeExpandItems().GetLevelExpandItemAt(i).LevelExpandType.Value;
                    this._designTimeLevelExpandItems.Add(lei);
                }

                count = xmlLevelExpandSchema.GetReportLevelExpands().GetReportLevelExpandCount();
                for (int i = 0; i < count; i++)
                {
                    ReportLevelExpand     rle = new ReportLevelExpand();
                    ReportLevelExpandType xmlReportLevelExpand = xmlLevelExpandSchema.GetReportLevelExpands().GetReportLevelExpandAt(i);

                    rle.IsDefault = xmlReportLevelExpand.IsDefault.Value;
                    rle.Name      = xmlReportLevelExpand.Name.Value;

                    int itemCount = xmlReportLevelExpand.GetLevelExpandItemCount();
                    for (int j = 0; j < itemCount; j++)
                    {
                        LevelExpandItem lei = new LevelExpandItem();
                        lei.ColumnName = xmlReportLevelExpand.GetLevelExpandItemAt(j).ColumnName.Value;
                        lei.Depth      = (int)xmlReportLevelExpand.GetLevelExpandItemAt(j).Depth.Value;
                        lei.ExpandType = (LevelExpandEnum)xmlReportLevelExpand.GetLevelExpandItemAt(j).LevelExpandType.Value;

                        rle.AddLevelExpand(lei);
                    }

                    this._reportLevelExpands.Add(rle);
                }
            }
            catch (Exception e)
            {
                System.Diagnostics.Trace.Write(e.Message);
            }
        }
Example #2
0
 public void Dispose()
 {
     if (_currentReportLevelExpand != null)
     {
         _currentReportLevelExpand = null;
     }
     if (_reportLevelExpands != null)
     {
         _reportLevelExpands.Clear();
         _reportLevelExpands = null;
     }
     if (_designTimeLevelExpandItems != null)
     {
         _designTimeLevelExpandItems.Clear();
         _designTimeLevelExpandItems = null;
     }
 }
Example #3
0
 public void AddReportLevelExpand(ReportLevelExpand item)
 {
     this._reportLevelExpands.Add(item);
 }
 public RuntimeLevelExpandSrv(ReportLevelExpand levelexpand, DataHelper datahelper)
 {
     _levelexpand = levelexpand;
     _datahelper  = datahelper;
 }
Example #5
0
 public bool Contains(ReportLevelExpand item)
 {
     return(this.List.Contains(item));
 }
Example #6
0
 public void Add(ReportLevelExpand item)
 {
     this.List.Add(item);
 }