private void LoadFromXml(XmlNode node) { XmlNodeHelper ndhp = new XmlNodeHelper(node); ndhp.NamespaceManager.AddNamespace("claim", NameSpaceURI); this.ClassCode = ndhp.GetAttributeString("claim:classCode"); this.ClassCodeTableId = ndhp.GetAttributeString("claim:classCodeId"); this.ClassName = ndhp.GetNodeText("claim:className"); this.AdministrationCode = ndhp.GetChildNodeAttributeString("claim:administration", "claim:adminCode"); this.AdministrationCodeTableId = ndhp.GetChildNodeAttributeString("claim:administration", "claim:adminCodeId"); this.AdministrationMemo = ndhp.GetNodeText("admMemo"); this.BundleNumber = ndhp.GetNodeTextToInteger("claim:bundleNumber", 1); this.DetailList = new List <BundleDetailItem>(); foreach (XmlNode dtnode in ndhp.SelectNodes("claim:item")) { BundleDetailItem dt = new BundleDetailItem(dtnode); this.DetailList.Add(dt); } this.Memo = ndhp.GetNodeText("claim:memo"); }
private void LoadFromXml(XmlNode node) { XmlNodeHelper ndhp = new XmlNodeHelper(node); ndhp.NamespaceManager.AddNamespace("claim", NameSpaceURI); this.Code = ndhp.GetAttributeString("claim:numberCode"); this.CodeTableId = ndhp.GetAttributeString("claim:numberCodeId"); this.Unit = ndhp.GetAttributeString("claim:unit"); string tmpstr = ndhp.Node.InnerText; decimal val; if (!Decimal.TryParse(tmpstr, out val)) { this.Value = val; } else { this.Value = 0; } }
private void LoadFromXml(XmlNode node) { XmlNodeHelper ndhp = new XmlNodeHelper(node); ndhp.NamespaceManager.AddNamespace("claim", NameSpaceURI); this.SubClassCode = ndhp.GetAttributeString("claim:subclassCode"); this.SubClassCodeTableId = ndhp.GetAttributeString("claim:subclassCodeId"); this.Code = ndhp.GetAttributeString("claim:code"); this.CodeTableId = ndhp.GetAttributeString("claim:tableId"); this.AliasCode = ndhp.GetAttributeString("claim:aliasCode"); this.AliasCodeTableId = ndhp.GetAttributeString("claim:aliasTableId"); this.Name = ndhp.GetNodeText("claim:name"); this.NumberList = new List <NumberItem>(); foreach (XmlNode subnd in ndhp.SelectNodes("claim:number")) { NumberItem numitm = new NumberItem(subnd); this.NumberList.Add(numitm); } string tmpstr = ndhp.GetNodeText("claim:duration"); this.Duration = new TimeSpan(0, 0, 0); if (tmpstr != null) { //書式PTnHnM tmpstr = tmpstr.Replace("RT", ""); tmpstr = tmpstr.Replace("M", ""); tmpstr = tmpstr.Replace("H", ":"); string[] tm = tmpstr.Split(':'); if (tm.Length == 2) { this.Duration = new TimeSpan(int.Parse(tm[0]), int.Parse(tm[1]), 0); } } this.LocationList = new List <LocationItem>(); foreach (XmlNode subnd in ndhp.SelectNodes("claim:location")) { LocationItem numitm = new LocationItem(subnd); this.LocationList.Add(numitm); } this.FilmList = new List <FilmItem>(); foreach (XmlNode subnd in ndhp.SelectNodes("claim:film")) { FilmItem numitm = new FilmItem(subnd); this.FilmList.Add(numitm); } this.Event = new EventItem(ndhp.GetNode("claim:event")); this.Memo = ndhp.GetNodeText("claim:memo"); }
private void LoadFromXml(XmlNode node) { XmlNodeHelper ndhp = new XmlNodeHelper(node); ndhp.NamespaceManager.AddNamespace("claim", NameSpaceURI); this.SubClassCode = ndhp.GetAttributeString("claim:subclassCode"); this.SubClassCodeTableId = ndhp.GetAttributeString("claim:subclassCodeId"); this.Code = ndhp.GetAttributeString("claim:code"); this.CodeTableId = ndhp.GetAttributeString("claim:tableId"); this.AliasCode = ndhp.GetAttributeString("claim:aliasCode"); this.AliasCodeTableId = ndhp.GetAttributeString("claim:aliasTableId"); this.Name = ndhp.GetNodeText("claim:name"); this.NumberList = new List<NumberItem>(); foreach (XmlNode subnd in ndhp.SelectNodes("claim:number")) { NumberItem numitm = new NumberItem(subnd); this.NumberList.Add(numitm); } string tmpstr = ndhp.GetNodeText("claim:duration"); this.Duration = new TimeSpan(0, 0, 0); if (tmpstr != null) { //書式PTnHnM tmpstr = tmpstr.Replace("RT", ""); tmpstr = tmpstr.Replace("M", ""); tmpstr = tmpstr.Replace("H", ":"); string[] tm = tmpstr.Split(':'); if (tm.Length == 2) { this.Duration = new TimeSpan(int.Parse(tm[0]), int.Parse(tm[1]),0); } } this.LocationList = new List<LocationItem>(); foreach (XmlNode subnd in ndhp.SelectNodes("claim:location")) { LocationItem numitm = new LocationItem(subnd); this.LocationList.Add(numitm); } this.FilmList = new List<FilmItem>(); foreach (XmlNode subnd in ndhp.SelectNodes("claim:film")) { FilmItem numitm = new FilmItem(subnd); this.FilmList.Add(numitm); } this.Event = new EventItem(ndhp.GetNode("claim:event")); this.Memo = ndhp.GetNodeText("claim:memo"); }