Пример #1
0
        private bool Create()
        {
            int newID = 0;

            productGuid = Guid.NewGuid();
            createdUtc  = DateTime.UtcNow;

            newID = DBProduct.Create(
                this.siteID,
                this.zoneID,
                this.title,
                this.subTitle,
                this.url,
                this.code,
                this.briefContent,
                this.fullContent,
                this.productType,
                this.openInNewWindow,
                this.position,
                this.showOption,
                this.isPublished,
                this.startDate,
                this.endDate,
                this.displayOrder,
                this.price,
                this.oldPrice,
                this.specialPrice,
                this.specialPriceStartDate,
                this.specialPriceEndDate,
                this.viewCount,
                this.commentCount,
                this.metaTitle,
                this.metaKeywords,
                this.metaDescription,
                this.additionalMetaTags,
                this.compiledMeta,
                this.manufacturerID,
                this.stockQuantity,
                this.disableBuyButton,
                this.fileAttachment,
                this.productGuid,
                this.userGuid,
                this.createdUtc,
                this.lastModUtc,
                this.lastModUserGuid,
                this.isDeleted);

            this.productID = newID;

            bool result = (newID > 0);

            //IndexHelper.IndexItem(this);
            if (result)
            {
                ContentChangedEventArgs e = new ContentChangedEventArgs();
                OnContentChanged(e);
            }

            return(result);
        }
Пример #2
0
 public int Create(Product entity)
 {
     return(dbProduct.Create(entity));
 }
Пример #3
0
 public void Create(Product entity)
 {
     dbProduct.Create(entity);
 }