public object Clone()
        {
            ProductProps p = new ProductProps();

            p.id            = this.id;
            p.code          = this.code;
            p.description   = this.description;
            p.unitPrice     = this.unitPrice;
            p.onHandQty     = this.onHandQty;
            p.concurrencyID = this.concurrencyID;
            return(p);
        }
        /// <summary>
        /// Clones this object.
        /// </summary>
        /// <returns>A clone of this object.</returns>
        public Object Clone()
        {
            ProductProps p = new ProductProps();

            p.ID             = this.ID;
            p.productcode    = this.productcode;
            p.description    = this.description;
            p.unitprice      = this.unitprice;
            p.onhandquantity = this.onhandquantity;
            p.ConcurrencyID  = this.ConcurrencyID;
            return(p);
        }
Esempio n. 3
0
        /// <summary>
        /// Clones this object.
        /// </summary>
        /// <returns>A clone of this object.</returns>
        public Object Clone()
        {
            ProductProps p = new ProductProps(); //Puts properties out of objects that we have and puts into the properties we just created

            p.ID            = this.ID;
            p.Code          = this.Code;
            p.Description   = this.Description;
            p.UnitPrice     = this.UnitPrice;
            p.Quantity      = this.Quantity;
            p.ConcurrencyID = this.ConcurrencyID;
            return(p);
        }
        public void SetState(string xml)
        {
            XmlSerializer serializer = new XmlSerializer(this.GetType());
            StringReader  reader     = new StringReader(xml);
            ProductProps  p          = (ProductProps)serializer.Deserialize(reader);

            this.id            = p.id;
            this.code          = p.code;
            this.unitPrice     = p.unitPrice;
            this.onHandQty     = p.onHandQty;
            this.description   = p.description;
            this.concurrencyID = p.concurrencyID;
        }
        /// <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.ID             = p.ID;
            this.productcode    = p.productcode;
            this.description    = p.description;
            this.unitprice      = p.unitprice;
            this.onhandquantity = p.onhandquantity;
            this.ConcurrencyID  = p.ConcurrencyID;
        }
Esempio n. 6
0
        /// <summary>
        ///
        /// </summary>
        public void SetState(string xml)
        {
            XmlSerializer serializer = new XmlSerializer(this.GetType()); //De-seralizes the stuff we just seralized
            StringReader  reader     = new StringReader(xml);
            ProductProps  p          = (ProductProps)serializer.Deserialize(reader);

            this.ID            = p.ID;
            this.Code          = p.Code;
            this.Description   = p.Description;
            this.UnitPrice     = p.UnitPrice;
            this.Quantity      = p.Quantity;
            this.ConcurrencyID = p.ConcurrencyID;
        }