/// <summary> /// /// </summary> public void SetState(string xml) { XmlSerializer serializer = new XmlSerializer(this.GetType()); StringReader reader = new StringReader(xml); ProductsProps p = (ProductsProps)serializer.Deserialize(reader); this.ID = p.ID; this.code = p.code; this.description = p.description; this.ConcurrencyID = p.ConcurrencyID; this.quantity = p.quantity; this.unitPrice = p.unitPrice; }
/// <summary> /// Clones this object. /// </summary> /// <returns>A clone of this object.</returns> public Object Clone() { ProductsProps p = new ProductsProps(); p.ID = this.ID; p.code = this.code; p.description = this.description; p.ConcurrencyID = this.ConcurrencyID; p.quantity = this.quantity; p.unitPrice = this.unitPrice; return(p); }