private void GetQuantitiesStrings() { objTaxonomy t = objTaxonomy.GetInstance(); foreach (taxonomyQuantity tq in t.quantities) { this._quantities.Add(tq.quantityName); } }
private void SerializeQuantitiesObjectToFile(string filePath, objTaxonomy tax) { using (var writer = new StreamWriter(filePath)) { XmlSerializer serializer = new XmlSerializer(tax.GetType()); serializer.Serialize(writer, tax); writer.Flush(); var xml = writer.ToString(); } }
private void NewQuantityValue() { objTaxonomy t = objTaxonomy.GetInstance(); taxonomyQuantity tq = t.quantities.Find(x => x.quantityName == this._quantity); List <string> ls = new List <string>(); foreach (taxonomyNames tn in tq.baseAltNames) { ls.Add(tn.baseAltName); } this.baseAltNames = ls; }
private void NewBaseAltNameValue() { if (this.baseAltName == null) { this.symbol = null; return; } objTaxonomy t = objTaxonomy.GetInstance(); taxonomyQuantity tq = t.quantities.Find(x => x.quantityName == this._quantity); taxonomyNames tn = tq.baseAltNames.Find(x => x.baseAltName == this._baseAltName); this.symbols = tn.taxonomyNamesSymbols; }
static objTaxonomy() { instance = new objTaxonomy(); }