Example #1
0
        /// <summary>
        /// Clones this object.
        /// </summary>
        /// <returns>A clone of this object.</returns>
        public Object Clone()
        {
            ProductProps p = new ProductProps();

            p.productID      = this.productID;
            p.productCode    = this.productCode;
            p.description    = this.description;
            p.price          = this.price;
            p.onHandQuantity = this.onHandQuantity;
            p.ConcurrencyID  = this.ConcurrencyID;
            return(p);
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        public void SetState(string xml)
        {
            XmlSerializer serializer = new XmlSerializer(this.GetType());
            StringReader  reader     = new StringReader(xml);
            ProductProps  p          = (ProductProps)serializer.Deserialize(reader);

            this.productID      = p.productID;
            this.productCode    = p.productCode;
            this.description    = p.description;
            this.price          = p.price;
            this.onHandQuantity = p.onHandQuantity;
            this.ConcurrencyID  = p.ConcurrencyID;
        }