コード例 #1
0
ファイル: ProductProps.cs プロジェクト: helo12/Lab6
        public object Clone()
        {
            ProductProps p = new ProductProps();

            p.ID            = this.ID;
            p.code          = this.code;
            p.description   = this.description;
            p.quanitity     = this.quanitity;
            p.unitPrice     = this.unitPrice;
            p.ConcurrencyID = this.ConcurrencyID;
            return(p);
        }
コード例 #2
0
ファイル: ProductProps.cs プロジェクト: helo12/Lab6
        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.description   = p.description;
            this.quanitity     = p.quanitity;
            this.unitPrice     = p.unitPrice;
            this.ConcurrencyID = p.ConcurrencyID;
        }