Esempio n. 1
0
        private ContentItem CreatePageBelow(ContentItem parentPage, int index)
        {
            var item = CreateOneItem <PersistableItem2>(0, "item" + index, parentPage);

            item.State = ContentState.Published;

            N2.Details.DetailCollection details = item.GetDetailCollection("DetailCollection", true);
            details.Add(true);
            details.Add(index * 1000 + 555);
            details.Add(index * 1000.0 + 555.55);
            details.Add("string in a collection " + index);
            details.Add(parentPage);
            details.Add(new DateTime(2009 + index, 1, 1));


            item.BoolPersistableProperty     = true;
            item.DateTimePersistableProperty = new DateTime(2010, 06, 18, 14, 30, 00);
            item.DoublePersistableProperty   = 555.555;
            item.IntPersistableProperty      = 555;
            item.LinkPersistableProperty     = rootItem;
            item.StringPersistableProperty   = "in table text";
            item.EnumPersistableProperty     = Base64FormattingOptions.InsertLineBreaks;

            engine.Persister.Save(item);
            return(item);
        }
Esempio n. 2
0
        private ContentItem CreatePageBelow(ContentItem parentPage, int index)
        {
            ContentItem item = CreateOneItem <PersistableItem2>(0, "item" + index, parentPage);

            N2.Details.DetailCollection details = item.GetDetailCollection("DetailCollection", true);
            details.Add(true);
            details.Add(index * 1000 + 555);
            details.Add(index * 1000.0 + 555.55);
            details.Add("string in a collection " + index);
            details.Add(parentPage);
            details.Add(new DateTime(2009 + index, 1, 1));

            engine.Persister.Save(item);
            return(item);
        }