Esempio n. 1
0
        public bool Delete()
        {
            bool result = DBProduct.Delete(this.productID);

            if (result)
            {
                ContentChangedEventArgs e = new ContentChangedEventArgs();
                e.IsDeleted = true;
                OnContentChanged(e);
            }

            return(result);
        }
Esempio n. 2
0
        public static bool Delete(
            Guid productGuid,
            Guid userGuid,
            string userIPAddress)
        {
            Product product = new Product(productGuid);

            if (
                (product.Guid == productGuid) &&
                (productGuid != Guid.Empty)
                )
            {
                DBProduct.AddHistory(
                    Guid.NewGuid(),
                    product.Guid,
                    product.StoreGuid,
                    product.TaxClassGuid,
                    product.Sku,
                    ConvertProductStatusToByte(product.Status),
                    ConvertFulfillmentTypeToByte(product.FulfillmentType),
                    product.Weight,
                    product.QuantityOnHand,
                    product.ImageFileName,
                    product.ImageFileBytes,
                    product.Created,
                    product.CreatedBy,
                    product.LastModified,
                    product.LastModifedBy,
                    DateTime.UtcNow,
                    product.shippingAmount);

                OfferProduct.DeleteByProduct(
                    productGuid,
                    userGuid,
                    userIPAddress);
            }

            return(DBProduct.Delete(
                       productGuid,
                       DateTime.UtcNow,
                       userGuid,
                       userIPAddress));
        }
 public void Delete(int id)
 {
     dbProduct.Delete(id);
 }