/// <summary> /// Constructor /// </summary> public ArenaDetails() { this.arenaIdField = 0; this.arenaNameField = string.Empty; this.teamField = new Team(); this.leagueField = new League(); this.regionField = new Region(); this.currentCapacityField = new CurrentCapacity(); this.expandedCapacityField = new ExpandedCapacity(); }
private ExpandedCapacity ParseExpandedCapacityNode(XmlNode xmlNodeExpandedCapacity) { try { ExpandedCapacity expandedCapacity = new ExpandedCapacity(); if (xmlNodeExpandedCapacity.ChildNodes != null) { if (xmlNodeExpandedCapacity.Attributes[Tags.Available] != null) { expandedCapacity.availableField = GenericFunctions.ConvertStringToBool(xmlNodeExpandedCapacity.Attributes[Tags.Available].Value); } if (expandedCapacity.availableField) { foreach (XmlNode xmlNode in xmlNodeExpandedCapacity.ChildNodes) { switch (xmlNode.Name) { case Tags.ExpansionDate: expandedCapacity.expansionDateField = GenericFunctions.ConvertStringToDateTime(xmlNode.InnerText); break; case Tags.Basic: expandedCapacity.basicField = Convert.ToInt32(xmlNode.InnerText); break; case Tags.Terraces: expandedCapacity.terracesField = Convert.ToInt32(xmlNode.InnerText); break; case Tags.Roof: expandedCapacity.roofField = Convert.ToInt32(xmlNode.InnerText); break; case Tags.VIP: expandedCapacity.vipField = Convert.ToInt32(xmlNode.InnerText); break; } } } } return(expandedCapacity); } catch (Exception ex) { throw ex; } }
private ExpandedCapacity ParseExpandedCapacityNode(XmlNode xmlNodeExpandedCapacity) { try { ExpandedCapacity expandedCapacity = new ExpandedCapacity(); if (xmlNodeExpandedCapacity.ChildNodes != null) { if (xmlNodeExpandedCapacity.Attributes[Tags.Available] != null) { expandedCapacity.availableField = GenericFunctions.ConvertStringToBool(xmlNodeExpandedCapacity.Attributes[Tags.Available].Value); } if (expandedCapacity.availableField) { foreach (XmlNode xmlNode in xmlNodeExpandedCapacity.ChildNodes) { switch (xmlNode.Name) { case Tags.ExpansionDate: expandedCapacity.expansionDateField = GenericFunctions.ConvertStringToDateTime(xmlNode.InnerText); break; case Tags.Basic: expandedCapacity.basicField = Convert.ToInt32(xmlNode.InnerText); break; case Tags.Terraces: expandedCapacity.terracesField = Convert.ToInt32(xmlNode.InnerText); break; case Tags.Roof: expandedCapacity.roofField = Convert.ToInt32(xmlNode.InnerText); break; case Tags.VIP: expandedCapacity.vipField = Convert.ToInt32(xmlNode.InnerText); break; } } } } return expandedCapacity; } catch (Exception ex) { throw ex; } }