internal void Update(XElement tradePolicyDetailNode) { foreach (XAttribute attribute in tradePolicyDetailNode.Attributes()) { switch (attribute.Name.ToString()) { case "ID": this.Id = new Guid(attribute.Value); break; case "Option": this.Option = (VolumeNecessaryOption)int.Parse(attribute.Value); break; default: break; } } }
internal void Update(IDBRow volumeNecessaryRow) { this.Id = (Guid)volumeNecessaryRow["ID"]; this.Option = (VolumeNecessaryOption)((byte)volumeNecessaryRow["Option"]); }