コード例 #1
0
        public override string ToString()
        {
            string xml = string.Empty;

            try
            {
                LevelExpandSchemaDoc  doc = new LevelExpandSchemaDoc();
                LevelExpandSchemaType xmlLevelExpandSchema = new LevelExpandSchemaType();
                doc.SetRootElementName("", "LevelExpandSchema");

                DesignTimeExpandItemsType xmlDesignTimeExpandItems = new DesignTimeExpandItemsType();
                foreach (LevelExpandItem lei in this._designTimeLevelExpandItems)
                {
                    LevelExpandItemType xmlLevelExpandItem = new LevelExpandItemType();
                    xmlLevelExpandItem.AddDepth(new Altova.Types.SchemaLong(lei.Depth));
                    xmlLevelExpandItem.AddLevelExpandType(new Altova.Types.SchemaLong((long)lei.ExpandType));
                    xmlLevelExpandItem.AddColumnName(new Altova.Types.SchemaString(lei.ColumnName));
                    xmlDesignTimeExpandItems.AddLevelExpandItem(xmlLevelExpandItem);
                }
                xmlLevelExpandSchema.AddDesignTimeExpandItems(xmlDesignTimeExpandItems);

                ReportLevelExpandsType xmlReportLevelExpands = new ReportLevelExpandsType();
                foreach (ReportLevelExpand rle in this._reportLevelExpands)
                {
                    ReportLevelExpandType xmlReportLevelExpand = new ReportLevelExpandType();
                    xmlReportLevelExpand.AddIsDefault(new Altova.Types.SchemaBoolean(rle.IsDefault));
                    xmlReportLevelExpand.AddName(new Altova.Types.SchemaString(rle.Name));

                    foreach (LevelExpandItem lei in rle.LevelExpandItems)
                    {
                        LevelExpandItemType xmlLevelExpandItem = new LevelExpandItemType();

                        xmlLevelExpandItem.AddDepth(new Altova.Types.SchemaLong(lei.Depth));
                        xmlLevelExpandItem.AddLevelExpandType(new Altova.Types.SchemaLong((long)lei.ExpandType));
                        xmlLevelExpandItem.AddColumnName(new Altova.Types.SchemaString(lei.ColumnName));

                        xmlReportLevelExpand.AddLevelExpandItem(xmlLevelExpandItem);
                    }
                    xmlReportLevelExpands.AddReportLevelExpand(xmlReportLevelExpand);
                }
                xmlLevelExpandSchema.AddReportLevelExpands(xmlReportLevelExpands);
                xml = doc.SaveToString(xmlLevelExpandSchema);
            }
            catch (Exception e)
            {
                Trace.WriteLine(e.Message);
            }

            return(xml);
        }
コード例 #2
0
 public void ReplaceLevelExpandItemAt(LevelExpandItemType newValue, int index)
 {
     ReplaceDomElementAt("", "LevelExpandItem", index, newValue);
 }
コード例 #3
0
 public void InsertLevelExpandItemAt(LevelExpandItemType newValue, int index)
 {
     InsertDomElementAt("", "LevelExpandItem", index, newValue);
 }
コード例 #4
0
 public void AddLevelExpandItem(LevelExpandItemType newValue)
 {
     AppendDomElement("", "LevelExpandItem", newValue);
 }
コード例 #5
0
 public ColumnNameEnumerator(LevelExpandItemType par)
 {
     parent = par;
     nIndex = -1;
 }
コード例 #6
0
 public LevelExpandTypeEnumerator(LevelExpandItemType par)
 {
     parent = par;
     nIndex = -1;
 }