public object Clone() { ProductCharacteristic clone = new ProductCharacteristic(); clone.ProductName = (string)this.ProductName.Clone(); clone.Measure = (Measure)this.Measure.Clone(); clone.ProductId = this.ProductId; clone.Price = this.Price; clone.TotalQuantityProduct = this.TotalQuantityProduct; clone.ProduceCountry = (string)this.ProduceCountry.Clone(); clone.ProductGroup = (string)this.ProductGroup.Clone(); clone.ProductCategory = (string)this.ProductCategory.Clone(); return(clone); }
public void UpdateProductCharacteristic() { ProductCharacteristic characteristic; if (_product.GetProductCharacteristic() == null) { characteristic = new ProductCharacteristic(); characteristic.Measure = (Measure)_product.Measure.Clone(); characteristic.Price = _product.Price; characteristic.ProductId = _product.ProductId; characteristic.ProductName = (string)_product.ProductName.Clone(); characteristic.ProduceCountry = (string)_product.ProduceCountry.Clone(); characteristic.ProductCategory = (string)_product.ProductCategory.Clone(); characteristic.ProductGroup = (string)_product.ProductGroup.Clone(); _product.SetProductCharacteristic(characteristic); } else { characteristic = _product.GetProductCharacteristic(); } characteristic.TotalQuantityProduct = _product.TotalQuantityProduct; }
internal void SetProductCharacteristic(ProductCharacteristic characteristic) { this._characteristic = characteristic; }