Esempio n. 1
0
    private void SaveSecondaryNoProduct(ProductImageFile imageFile)
    {
        imageFile.SaveSecondary();

        if (!String.IsNullOrEmpty(ProductImageData.SecondaryImagePath) &&
            String.Compare(imageFile.SecondaryFilePath, ProductImageData.SecondaryImagePath, true) != 0)
        {
            DeleteFile(ProductImageData.SecondaryImagePath);
        }

        ProductImageData.SecondaryImagePath = imageFile.SecondaryFilePath;
    }
Esempio n. 2
0
    private void SaveSecondary(Product product, ProductImageFile imageFile)
    {
        imageFile.SaveSecondary();

        string secondaryImage = product.ImageSecondary;

        if (!String.IsNullOrEmpty(secondaryImage) &&
            String.Compare(imageFile.SecondaryFilePath, secondaryImage, true) != 0)
        {
            DeleteFile(secondaryImage);
        }
        product.ImageSecondary       = imageFile.SecondaryFilePath;
        uxSecondaryImageHidden.Value = product.ImageSecondary;
    }