Esempio n. 1
0
        /// <summary>
        ///     Load additional image information for the given product
        /// </summary>
        /// <param name="hccApp">An instance of the Hotcakes Application context.</param>
        /// <param name="img">Product for which its required to have the image details.</param>
        public void LoadAlternateImageUrls(HotcakesApplication hccApp, ProductImage img)
        {
            MediumlUrl = DiskStorage.ProductAdditionalImageUrlMedium(hccApp, img.ProductId, img.Bvin, img.FileName,
                                                                     false);
            OriginalUrl = DiskStorage.ProductAdditionalImageUrlOriginal(hccApp, img.ProductId, img.Bvin, img.FileName,
                                                                        false);
            SmallUrl = DiskStorage.ProductAdditionalImageUrlSmall(hccApp, img.ProductId, img.Bvin, img.FileName, false);
            TinyUrl  = DiskStorage.ProductAdditionalImageUrlTiny(hccApp, img.ProductId, img.Bvin, img.FileName, false);

            MediumlAltText = img.AlternateText;
            SmallAltText   = img.AlternateText;
        }
Esempio n. 2
0
        protected void gvAditionalImages_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                var imgImage    = e.Row.FindControl("imgImage") as Image;
                var litFileName = e.Row.FindControl("litFileName") as Literal;

                var productImage = e.Row.DataItem as ProductImage;

                imgImage.ImageUrl = DiskStorage.ProductAdditionalImageUrlTiny(HccApp,
                                                                              productImage.ProductId,
                                                                              productImage.Bvin,
                                                                              productImage.FileName,
                                                                              HccApp.IsCurrentRequestSecure());
                imgImage.AlternateText = productImage.AlternateText;
                litFileName.Text       = productImage.FileName;

                e.Row.Attributes["id"] = productImage.Bvin;
            }
        }