internal void FromDateTimeItem(DateTimeItem dti)
        {
            this.SetAllNull();

            if (dti.Val != null) this.Val = dti.Val.Value;
            if (dti.Unused != null) this.Unused = dti.Unused.Value;
            if (dti.Calculated != null) this.Calculated = dti.Calculated.Value;
            if (dti.Caption != null) this.Caption = dti.Caption.Value;
            if (dti.PropertyCount != null) this.PropertyCount = dti.PropertyCount.Value;

            MemberPropertyIndex mpi;
            using (OpenXmlReader oxr = OpenXmlReader.Create(dti))
            {
                while (oxr.Read())
                {
                    if (oxr.ElementType == typeof(MemberPropertyIndex))
                    {
                        // 0 is the default value.
                        mpi = (MemberPropertyIndex)oxr.LoadCurrentElement();
                        if (mpi.Val != null) this.MemberPropertyIndexes.Add(mpi.Val.Value);
                        else this.MemberPropertyIndexes.Add(0);
                    }
                }
            }
        }
        public ActionResult DeleteConfirmed(Guid id)
        {
            DateTimeItem dateTimeItem = db.DateTimeItems.Find(id);

            db.DateTimeItems.Remove(dateTimeItem);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
        internal override void UpdateDataItem(LoopingListDataItem dataItem, LoopingListItem visualItem)
        {
            DateTimeItem item = dataItem as DateTimeItem;
            DateTime     date = this.GetDateTimeAt(visualItem.LogicalIndex);

            item.Update(date);

            base.UpdateDataItem(dataItem, visualItem);
        }
        // Returns the previous sibling element in the raw hierarchy.
        // Peripheral controls have always negative values.
        // Returns null is no previous
        internal override ProxySimple GetPreviousSibling(ProxySimple child)
        {
            DateTimeItem item = (DateTimeItem)child._item;

            if (item == DateTimeItem.Calendar)
            {
                return(new DateTimeButton(_hwnd, this, (int)DateTimeItem.Button));
            }

            return(null);
        }
        // Returns the next sibling element in the raw hierarchy.
        // Peripheral controls have always negative values.
        // Returns null if no next child
        internal override ProxySimple GetNextSibling(ProxySimple child)
        {
            DateTimeItem item = (DateTimeItem)child._item;
            IntPtr       hwndCalendar;

            if (item == DateTimeItem.Button && IsCalendarPopupVisible(_hwnd, out hwndCalendar))
            {
                return(new WindowsCalendar(hwndCalendar, this, (int)DateTimeItem.Calendar));
            }

            return(null);
        }
        public ActionResult Edit(
            [Bind(Include = "Id,BeginDate,BeginTime,EndDate,EndTime,UnitDescription")] DateTimeItem dateTimeItem)
        {
            if (ModelState.IsValid)
            {
                db.Entry(dateTimeItem).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dateTimeItem));
        }
        public ActionResult Create(
            [Bind(Include = "Id,BeginDate,BeginTime,EndDate,EndTime,UnitDescription")] DateTimeItem dateTimeItem)
        {
            if (ModelState.IsValid)
            {
                dateTimeItem.Id = Guid.NewGuid();
                db.DateTimeItems.Add(dateTimeItem);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dateTimeItem));
        }
        // GET: Common/DateTimeItems/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            DateTimeItem dateTimeItem = db.DateTimeItems.Find(id);

            if (dateTimeItem == null)
            {
                return(HttpNotFound());
            }

            return(View(dateTimeItem));
        }
        internal void FromDateTimeItem(DateTimeItem dti)
        {
            SetAllNull();

            if (dti.Val != null)
            {
                Val = dti.Val.Value;
            }
            if (dti.Unused != null)
            {
                Unused = dti.Unused.Value;
            }
            if (dti.Calculated != null)
            {
                Calculated = dti.Calculated.Value;
            }
            if (dti.Caption != null)
            {
                Caption = dti.Caption.Value;
            }
            if (dti.PropertyCount != null)
            {
                PropertyCount = dti.PropertyCount.Value;
            }

            MemberPropertyIndex mpi;

            using (var oxr = OpenXmlReader.Create(dti))
            {
                while (oxr.Read())
                {
                    if (oxr.ElementType == typeof(MemberPropertyIndex))
                    {
                        // 0 is the default value.
                        mpi = (MemberPropertyIndex)oxr.LoadCurrentElement();
                        if (mpi.Val != null)
                        {
                            MemberPropertyIndexes.Add(mpi.Val.Value);
                        }
                        else
                        {
                            MemberPropertyIndexes.Add(0);
                        }
                    }
                }
            }
        }
Esempio n. 10
0
        internal DateTimeItem ToDateTimeItem()
        {
            DateTimeItem dti = new DateTimeItem();

            dti.Val = this.Val;
            if (this.Unused != null)
            {
                dti.Unused = this.Unused.Value;
            }
            if (this.Calculated != null)
            {
                dti.Calculated = this.Calculated.Value;
            }
            if (this.Caption != null && this.Caption.Length > 0)
            {
                dti.Caption = this.Caption;
            }
            if (this.PropertyCount != null)
            {
                dti.PropertyCount = this.PropertyCount.Value;
            }

            foreach (int i in this.MemberPropertyIndexes)
            {
                if (i != 0)
                {
                    dti.Append(new MemberPropertyIndex()
                    {
                        Val = i
                    });
                }
                else
                {
                    dti.Append(new MemberPropertyIndex());
                }
            }

            return(dti);
        }
        internal DateTimeItem ToDateTimeItem()
        {
            var dti = new DateTimeItem();

            dti.Val = Val;
            if (Unused != null)
            {
                dti.Unused = Unused.Value;
            }
            if (Calculated != null)
            {
                dti.Calculated = Calculated.Value;
            }
            if ((Caption != null) && (Caption.Length > 0))
            {
                dti.Caption = Caption;
            }
            if (PropertyCount != null)
            {
                dti.PropertyCount = PropertyCount.Value;
            }

            foreach (var i in MemberPropertyIndexes)
            {
                if (i != 0)
                {
                    dti.Append(new MemberPropertyIndex {
                        Val = i
                    });
                }
                else
                {
                    dti.Append(new MemberPropertyIndex());
                }
            }

            return(dti);
        }
Esempio n. 12
0
        internal DateTimeItem ToDateTimeItem()
        {
            DateTimeItem dti = new DateTimeItem();
            dti.Val = this.Val;
            if (this.Unused != null) dti.Unused = this.Unused.Value;
            if (this.Calculated != null) dti.Calculated = this.Calculated.Value;
            if (this.Caption != null && this.Caption.Length > 0) dti.Caption = this.Caption;
            if (this.PropertyCount != null) dti.PropertyCount = this.PropertyCount.Value;

            foreach (int i in this.MemberPropertyIndexes)
            {
                if (i != 0) dti.Append(new MemberPropertyIndex() { Val = i });
                else dti.Append(new MemberPropertyIndex());
            }

            return dti;
        }
Esempio n. 13
0
        // Generates content of pivotTableCacheRecordsPart2.
        private void GeneratePivotTableCacheRecordsPart2Content(PivotTableCacheRecordsPart pivotTableCacheRecordsPart2)
        {
            PivotCacheRecords pivotCacheRecords2 = new PivotCacheRecords(){ Count = (UInt32Value)5U };
            pivotCacheRecords2.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");

            PivotCacheRecord pivotCacheRecord5 = new PivotCacheRecord();
            FieldItem fieldItem26 = new FieldItem(){ Val = (UInt32Value)0U };
            FieldItem fieldItem27 = new FieldItem(){ Val = (UInt32Value)0U };
            NumberItem numberItem9 = new NumberItem(){ Val = 13D };
            NumberItem numberItem10 = new NumberItem(){ Val = 1287D };
            DateTimeItem dateTimeItem14 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-02T04:31:50Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            StringItem stringItem44 = new StringItem(){ Val = "sales staff H" };

            pivotCacheRecord5.Append(fieldItem26);
            pivotCacheRecord5.Append(fieldItem27);
            pivotCacheRecord5.Append(numberItem9);
            pivotCacheRecord5.Append(numberItem10);
            pivotCacheRecord5.Append(dateTimeItem14);
            pivotCacheRecord5.Append(stringItem44);

            PivotCacheRecord pivotCacheRecord6 = new PivotCacheRecord();
            FieldItem fieldItem28 = new FieldItem(){ Val = (UInt32Value)1U };
            FieldItem fieldItem29 = new FieldItem(){ Val = (UInt32Value)1U };
            NumberItem numberItem11 = new NumberItem(){ Val = 27D };
            NumberItem numberItem12 = new NumberItem(){ Val = 11529D };
            DateTimeItem dateTimeItem15 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-04T03:14:24Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            StringItem stringItem45 = new StringItem(){ Val = "sales staff I" };

            pivotCacheRecord6.Append(fieldItem28);
            pivotCacheRecord6.Append(fieldItem29);
            pivotCacheRecord6.Append(numberItem11);
            pivotCacheRecord6.Append(numberItem12);
            pivotCacheRecord6.Append(dateTimeItem15);
            pivotCacheRecord6.Append(stringItem45);

            PivotCacheRecord pivotCacheRecord7 = new PivotCacheRecord();
            FieldItem fieldItem30 = new FieldItem(){ Val = (UInt32Value)2U };
            FieldItem fieldItem31 = new FieldItem(){ Val = (UInt32Value)0U };
            NumberItem numberItem13 = new NumberItem(){ Val = 19D };
            NumberItem numberItem14 = new NumberItem(){ Val = 1881D };
            DateTimeItem dateTimeItem16 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-03T11:10:19Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            StringItem stringItem46 = new StringItem(){ Val = "sales staff J" };

            pivotCacheRecord7.Append(fieldItem30);
            pivotCacheRecord7.Append(fieldItem31);
            pivotCacheRecord7.Append(numberItem13);
            pivotCacheRecord7.Append(numberItem14);
            pivotCacheRecord7.Append(dateTimeItem16);
            pivotCacheRecord7.Append(stringItem46);

            PivotCacheRecord pivotCacheRecord8 = new PivotCacheRecord();
            FieldItem fieldItem32 = new FieldItem(){ Val = (UInt32Value)3U };
            FieldItem fieldItem33 = new FieldItem(){ Val = (UInt32Value)2U };
            NumberItem numberItem15 = new NumberItem(){ Val = 25D };
            NumberItem numberItem16 = new NumberItem(){ Val = 1250D };
            DateTimeItem dateTimeItem17 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-02T06:54:09Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            StringItem stringItem47 = new StringItem(){ Val = "sales staff B" };

            pivotCacheRecord8.Append(fieldItem32);
            pivotCacheRecord8.Append(fieldItem33);
            pivotCacheRecord8.Append(numberItem15);
            pivotCacheRecord8.Append(numberItem16);
            pivotCacheRecord8.Append(dateTimeItem17);
            pivotCacheRecord8.Append(stringItem47);

            PivotCacheRecord pivotCacheRecord9 = new PivotCacheRecord();
            FieldItem fieldItem34 = new FieldItem(){ Val = (UInt32Value)4U };
            FieldItem fieldItem35 = new FieldItem(){ Val = (UInt32Value)2U };
            NumberItem numberItem17 = new NumberItem(){ Val = 16D };
            NumberItem numberItem18 = new NumberItem(){ Val = 800D };
            DateTimeItem dateTimeItem18 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2003-01-01T04:01:28Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            StringItem stringItem48 = new StringItem(){ Val = "sales staff F" };

            pivotCacheRecord9.Append(fieldItem34);
            pivotCacheRecord9.Append(fieldItem35);
            pivotCacheRecord9.Append(numberItem17);
            pivotCacheRecord9.Append(numberItem18);
            pivotCacheRecord9.Append(dateTimeItem18);
            pivotCacheRecord9.Append(stringItem48);

            pivotCacheRecords2.Append(pivotCacheRecord5);
            pivotCacheRecords2.Append(pivotCacheRecord6);
            pivotCacheRecords2.Append(pivotCacheRecord7);
            pivotCacheRecords2.Append(pivotCacheRecord8);
            pivotCacheRecords2.Append(pivotCacheRecord9);

            pivotTableCacheRecordsPart2.PivotCacheRecords = pivotCacheRecords2;
        }
Esempio n. 14
0
        // Generates content of pivotTableCacheDefinitionPart2.
        private void GeneratePivotTableCacheDefinitionPart2Content(PivotTableCacheDefinitionPart pivotTableCacheDefinitionPart2)
        {
            PivotCacheDefinition pivotCacheDefinition3 = new PivotCacheDefinition(){ Id = "rId1", RefreshedBy = "Masaki Tamura (Pasona Tech)", RefreshedDate = 40946.730963773145D, CreatedVersion = 4, RefreshedVersion = 5, MinRefreshableVersion = 3, RecordCount = (UInt32Value)5U };
            pivotCacheDefinition3.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");

            CacheSource cacheSource2 = new CacheSource(){ Type = SourceValues.Worksheet };
            WorksheetSource worksheetSource2 = new WorksheetSource(){ Name = "DataTable2" };

            cacheSource2.Append(worksheetSource2);

            CacheFields cacheFields2 = new CacheFields(){ Count = (UInt32Value)6U };

            CacheField cacheField8 = new CacheField(){ Name = "Date", NumberFormatId = (UInt32Value)14U };

            SharedItems sharedItems7 = new SharedItems(){ ContainsSemiMixedTypes = false, ContainsNonDate = false, ContainsDate = true, ContainsString = false, MinDate = System.Xml.XmlConvert.ToDateTime("2000-01-01T13:54:32Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), MaxDate = System.Xml.XmlConvert.ToDateTime("2002-12-30T22:26:24Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), Count = (UInt32Value)5U };
            DateTimeItem dateTimeItem9 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-01T13:54:32Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            DateTimeItem dateTimeItem10 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-01T15:32:03Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            DateTimeItem dateTimeItem11 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-01T16:56:19Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            DateTimeItem dateTimeItem12 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-01T18:04:48Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            DateTimeItem dateTimeItem13 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2002-12-30T22:26:24Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };

            sharedItems7.Append(dateTimeItem9);
            sharedItems7.Append(dateTimeItem10);
            sharedItems7.Append(dateTimeItem11);
            sharedItems7.Append(dateTimeItem12);
            sharedItems7.Append(dateTimeItem13);

            cacheField8.Append(sharedItems7);

            CacheField cacheField9 = new CacheField(){ Name = "Product", NumberFormatId = (UInt32Value)0U };

            SharedItems sharedItems8 = new SharedItems(){ Count = (UInt32Value)10U };
            StringItem stringItem34 = new StringItem(){ Val = "product_F" };
            StringItem stringItem35 = new StringItem(){ Val = "product_G" };
            StringItem stringItem36 = new StringItem(){ Val = "product_C" };
            StringItem stringItem37 = new StringItem(){ Val = "product_E", Unused = true };
            StringItem stringItem38 = new StringItem(){ Val = "product_D", Unused = true };
            StringItem stringItem39 = new StringItem(){ Val = "product_B", Unused = true };
            StringItem stringItem40 = new StringItem(){ Val = "product_A", Unused = true };
            StringItem stringItem41 = new StringItem(){ Val = "product_J", Unused = true };
            StringItem stringItem42 = new StringItem(){ Val = "product_I", Unused = true };
            StringItem stringItem43 = new StringItem(){ Val = "product_H", Unused = true };

            sharedItems8.Append(stringItem34);
            sharedItems8.Append(stringItem35);
            sharedItems8.Append(stringItem36);
            sharedItems8.Append(stringItem37);
            sharedItems8.Append(stringItem38);
            sharedItems8.Append(stringItem39);
            sharedItems8.Append(stringItem40);
            sharedItems8.Append(stringItem41);
            sharedItems8.Append(stringItem42);
            sharedItems8.Append(stringItem43);

            cacheField9.Append(sharedItems8);

            CacheField cacheField10 = new CacheField(){ Name = "Quantity", NumberFormatId = (UInt32Value)0U };
            SharedItems sharedItems9 = new SharedItems(){ ContainsSemiMixedTypes = false, ContainsString = false, ContainsNumber = true, ContainsInteger = true, MinValue = 13D, MaxValue = 27D };

            cacheField10.Append(sharedItems9);

            CacheField cacheField11 = new CacheField(){ Name = "Price", NumberFormatId = (UInt32Value)0U };
            SharedItems sharedItems10 = new SharedItems(){ ContainsSemiMixedTypes = false, ContainsString = false, ContainsNumber = true, ContainsInteger = true, MinValue = 800D, MaxValue = 11529D };

            cacheField11.Append(sharedItems10);

            CacheField cacheField12 = new CacheField(){ Name = "DeliveryDate", NumberFormatId = (UInt32Value)14U };
            SharedItems sharedItems11 = new SharedItems(){ ContainsSemiMixedTypes = false, ContainsNonDate = false, ContainsDate = true, ContainsString = false, MinDate = System.Xml.XmlConvert.ToDateTime("2000-01-02T04:31:50Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), MaxDate = System.Xml.XmlConvert.ToDateTime("2003-01-01T04:01:28Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };

            cacheField12.Append(sharedItems11);

            CacheField cacheField13 = new CacheField(){ Name = "Employee", NumberFormatId = (UInt32Value)0U };
            SharedItems sharedItems12 = new SharedItems();

            cacheField13.Append(sharedItems12);

            cacheFields2.Append(cacheField8);
            cacheFields2.Append(cacheField9);
            cacheFields2.Append(cacheField10);
            cacheFields2.Append(cacheField11);
            cacheFields2.Append(cacheField12);
            cacheFields2.Append(cacheField13);

            PivotCacheDefinitionExtensionList pivotCacheDefinitionExtensionList2 = new PivotCacheDefinitionExtensionList();

            PivotCacheDefinitionExtension pivotCacheDefinitionExtension2 = new PivotCacheDefinitionExtension(){ Uri = "{725AE2AE-9491-48be-B2B4-4EB974FC3084}" };
            pivotCacheDefinitionExtension2.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
            X14.PivotCacheDefinition pivotCacheDefinition4 = new X14.PivotCacheDefinition(){ PivotCacheId = (UInt32Value)1U };

            pivotCacheDefinitionExtension2.Append(pivotCacheDefinition4);

            pivotCacheDefinitionExtensionList2.Append(pivotCacheDefinitionExtension2);

            pivotCacheDefinition3.Append(cacheSource2);
            pivotCacheDefinition3.Append(cacheFields2);
            pivotCacheDefinition3.Append(pivotCacheDefinitionExtensionList2);

            pivotTableCacheDefinitionPart2.PivotCacheDefinition = pivotCacheDefinition3;
        }
Esempio n. 15
0
        // Generates content of pivotTableCacheDefinitionPart1.
        private void GeneratePivotTableCacheDefinitionPart1Content(PivotTableCacheDefinitionPart pivotTableCacheDefinitionPart1)
        {
            PivotCacheDefinition pivotCacheDefinition1 = new PivotCacheDefinition(){ Id = "rId1", RefreshedBy = "Masaki Tamura (Pasona Tech)", RefreshedDate = 40946.731165509256D, CreatedVersion = 4, RefreshedVersion = 5, MinRefreshableVersion = 3, RecordCount = (UInt32Value)4U };
            pivotCacheDefinition1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");

            CacheSource cacheSource1 = new CacheSource(){ Type = SourceValues.Worksheet };
            WorksheetSource worksheetSource1 = new WorksheetSource(){ Name = "DataTable1" };

            cacheSource1.Append(worksheetSource1);

            CacheFields cacheFields1 = new CacheFields(){ Count = (UInt32Value)7U };

            CacheField cacheField1 = new CacheField(){ Name = "Date", NumberFormatId = (UInt32Value)14U };

            SharedItems sharedItems1 = new SharedItems(){ ContainsSemiMixedTypes = false, ContainsNonDate = false, ContainsDate = true, ContainsString = false, MinDate = System.Xml.XmlConvert.ToDateTime("2000-01-01T15:40:41Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), MaxDate = System.Xml.XmlConvert.ToDateTime("2002-12-30T20:50:43Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), Count = (UInt32Value)4U };
            DateTimeItem dateTimeItem1 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-01T15:40:41Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            DateTimeItem dateTimeItem2 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-02T03:35:07Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            DateTimeItem dateTimeItem3 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2002-12-30T06:43:15Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            DateTimeItem dateTimeItem4 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2002-12-30T20:50:43Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };

            sharedItems1.Append(dateTimeItem1);
            sharedItems1.Append(dateTimeItem2);
            sharedItems1.Append(dateTimeItem3);
            sharedItems1.Append(dateTimeItem4);

            FieldGroup fieldGroup1 = new FieldGroup(){ ParentId = (UInt32Value)6U, Base = (UInt32Value)0U };
            RangeProperties rangeProperties1 = new RangeProperties(){ GroupBy = GroupByValues.Months, StartDate = System.Xml.XmlConvert.ToDateTime("2000-01-01T15:40:41Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), EndDate = System.Xml.XmlConvert.ToDateTime("2002-12-30T20:50:43Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };

            GroupItems groupItems1 = new GroupItems(){ Count = (UInt32Value)14U };
            StringItem stringItem1 = new StringItem(){ Val = "<2000/01/01" };
            StringItem stringItem2 = new StringItem(){ Val = "1月" };
            StringItem stringItem3 = new StringItem(){ Val = "2月" };
            StringItem stringItem4 = new StringItem(){ Val = "3月" };
            StringItem stringItem5 = new StringItem(){ Val = "4月" };
            StringItem stringItem6 = new StringItem(){ Val = "5月" };
            StringItem stringItem7 = new StringItem(){ Val = "6月" };
            StringItem stringItem8 = new StringItem(){ Val = "7月" };
            StringItem stringItem9 = new StringItem(){ Val = "8月" };
            StringItem stringItem10 = new StringItem(){ Val = "9月" };
            StringItem stringItem11 = new StringItem(){ Val = "10月" };
            StringItem stringItem12 = new StringItem(){ Val = "11月" };
            StringItem stringItem13 = new StringItem(){ Val = "12月" };
            StringItem stringItem14 = new StringItem(){ Val = ">2002/12/30" };

            groupItems1.Append(stringItem1);
            groupItems1.Append(stringItem2);
            groupItems1.Append(stringItem3);
            groupItems1.Append(stringItem4);
            groupItems1.Append(stringItem5);
            groupItems1.Append(stringItem6);
            groupItems1.Append(stringItem7);
            groupItems1.Append(stringItem8);
            groupItems1.Append(stringItem9);
            groupItems1.Append(stringItem10);
            groupItems1.Append(stringItem11);
            groupItems1.Append(stringItem12);
            groupItems1.Append(stringItem13);
            groupItems1.Append(stringItem14);

            fieldGroup1.Append(rangeProperties1);
            fieldGroup1.Append(groupItems1);

            cacheField1.Append(sharedItems1);
            cacheField1.Append(fieldGroup1);

            CacheField cacheField2 = new CacheField(){ Name = "Product", NumberFormatId = (UInt32Value)0U };

            SharedItems sharedItems2 = new SharedItems(){ Count = (UInt32Value)10U };
            StringItem stringItem15 = new StringItem(){ Val = "product_A" };
            StringItem stringItem16 = new StringItem(){ Val = "product_D" };
            StringItem stringItem17 = new StringItem(){ Val = "product_E" };
            StringItem stringItem18 = new StringItem(){ Val = "product_C", Unused = true };
            StringItem stringItem19 = new StringItem(){ Val = "product_B", Unused = true };
            StringItem stringItem20 = new StringItem(){ Val = "product_J", Unused = true };
            StringItem stringItem21 = new StringItem(){ Val = "product_I", Unused = true };
            StringItem stringItem22 = new StringItem(){ Val = "product_H", Unused = true };
            StringItem stringItem23 = new StringItem(){ Val = "product_G", Unused = true };
            StringItem stringItem24 = new StringItem(){ Val = "product_F", Unused = true };

            sharedItems2.Append(stringItem15);
            sharedItems2.Append(stringItem16);
            sharedItems2.Append(stringItem17);
            sharedItems2.Append(stringItem18);
            sharedItems2.Append(stringItem19);
            sharedItems2.Append(stringItem20);
            sharedItems2.Append(stringItem21);
            sharedItems2.Append(stringItem22);
            sharedItems2.Append(stringItem23);
            sharedItems2.Append(stringItem24);

            cacheField2.Append(sharedItems2);

            CacheField cacheField3 = new CacheField(){ Name = "Quantity", NumberFormatId = (UInt32Value)0U };
            SharedItems sharedItems3 = new SharedItems(){ ContainsSemiMixedTypes = false, ContainsString = false, ContainsNumber = true, ContainsInteger = true, MinValue = 4D, MaxValue = 29D };

            cacheField3.Append(sharedItems3);

            CacheField cacheField4 = new CacheField(){ Name = "Price", NumberFormatId = (UInt32Value)0U };
            SharedItems sharedItems4 = new SharedItems(){ ContainsSemiMixedTypes = false, ContainsString = false, ContainsNumber = true, ContainsInteger = true, MinValue = 312D, MaxValue = 15990D };

            cacheField4.Append(sharedItems4);

            CacheField cacheField5 = new CacheField(){ Name = "DeliveryDate", NumberFormatId = (UInt32Value)14U };

            SharedItems sharedItems5 = new SharedItems(){ ContainsSemiMixedTypes = false, ContainsNonDate = false, ContainsDate = true, ContainsString = false, MinDate = System.Xml.XmlConvert.ToDateTime("2000-01-06T15:40:41Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), MaxDate = System.Xml.XmlConvert.ToDateTime("2003-01-03T06:43:15Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), Count = (UInt32Value)4U };
            DateTimeItem dateTimeItem5 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-06T15:40:41Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            DateTimeItem dateTimeItem6 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2000-01-07T03:35:07Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            DateTimeItem dateTimeItem7 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2003-01-03T06:43:15Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };
            DateTimeItem dateTimeItem8 = new DateTimeItem(){ Val = System.Xml.XmlConvert.ToDateTime("2002-12-31T20:50:43Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };

            sharedItems5.Append(dateTimeItem5);
            sharedItems5.Append(dateTimeItem6);
            sharedItems5.Append(dateTimeItem7);
            sharedItems5.Append(dateTimeItem8);

            cacheField5.Append(sharedItems5);

            CacheField cacheField6 = new CacheField(){ Name = "Employee", NumberFormatId = (UInt32Value)0U };
            SharedItems sharedItems6 = new SharedItems();

            cacheField6.Append(sharedItems6);

            CacheField cacheField7 = new CacheField(){ Name = "Years", NumberFormatId = (UInt32Value)0U, DatabaseField = false };

            FieldGroup fieldGroup2 = new FieldGroup(){ Base = (UInt32Value)0U };
            RangeProperties rangeProperties2 = new RangeProperties(){ GroupBy = GroupByValues.Years, StartDate = System.Xml.XmlConvert.ToDateTime("2000-01-01T15:40:41Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), EndDate = System.Xml.XmlConvert.ToDateTime("2002-12-30T20:50:43Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind) };

            GroupItems groupItems2 = new GroupItems(){ Count = (UInt32Value)5U };
            StringItem stringItem25 = new StringItem(){ Val = "<2000/01/01" };
            StringItem stringItem26 = new StringItem(){ Val = "2000年" };
            StringItem stringItem27 = new StringItem(){ Val = "2001年" };
            StringItem stringItem28 = new StringItem(){ Val = "2002年" };
            StringItem stringItem29 = new StringItem(){ Val = ">2002/12/30" };

            groupItems2.Append(stringItem25);
            groupItems2.Append(stringItem26);
            groupItems2.Append(stringItem27);
            groupItems2.Append(stringItem28);
            groupItems2.Append(stringItem29);

            fieldGroup2.Append(rangeProperties2);
            fieldGroup2.Append(groupItems2);

            cacheField7.Append(fieldGroup2);

            cacheFields1.Append(cacheField1);
            cacheFields1.Append(cacheField2);
            cacheFields1.Append(cacheField3);
            cacheFields1.Append(cacheField4);
            cacheFields1.Append(cacheField5);
            cacheFields1.Append(cacheField6);
            cacheFields1.Append(cacheField7);

            PivotCacheDefinitionExtensionList pivotCacheDefinitionExtensionList1 = new PivotCacheDefinitionExtensionList();

            PivotCacheDefinitionExtension pivotCacheDefinitionExtension1 = new PivotCacheDefinitionExtension(){ Uri = "{725AE2AE-9491-48be-B2B4-4EB974FC3084}" };
            pivotCacheDefinitionExtension1.AddNamespaceDeclaration("x14", "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
            X14.PivotCacheDefinition pivotCacheDefinition2 = new X14.PivotCacheDefinition(){ PivotCacheId = (UInt32Value)2U };

            pivotCacheDefinitionExtension1.Append(pivotCacheDefinition2);

            pivotCacheDefinitionExtensionList1.Append(pivotCacheDefinitionExtension1);

            pivotCacheDefinition1.Append(cacheSource1);
            pivotCacheDefinition1.Append(cacheFields1);
            pivotCacheDefinition1.Append(pivotCacheDefinitionExtensionList1);

            pivotTableCacheDefinitionPart1.PivotCacheDefinition = pivotCacheDefinition1;
        }