/// <summary> /// Add fields group to region. /// </summary> /// <param name="tableLayout">group layout type.</param> /// <returns>Returns new fields group in current region.</returns> public FieldGroup Fields(bool tableLayout) { var group = new FieldGroup(tableLayout); Region.Add(group); return(group); }
/// <summary> /// Adds the child group, to the parent node, only if the child group acutally contains fields. /// </summary> /// <param name="parentNode">The parent node.</param> /// <param name="childGroup">The child group.</param> private static void AddChildGroup(FieldGroup parentNode, FieldGroup childGroup) { if (childGroup.FieldList.Count > 0) { parentNode.FieldList.Add(childGroup); } }
public void FieldGroup_AddFieldGroup_HasNoFields() { var fieldGroup = new FieldGroup("id"); fieldGroup.AddFieldGroup(new FieldGroup("fieldGroup")); Assert.AreEqual(0, fieldGroup.Fields.Count); }
public FieldGroup(HtmlHelper htmlHelper) { this.htmlHelper = htmlHelper; htmlHelper.ViewContext.RequestContext.HttpContext.Response.Write(fieldGroupStart); Instance = this; }
public void FieldGroup_Constructor_FieldGroupHasId() { const string expectedId = "id"; var fieldGroup = new FieldGroup(expectedId); Assert.AreEqual(expectedId, fieldGroup.Id); }
public void ApplyChanges(FieldGroup fg, IBusinessLogicFacade bl) { var target = fg; var source = this; if (target.Name == null) { target.Slug = SlugGenerator.GenerateSlug(bl, source.Name, "fieldGroup"); } if (target.Name != null && !target.Name.Equals(source.Name)) { target.Slug = SlugGenerator.GenerateSlug(bl, source.Name, "fieldGroup"); } target.Name = source.Name; target.Fields = new List <Field>(); source.Fields.ForEach(i => { var f = bl.CreateField(); i.ApplyChanges(f, bl); target.Fields.Add(f); }); target.IsCountable = source.IsCountable; target.IsActive = source.IsActive; }
public string GetAccountExtractionConfiguration(HttpListenerContext ct, ActionInfo hi) { ExtractionConfiguration Ec = new ExtractionConfiguration(); Ec.DefaultDocumentSpecification = "Stuff"; Ec.OrientationDetectionMode = OrientationDetectionMode.Off; DocumentType dt = new DocumentType(); dt.Country = "SE"; dt.DisplayName = "PDF"; dt.ExtractionName = "Thefil.pdf"; FieldGroup Fg = new FieldGroup(); Fg.IsTableGroup = true; Fg.Name = "My Group"; Fg.Order = 23; dt.FieldGroups.Add(Fg); DocumentTypeField dtf = new DocumentTypeField(); dtf.FormatType = FormatType.RegularExpression; ExtractionType et = new ExtractionType(); dtf.ExtractionType = et; dt.Fields.Add(dtf); dt.InternalName = "hejsan"; dt.SystemName = "Thesystemname"; dt.IsSelected = true; Ec.SelectedDocumentTypes.Add(dt); return(GetResponseString <ExtractionConfiguration>(Ec, ct)); }
public void FieldGroup_AddField_HasNoFieldGroups() { var fieldGroup = new FieldGroup("id"); fieldGroup.AddField(new Field <int, IntConverter>("field")); Assert.AreEqual(0, fieldGroup.FieldGroups.Count); }
/// <summary> /// Add fields group. /// </summary> /// <param name="tableLayout">Group layout.</param> /// <returns>New group instance.</returns> public FieldGroup Fields(bool tableLayout) { var group = new FieldGroup(tableLayout); Type.AddMemberGroup(group); return(group); }
public void LoadConfigurableFields() { Fields = new ObservableCollection <IField>(); var serializer = new XmlSerializer(typeof(Page), ""); using (var reader = new StreamReader("Page.xml")) { var page = (Page)serializer.Deserialize(reader); reader.Close(); foreach (var field in page.Fields.Field) { Fields.Add(FieldBuilder.Build(field.id, field.type, field.Mask)); } foreach (var fieldGroup in page.Fields.FieldGroup) { var fg = new Model.FieldGroup(fieldGroup.id); foreach (var field in fieldGroup.Field) { fg.AddField(FieldBuilder.Build(field.id, field.type, field.Mask)); } FieldGroup.AddFieldGroup(fg); } } }
public FieldGroup CreateFieldGroup() { var fieldGroup = new FieldGroup(); _context.FieldGroups.Add(fieldGroup); return(fieldGroup); }
public void FieldGroup_AddFieldGroup_HasOneFieldGroup() { var fieldGroup = new FieldGroup("id"); fieldGroup.AddFieldGroup(new FieldGroup("fieldGroup")); Assert.AreEqual(1, fieldGroup.FieldGroups.Count); }
public async Task <ActionResult <FieldGroup> > PostFieldGroup(FieldGroup fieldGroup) { _context.FieldGroups.Add(fieldGroup); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFieldGroup", new { id = fieldGroup.Id }, fieldGroup)); }
public async Task <IActionResult> PutFieldGroup(int id, FieldGroup fieldGroup) { if (id != fieldGroup.Id) { return(BadRequest()); } _context.Entry(fieldGroup).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FieldGroupExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
internal SLCacheField Clone() { var cf = new SLCacheField(); cf.Name = Name; cf.Caption = Caption; cf.PropertyName = PropertyName; cf.ServerField = ServerField; cf.UniqueList = UniqueList; cf.NumberFormatId = NumberFormatId; cf.Formula = Formula; cf.SqlType = SqlType; cf.Hierarchy = Hierarchy; cf.Level = Level; cf.DatabaseField = DatabaseField; cf.MappingCount = MappingCount; cf.MemberPropertyField = MemberPropertyField; cf.HasSharedItems = HasSharedItems; cf.SharedItems = SharedItems.Clone(); cf.HasFieldGroup = HasFieldGroup; cf.FieldGroup = FieldGroup.Clone(); cf.MemberPropertiesMaps = new List <int>(); foreach (var i in MemberPropertiesMaps) { cf.MemberPropertiesMaps.Add(i); } return(cf); }
/// <summary> /// Processes the segment. /// Loops through all of the fields within the segment, and parsing them individually. /// </summary> /// <param name="segment">The segment.</param> /// <param name="parentNode">The parent node.</param> private static void ProcessSegmentNew(AbstractSegment segment, FieldGroup parentNode) { FieldGroup segmentNode = new FieldGroup() { Name = segment.GetStructureName(), Id = segment.GetStructureName() }; int dataItemCount = 0; for (int i = 1; i <= segment.NumFields(); i++) { dataItemCount++; IType[] dataItems = segment.GetField(i); foreach (IType item in dataItems) { ProcessFieldNew(item, segment.GetFieldDescription(i), dataItemCount.ToString(), segmentNode); } if (dataItems.Count() == 0 && segmentNode.FieldList.Count > 0) { AbstractPrimitive msg = null; ProcessPrimitiveFieldNew((AbstractPrimitive)msg, segment.GetFieldDescription(i), dataItemCount.ToString(), segmentNode); } } AddChildGroupNew(parentNode, segmentNode); }
public FieldGroup CreateFieldGroup() { var fg = new FieldGroup(); fg.Slug = "test"; _fieldGroups.Add(fg); return(fg); }
public void UpdateFieldGroup(FieldGroup obj) { if (!_principal.IsAllowed) { return; } _dal.UpdateObject(obj); }
/// <summary> /// Processes a structure group. /// A structure group is, primarily, a group of segments. This could either be the entire /// message or special segments that need to be grouped together. An example of this is /// the result segments (OBR, OBX and NTE), these are grouped together in the model /// definition (e.g. REF_I12_RESULTS_NOTES). /// </summary> /// <param name="structureGroup">The structure group.</param> /// <param name="parentNode">The parent node, in the TreeListView.</param> public static void ProcessStructureGroup(AbstractGroup structureGroup, FieldGroup parentNode) { foreach (string segName in structureGroup.Names) { foreach (IStructure struc in structureGroup.GetAll(segName)) { ProcessStructure(struc, parentNode); } } }
public void TestCreateEntityType( ) { EntityType newType = null; FieldGroup group = null; StringField field1 = null; try { newType = Entity.Create <EntityType>( ); newType.Name = "TestEntityType"; newType.Description = "Test new EntityType"; newType.Save( ); long typeId = newType.Id; group = new FieldGroup { Name = "TestGroup1" }; newType.FieldGroups.Add(group); group.Save( ); field1 = new StringField { Name = "TestField1", AllowMultiLines = true, FieldInGroup = @group, FieldIsOnType = newType }; field1.Save( ); var savedEntityType = Entity.Get <EntityType>(new EntityRef(typeId), true); Assert.IsTrue(savedEntityType.Name == "TestEntityType"); savedEntityType.Delete( ); } finally { if (field1 != null) { field1.Delete( ); } if (group != null) { group.Delete( ); } if (newType != null) { newType.Delete( ); } } }
public void Refresh(FieldGroup fg) { var target = this; var source = fg; target.Name = source.Name; target.Slug = source.Slug; target.Fields = source.Fields.Select(i => new FieldViewModel(i)).OrderBy(i => i.Name).ToList(); target.IsCountable = source.IsCountable; target.IsActive = source.IsActive; }
public async Task <FieldGroupViewModel> AddFieldGroup(FieldGroup fieldGroup) { var data = new FieldGroup() { GroupName = fieldGroup.GroupName, FieldId = fieldGroup.FieldId }; await fieldGroupRepository.AddAsync(data); return(mapper.Map <FieldGroupViewModel>(data)); }
public void DeleteFieldGroup() { FieldGroup toDelete = repo.GetUniq(p => p.Title == "MyFieldGroup"); Assert.IsNotNull(repo.GetUniq(p => p.Title == "MyFieldGroup")); Assert.IsNotNull(ctx.PeopleFieldSet.FirstOrDefault(p => p.Key == "MyPersonnalField1")); repo.Delete(toDelete); repo.Save(); Assert.IsNull(repo.GetUniq(p => p.Title == "MyFieldGroup")); Assert.IsNull(ctx.PeopleFieldSet.FirstOrDefault(p => p.Key == "MyPersonnalField1")); }
internal void FromFieldGroup(FieldGroup fg) { SetAllNull(); if (fg.ParentId != null) { ParentId = fg.ParentId.Value; } if (fg.Base != null) { Base = fg.Base.Value; } using (var oxr = OpenXmlReader.Create(fg)) { while (oxr.Read()) { if (oxr.ElementType == typeof(RangeProperties)) { RangeProperties.FromRangeProperties((RangeProperties)oxr.LoadCurrentElement()); HasRangeProperties = true; } else if (oxr.ElementType == typeof(DiscreteProperties)) { var dp = (DiscreteProperties)oxr.LoadCurrentElement(); FieldItem fi; using (var oxrDiscrete = OpenXmlReader.Create(dp)) { while (oxrDiscrete.Read()) { if (oxrDiscrete.ElementType == typeof(FieldItem)) { fi = (FieldItem)oxrDiscrete.LoadCurrentElement(); DiscreteProperties.Add(fi.Val); } } } } else if (oxr.ElementType == typeof(GroupItems)) { GroupItems.FromGroupItems((GroupItems)oxr.LoadCurrentElement()); HasGroupItems = true; } } } }
/// <summary> /// Processes the composite field. /// A composite field is a group of fields, such as "Coded Entry". /// This function breaks up the composite field and passes each field back to "ProcessField" /// </summary> /// <param name="composite">The composite.</param> /// <param name="fieldDescription">The field description.</param> /// <param name="fieldCount">The field count.</param> /// <param name="parentNode">The parent node.</param> private static void ProcessCompositeFieldNew(IComposite composite, string fieldDescription, string fieldCount, FieldGroup parentNode) { string desc = fieldDescription; // + ":" + composite.TypeName; FieldGroup subParent = new FieldGroup() { Name = fieldCount.ToString() + " - " + desc, Id = parentNode.Id + "." + fieldCount }; int subItemCount = 0; foreach (IType subItem in composite.Components) { subItemCount++; ProcessFieldNew(subItem, string.Empty, subItemCount.ToString(), subParent); } AddChildGroupNew(parentNode, subParent); }
/// <summary> /// Processes the composite field. /// A composite field is a group of fields, such as "Coded Entry". /// This function breaks up the composite field and passes each field back to "ProcessField" /// </summary> /// <param name="composite">The composite.</param> /// <param name="fieldDescription">The field description.</param> /// <param name="fieldCount">The field count.</param> /// <param name="parentNode">The parent node.</param> private static void ProcessCompositeField(IComposite composite, string fieldDescription, string fieldCount, FieldGroup parentNode) { string desc = fieldDescription; FieldGroup subParent = new FieldGroup() { Name = parentNode.Name + "." + fieldCount.ToString() + " - " + (string.IsNullOrEmpty(desc) ? "Unknown" : desc), Id = parentNode.Id + "." + fieldCount }; int subItemCount = 0; foreach (IType subItem in composite.Components) { subItemCount++; ProcessField(subItem, string.Empty, subItemCount.ToString(), subParent); } AddChildGroup(parentNode, subParent); }
public async Task <IActionResult> AddEditFieldGroup(int id) { var fieldGroup = new FieldGroup(); if (id != 0) { using (_serviceProvider.GetRequiredService <ApplicationDbContext>()) { fieldGroup = await _context.FieldGroups.Where(fg => fg.Id == id).SingleOrDefaultAsync(); if (fieldGroup == null) { return(RedirectToAction("Index")); } } } return(PartialView("AddEditFieldGroup", fieldGroup)); }
public HttpResponseMessage Update(HttpRequestMessage request, FieldGroup fieldGroup) { return(CreateHttpResponse(request, () => { HttpResponseMessage response = null; if (!ModelState.IsValid) { response = request.CreateResponse(HttpStatusCode.BadRequest, ModelState); } else { _fieldGroupService.Update(fieldGroup); _fieldGroupService.Save(); response = request.CreateResponse(HttpStatusCode.Created, fieldGroup); } return response; })); }
public async Task <IActionResult> DeleteFieldGroup(int id) { var model = new FieldGroup(); if (id != 0) { using (_serviceProvider.GetRequiredService <ApplicationDbContext>()) { model = await _context.FieldGroups.Where(fg => fg.Id == id).SingleOrDefaultAsync(); if (model == null) { return(RedirectToAction("Index")); } } } return(PartialView("DeleteFieldGroup", model.Title)); }
public async Task <IActionResult> AddEditFieldGroup(int id, FieldGroup model, string redirectUrl) { if (ModelState.IsValid) { if (id == 0) { using (var db = _serviceProvider.GetRequiredService <ApplicationDbContext>()) { db.FieldGroups.Add(model); await db.SaveChangesAsync(); } TempData["Notif"] = Notification.ShowNotif(MessageType.Add, type: ToastType.green); return(PartialView("_Succefullyresponse", redirectUrl)); } else { using (var db = _serviceProvider.GetRequiredService <ApplicationDbContext>()) { db.FieldGroups.Update(model); await db.SaveChangesAsync(); } TempData["Notif"] = Notification.ShowNotif(MessageType.Edit, type: ToastType.blue); return(PartialView("_Succefullyresponse", redirectUrl)); } } else { if (id == 0) { TempData["Notif"] = Notification.ShowNotif(MessageType.addError, type: ToastType.yellow); } else { TempData["Notif"] = Notification.ShowNotif(MessageType.editError, type: ToastType.yellow); } return(PartialView("AddEditFieldGroup", model)); } }
internal void FromFieldGroup(FieldGroup fg) { this.SetAllNull(); if (fg.ParentId != null) this.ParentId = fg.ParentId.Value; if (fg.Base != null) this.Base = fg.Base.Value; using (OpenXmlReader oxr = OpenXmlReader.Create(fg)) { while (oxr.Read()) { if (oxr.ElementType == typeof(RangeProperties)) { this.RangeProperties.FromRangeProperties((RangeProperties)oxr.LoadCurrentElement()); this.HasRangeProperties = true; } else if (oxr.ElementType == typeof(DiscreteProperties)) { DiscreteProperties dp = (DiscreteProperties)oxr.LoadCurrentElement(); FieldItem fi; using (OpenXmlReader oxrDiscrete = OpenXmlReader.Create(dp)) { while (oxrDiscrete.Read()) { if (oxrDiscrete.ElementType == typeof(FieldItem)) { fi = (FieldItem)oxrDiscrete.LoadCurrentElement(); this.DiscreteProperties.Add(fi.Val); } } } } else if (oxr.ElementType == typeof(GroupItems)) { this.GroupItems.FromGroupItems((GroupItems)oxr.LoadCurrentElement()); this.HasGroupItems = true; } } } }
// 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; }
internal FieldGroup ToFieldGroup() { FieldGroup fg = new FieldGroup(); if (this.ParentId != null) fg.ParentId = this.ParentId.Value; if (this.Base != null) fg.Base = this.Base.Value; if (this.HasRangeProperties) { fg.Append(this.RangeProperties.ToRangeProperties()); } if (this.DiscreteProperties.Count > 0) { DiscreteProperties dp = new DiscreteProperties(); dp.Count = (uint)this.DiscreteProperties.Count; foreach (uint i in this.DiscreteProperties) { dp.Append(new FieldItem() { Val = i }); } fg.Append(dp); } if (this.HasGroupItems) { fg.Append(this.GroupItems.ToGroupItems()); } return fg; }