void ReleaseDesignerOutlets()
        {
            if (ButtonsView != null)
            {
                ButtonsView.Dispose();
                ButtonsView = null;
            }

            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (DeleteButton != null)
            {
                DeleteButton.Dispose();
                DeleteButton = null;
            }

            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (ProductDetailsView != null)
            {
                ProductDetailsView.Dispose();
                ProductDetailsView = null;
            }

            if (ProductImageView != null)
            {
                ProductImageView.Dispose();
                ProductImageView = null;
            }

            if (ProductTitleLabel != null)
            {
                ProductTitleLabel.Dispose();
                ProductTitleLabel = null;
            }

            if (ScoreContainerView != null)
            {
                ScoreContainerView.Dispose();
                ScoreContainerView = null;
            }

            if (TextLabel != null)
            {
                TextLabel.Dispose();
                TextLabel = null;
            }
        }
Ejemplo n.º 2
0
        void ReleaseDesignerOutlets()
        {
            if (ProductImageView != null)
            {
                ProductImageView.Dispose();
                ProductImageView = null;
            }

            if (ProductNameLabel != null)
            {
                ProductNameLabel.Dispose();
                ProductNameLabel = null;
            }
        }
Ejemplo n.º 3
0
        void ReleaseDesignerOutlets()
        {
            if (BadgeLabel != null)
            {
                BadgeLabel.Dispose();
                BadgeLabel = null;
            }

            if (BadgeView != null)
            {
                BadgeView.Dispose();
                BadgeView = null;
            }

            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (ProductImageView != null)
            {
                ProductImageView.Dispose();
                ProductImageView = null;
            }

            if (ProductTitleLabel != null)
            {
                ProductTitleLabel.Dispose();
                ProductTitleLabel = null;
            }

            if (ReviewTextLabel != null)
            {
                ReviewTextLabel.Dispose();
                ReviewTextLabel = null;
            }
        }
Ejemplo n.º 4
0
        //GET PRODUCT IMAGE BY ID
        public async Task <ProductImageView> ProductImageGetByID(int imageId)
        {
            var image = await _context.ProductImages.FindAsync(imageId);

            if (image == null)
            {
                throw new ErrorMessage($"Cannot find an image with id {imageId}");
            }

            var viewModel = new ProductImageView()
            {
                Caption     = image.Caption,
                DateCreated = image.CreatedDate,
                FileSize    = image.FileSize,
                Id          = image.Id,
                ImagePath   = image.ImagePath,
                IsDefault   = image.IsDefault,
                ProductId   = image.ProductId,
                SortOrder   = image.SortOrder
            };

            return(viewModel);
        }
Ejemplo n.º 5
0
 public ActionResult Edit(int id, ProductImageView image)
 {
     throw new System.NotImplementedException();
 }