Пример #1
0
        /// <summary>
        /// Save Product details in database
        /// </summary>
        /// <param name="productDetails">Product details to be saved</param>
        /// <returns>returns boolean value indicating if the records are saved in database</returns>
        bool IProductService.SaveProductDetails(ProductDTO productDetails)
        {
            product productEntity = new product();

            ObjectMapper.Map(productDetails, productEntity);
            return ProductRepository.Save(productEntity);
        }
        private void Fixupproduct(product previousValue)
        {
            if (previousValue != null && previousValue.product_purchase_history_child.Contains(this))
            {
                previousValue.product_purchase_history_child.Remove(this);
            }

            if (product != null)
            {
                if (!product.product_purchase_history_child.Contains(this))
                {
                    product.product_purchase_history_child.Add(this);
                }
                if (product_id != product.id)
                {
                    product_id = product.id;
                }
            }
        }
Пример #3
0
        private void Fixupproduct(product previousValue)
        {
            if (previousValue != null && previousValue.orderchilds.Contains(this))
            {
                previousValue.orderchilds.Remove(this);
            }

            if (product != null)
            {
                if (!product.orderchilds.Contains(this))
                {
                    product.orderchilds.Add(this);
                }
                if (product_id != product.id)
                {
                    product_id = product.id;
                }
            }
        }
Пример #4
0
        private void Fixupproduct(product previousValue)
        {
            if (previousValue != null && ReferenceEquals(previousValue.display_properties, this))
            {
                previousValue.display_properties = null;
            }

            if (product != null)
            {
                product.display_properties = this;
                if (product_id != product.id)
                {
                    product_id = product.id;
                }
            }
        }