Ejemplo n.º 1
0
    public string SaveImageContents(Int32 ItemID, string imageRootPath, string sourceFileCol, string dataCollection, int itemLargeThumbNailSize, int itemMediumThumbNailSize, int itemSmallThumbNailSize, string imgPreFix)
    {

        if (dataCollection.Contains("#"))
        {
            dataCollection = dataCollection.Remove(dataCollection.LastIndexOf("#"));
        }
        SQLHandler sageSql = new SQLHandler();
        string[] individualRow = dataCollection.Split('#');
        string[] words;

        StringBuilder sbPathList = new StringBuilder();
        StringBuilder sbIsActiveList = new StringBuilder();
        StringBuilder sbImageType = new StringBuilder();
        StringBuilder sbDescription = new StringBuilder();
        StringBuilder sbDisplayOrder = new StringBuilder();
        StringBuilder sbSourcePathList = new StringBuilder();

        foreach (string str in individualRow)
        {
            words = str.Split('%');
            sbPathList.Append(words[0] + "%");
            sbIsActiveList.Append(words[1] + "%");
            sbImageType.Append(words[2] + "%");
            sbDescription.Append(words[3] + "%");
            sbDisplayOrder.Append(words[4] + "%");
        }
        string pathList = string.Empty;
        string isActive = string.Empty;
        string imageType = string.Empty;
        string description = string.Empty;
        string displayOrder = string.Empty;

        pathList = sbPathList.ToString();
        isActive = sbIsActiveList.ToString();
        imageType = sbImageType.ToString();
        description = sbDescription.ToString();
        displayOrder = sbDisplayOrder.ToString();

        if (pathList.Contains("%"))
        {
            pathList = pathList.Remove(pathList.LastIndexOf("%"));
        }
        if (isActive.Contains("%"))
        {
            isActive = isActive.Remove(isActive.LastIndexOf("%"));
        }
        if (imageType.Contains("%"))
        {
            imageType = imageType.Remove(imageType.LastIndexOf("%"));
        }

        if (sourceFileCol.Contains("%"))
        {
            sourceFileCol = sourceFileCol.Remove(sourceFileCol.LastIndexOf("%"));
        }

        ImageUploaderSqlhandler imageManager = new ImageUploaderSqlhandler();

        try
        {
            FileHelperController fhc = new FileHelperController();
            //TODO:: delete all previous files infos lists
            fhc.FileMover(ItemID, imageRootPath, sourceFileCol, pathList, isActive, imageType, description, displayOrder, imgPreFix, itemLargeThumbNailSize, itemMediumThumbNailSize, itemSmallThumbNailSize);
        }
        catch (Exception ex)
        {
            throw ex;
        }
        return "Success";

    }
Ejemplo n.º 2
0
        public CategoryInfo SaveCategory(Int32 storeID, Int32 portalID, Int32 categoryID, Int32 parentID, ASPXNameValue[] formVars, string selectedItems, string userName, string culture, int categoryLargeThumbImage, int categoryMediumThumbImage, int categorySmallThumbImage)
        {
            try
            {
                CategoryInfo categoryInfo = new CategoryInfo();
                FormValidation formValidation = new FormValidation();
                List<CategoryAttributeInfo> listCategoryAttributes = new List<CategoryAttributeInfo>();
                categoryInfo.CategoryID = categoryID;
                categoryInfo.ParentID = parentID;
                categoryInfo.IsShowInCatalog = true;
                categoryInfo.IsShowInMenu = true;
                categoryInfo.IsShowInSearch = true;
                categoryInfo.PortalID = portalID;
                categoryInfo.StoreID = storeID;
                categoryInfo.ActiveFrom = new DateTime(1970, 1, 1);
                categoryInfo.ActiveTo = new DateTime(2999, 12, 30);
                bool toInsertIntoDB = true;
                bool isFormValid = true;
                //int _imageCounter = 0;
                string _imageVar = string.Empty;
                int _imageCounterFirst = 0;

                for (int i = 0; i < formVars.Length; i++)
                {
                    int inputTypeID;
                    int validationTypeID;
                    string attribName = formVars[i].name;
                    string attribValue = formVars[i].value;
                    string jsonResult = formVars[i].name.Replace('-', ' ');
                    string[] jsonVar = jsonResult.Split('_');

                    CategoryAttributeInfo categoryAttribute = new CategoryAttributeInfo();
                    categoryAttribute.AttributeID = int.Parse(jsonVar[0]);
                    inputTypeID = int.Parse(jsonVar[1]);
                    validationTypeID = int.Parse(jsonVar[2]);
                    if (inputTypeID == 1)
                    {
                        if (validationTypeID == 3)
                        {
                            if (formValidation.ValidateValue(attribName, validationTypeID, attribValue))
                            {
                                categoryAttribute.InputTypeID = inputTypeID;
                                categoryAttribute.ValidationTypeID = validationTypeID;
                                categoryAttribute.DECIMALValue = decimal.Parse(attribValue);
                            }
                            else
                            {
                                isFormValid = false;
                                break;
                            }
                        }
                        else if (validationTypeID == 5)
                        {
                            if (formValidation.ValidateValue(attribName, validationTypeID, attribValue))
                            {
                                categoryAttribute.InputTypeID = inputTypeID;
                                categoryAttribute.ValidationTypeID = validationTypeID;
                                categoryAttribute.INTValue = Int32.Parse(attribValue);
                            }
                            else
                            {
                                isFormValid = false;
                                break;
                            }
                        }
                        else
                        {
                            if (formValidation.ValidateValue(attribName, validationTypeID, attribValue))
                            {
                                categoryAttribute.InputTypeID = inputTypeID;
                                categoryAttribute.ValidationTypeID = validationTypeID;
                                categoryAttribute.NVARCHARValue = attribValue;
                            }
                            else
                            {
                                isFormValid = false;
                                break;
                            }
                        }
                    }
                    else if (inputTypeID == 2)
                    {
                        if (formValidation.ValidateValue(attribName, validationTypeID, attribValue))
                        {
                            categoryAttribute.InputTypeID = inputTypeID;
                            categoryAttribute.ValidationTypeID = validationTypeID;
                            categoryAttribute.TEXTValue = attribValue;
                        }
                        else
                        {
                            isFormValid = false;
                            break;
                        }
                    }
                    else if (inputTypeID == 3)
                    {
                        if (formValidation.ValidateValue(attribName, validationTypeID, attribValue))
                        {
                            categoryAttribute.InputTypeID = inputTypeID;
                            categoryAttribute.ValidationTypeID = validationTypeID;
                            if (!string.IsNullOrEmpty(attribValue))
                            {
                                categoryAttribute.DATEValue = DateTime.Parse(attribValue);
                            }
                        }
                        else
                        {
                            isFormValid = false;
                            break;
                        }
                    }
                    else if (inputTypeID == 4)
                    {
                        if (formValidation.ValidateValue(attribName, validationTypeID, attribValue))
                        {
                            categoryAttribute.InputTypeID = inputTypeID;
                            categoryAttribute.ValidationTypeID = validationTypeID;
                            if (!string.IsNullOrEmpty(attribValue))
                            {
                                categoryAttribute.BooleanValue = (attribValue == "1" ||
                                                                  attribValue.ToLower() == "true")
                                                                     ? true
                                                                     : false;
                            }
                            else
                            {
                                categoryAttribute.BooleanValue = false;
                            }
                        }
                        else
                        {
                            isFormValid = false;
                            break;
                        }
                    }
                    else if (inputTypeID == 5 || inputTypeID == 6 || inputTypeID == 9 || inputTypeID == 10 ||
                             inputTypeID == 11 || inputTypeID == 12)
                    {
                        if (formValidation.ValidateValue(attribName, validationTypeID, attribValue))
                        {
                            categoryAttribute.InputTypeID = inputTypeID;
                            categoryAttribute.ValidationTypeID = validationTypeID;
                            categoryAttribute.OPTIONValues = attribValue;
                        }
                        else
                        {
                            isFormValid = false;
                            break;
                        }
                    }
                    else if (inputTypeID == 7)
                    {
                        if (formValidation.ValidateValue(attribName, validationTypeID, attribValue))
                        {
                            categoryAttribute.InputTypeID = inputTypeID;
                            categoryAttribute.ValidationTypeID = validationTypeID;
                            categoryAttribute.DECIMALValue = decimal.Parse(attribValue);
                        }
                        else
                        {
                            isFormValid = false;
                            break;
                        }
                    }
                    else if (inputTypeID == 8)
                    {
                        if (_imageCounterFirst % 2 == 0)
                        {
                            toInsertIntoDB = false;
                            if (!string.IsNullOrEmpty(attribValue) && attribValue.ToLower() != "undefined")
                            {
                                if (formValidation.ValidateValue(attribName, validationTypeID, attribValue))
                                {
                                    _imageVar = attribValue;
                                }
                                else
                                {

                                    isFormValid = false;
                                    break;
                                }
                            }
                            else
                            {
                                _imageVar = "";
                            }
                        }
                        else
                        {
                            toInsertIntoDB = true;

                            categoryAttribute.InputTypeID = inputTypeID;
                            categoryAttribute.ValidationTypeID = validationTypeID;
                            //_imageVar = _imageVar.Replace("../", "");

                            if (attribValue != _imageVar)
                            {
                                _imageVar = _imageVar.Replace("/", "\\");
                                //attribValue = attribValue.Replace("../", "");
                                attribValue = attribValue.Replace("/", "\\");

                                string tempFolder = @"Upload\temp";
                                FileHelperController fileObj = new FileHelperController();
                                attribValue = fileObj.MoveFileToModuleFolder(tempFolder, attribValue, _imageVar,categoryLargeThumbImage,categoryMediumThumbImage,categorySmallThumbImage,
                                                                             @"Modules\ASPXCommerce\ASPXCategoryManagement\uploads\",
                                                                             categoryID, "cat_");
                                categoryAttribute.FILEValue = attribValue;
                            }
                            //else if (_imageVar == "")
                            //{
                            //    categoryAttribute.FILEValue = _imageVar;
                            //}
                            else
                            {
                                categoryAttribute.FILEValue = attribValue;
                            }
                        }
                        _imageCounterFirst++;
                    }
                    if (toInsertIntoDB)
                    {
                        listCategoryAttributes.Add(categoryAttribute);
                    }
                }

                if (isFormValid)
                {
                    CategorySqlProvider categorySqlProvider = new CategorySqlProvider();
                    categoryInfo = categorySqlProvider.CategoryAddUpdate(categoryInfo, selectedItems, listCategoryAttributes, userName, culture);
                }
                else
                {
                    throw new Exception("Form is not valid one");
                }
                return categoryInfo;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
    public List<CardTypeInfo> AddUpdateCardType(int StoreID, int PortalID, string CultureName, string UserName, int CardTypeID, string CardTypeName, bool IsActive, string NewFilePath, string PrevFilePath, string AlternateText)
    {

        FileHelperController imageObj = new FileHelperController();
        string uploadedFile = string.Empty;

        if (NewFilePath != "" && PrevFilePath != NewFilePath)
        {
            string tempFolder = @"Upload\temp";
            uploadedFile = imageObj.MoveFileToSpecificFolder(tempFolder, PrevFilePath, NewFilePath, @"Modules\ASPXCommerce\ASPXCardTypeManagement\uploads\", CardTypeID, "cardType_");

        }
        else
        {
            uploadedFile = PrevFilePath;
        }
        try
        {
            List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();

            parameter.Add(new KeyValuePair<string, object>("@StoreID", StoreID));
            parameter.Add(new KeyValuePair<string, object>("@PortalID", PortalID));
            parameter.Add(new KeyValuePair<string, object>("@CultureName", CultureName));
            parameter.Add(new KeyValuePair<string, object>("@UserName", UserName));
            parameter.Add(new KeyValuePair<string, object>("@CardTypeID", CardTypeID));
            parameter.Add(new KeyValuePair<string, object>("@CardTypeName", CardTypeName));
            parameter.Add(new KeyValuePair<string, object>("@ImagePath", uploadedFile));
            parameter.Add(new KeyValuePair<string, object>("@AlternateText", AlternateText));

            parameter.Add(new KeyValuePair<string, object>("@IsActive", IsActive));

            SQLHandler sqlH = new SQLHandler();
            return sqlH.ExecuteAsList<CardTypeInfo>("[dbo].[usp_ASPX_AddUpdateCardType]", parameter);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Ejemplo n.º 4
0
    public void SaveItemAndAttributes(int itemID, int itemTypeID, int attributeSetID, int storeID, int portalID, string userName, string culture, int taxRuleID, string categoriesIds, string relatedItemsIds, string upSellItemsIds, string crossSellItemsIds, string downloadItemsValue, string sourceFileCol, string dataCollection, ASPXNameValue[] formVars)
    {
        try
        {
           string uplodedDownlodableFormValue = string.Empty;

            if (itemTypeID == 2 && downloadItemsValue != "")
            {
                FileHelperController downLoadableObj = new FileHelperController();
                string tempFolder = @"Upload\temp";
                uplodedDownlodableFormValue = downLoadableObj.MoveFileToDownlodableItemFolder(tempFolder,
                                                                                              downloadItemsValue,
                                                                                              @"Modules/ASPXCommerce/ASPXItemsManagement/DownloadableItems/",
                                                                                              itemID, "item_");
            }

            ItemsController itemController = new ItemsController();
            itemID = itemController.SaveUpdateItemAndAttributes(itemID, itemTypeID, attributeSetID, storeID, portalID,
                                                                userName, culture, taxRuleID,
                                                                categoriesIds, relatedItemsIds, upSellItemsIds,
                                                                crossSellItemsIds, uplodedDownlodableFormValue,
                                                                formVars);
            //return "({\"returnStatus\":1,\"Message\":'Item saved successfully.'})";
            if (itemID > 0 && sourceFileCol != "" && dataCollection != "")
            {
                int itemLargeThumbNailSize = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.ItemLargeThumbnailImageSize, storeID,
                                                                                                portalID, culture));
                int itemMediumThumbNailSize = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.ItemMediumThumbnailImageSize,
                                                                                                     storeID, portalID, culture));
                int itemSmallThumbNailSize = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.ItemSmallThumbnailImageSize, storeID,
                                                                                                    portalID, culture));
            
                dataCollection = dataCollection.Replace("../", "");
                SaveImageContents(itemID, @"Modules/ASPXCommerce/ASPXItemsManagement/uploads/", sourceFileCol,
                                  dataCollection, itemLargeThumbNailSize, itemMediumThumbNailSize,
                                  itemSmallThumbNailSize, "item_");
            }
            else if (itemID > 0 && sourceFileCol == "" && dataCollection == "")
            {
                DeleteImageContents(itemID);
            }

            //if (itemID==0)
            //{
            //    //SaveImageContents(itemID, @"Modules/ASPXCommerce/ASPXItemsManagement/uploads/", sourceFileCol, dataCollection, "item_");
            //    //TODO:: DELTE UPLOADED FILE FROM DOWNLOAD FOLDER

            //}
        }
        catch (Exception ex)
        {
            throw ex;
            //ErrorHandler errHandler = new ErrorHandler();
            //if (errHandler.LogWCFException(ex))
            //{
            //    return "({\"returnStatus\":-1,\"errorMessage\":'" + ex.Message + "'})";
            //}
            //else
            //{
            //    return "({\"returnStatus\":-1,\"errorMessage\":'Error while saving item!'})";
            //}
        }
    }
Ejemplo n.º 5
0
    public void UpdateStoreSettings(string settingKeys, string settingValues, string prevFilePath, string newFilePath, int storeID, int portalID, string cultureName)
    {

        try
        {
            FileHelperController fileObj = new FileHelperController();
            string uplodedValue = string.Empty;
            if (newFilePath != null && prevFilePath != newFilePath)
            {
                string tempFolder = @"Upload\temp";
                uplodedValue = fileObj.MoveFileToSpecificFolder(tempFolder, prevFilePath, newFilePath, @"Modules\ASPXCommerce\ASPXStoreSettingsManagement\uploads\", storeID, "store_");
            }
            else
            {
                uplodedValue = prevFilePath;
            }
            settingKeys = "DefaultProductImageURL" + '*' + settingKeys;
            settingValues = uplodedValue + '*' + settingValues;

            List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
            parameter.Add(new KeyValuePair<string, object>("@SettingKeys", settingKeys));
            parameter.Add(new KeyValuePair<string, object>("@SettingValues", settingValues));
            parameter.Add(new KeyValuePair<string, object>("@StoreID", storeID));
            parameter.Add(new KeyValuePair<string, object>("@PortalID", portalID));
            parameter.Add(new KeyValuePair<string, object>("@CultureName", cultureName));
            SQLHandler sqLh = new SQLHandler();
            sqLh.ExecuteNonQuery("usp_ASPX_GetStoreSettingsUpdate", parameter);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Ejemplo n.º 6
0
 public void SaveAndUpdateShippingMethods(int shippingMethodID, string shippingMethodName, string prevFilePath, string newFilePath, string alternateText, int displayOrder, string deliveryTime,
         decimal weightLimitFrom, decimal weightLimitTo, int shippingProviderID, int storeID, int portalID, bool isActive, string userName, string cultureName)
 {
     try
     {
         FileHelperController fileObj = new FileHelperController();
         string uplodedValue = string.Empty;
         if (newFilePath != null && prevFilePath != newFilePath)
         {
             string tempFolder = @"Upload\temp";
             uplodedValue = fileObj.MoveFileToSpecificFolder(tempFolder, prevFilePath, newFilePath, @"Modules\ASPXCommerce\ASPXShippingManagement\uploads\", shippingMethodID, "ship_");
         }
         else
         {
             uplodedValue = prevFilePath;
         }
         ShippingMethodSqlProvider obj = new ShippingMethodSqlProvider();
         obj.SaveAndUpdateShippings(shippingMethodID, shippingMethodName, uplodedValue, alternateText, displayOrder, deliveryTime, weightLimitFrom, weightLimitTo, shippingProviderID, storeID, portalID, isActive, userName, cultureName);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 7
0
        public int SaveUpdateItemAndAttributes(int itemID, int itemTypeID, int attributeSetID, int storeID, int portalID, string userName, string culture, int taxClassID, string categoriesIDs, string relatedItemsIDs, string upSellItemsIDs, string crossSellItemsIDs, string downloadItemsValue, ASPXNameValue[] formVars)
        {
            bool isModified = false;
            bool updateFlag = false;
            if (itemID > 0)
            {
                isModified = true;
                updateFlag = true;
            }
            int itemLargeThumbNailSize = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.ItemLargeThumbnailImageSize, storeID,
                                                                                                portalID, culture));
            int itemMediumThumbNailSize = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.ItemMediumThumbnailImageSize,
                                                                                                 storeID, portalID, culture));
            int itemSmallThumbNailSize = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.ItemSmallThumbnailImageSize, storeID,
                                                                                                portalID, culture));
            int _attributeID = 0;
            int _inputTypeID = 0;
            int _ValidationTypeID = 8;
            int _attributeSetGroupID = 0;
            bool _isIncludeInPriceRule = false;
            bool _isIncludeInPromotions = false;
            int _displayOrder = 0;

            string sku = "";
            string activeFrom = "";
            string activeTo = "";
            string hidePrice = "";
            string isHideInRSS = "";
            string isHideToAnonymous = "";

            bool toInsertIntoDB = true;
            bool isFormValid = true;
            string _imageVar = string.Empty;
            int _imageCounterFirst = 0;

            ItemsManagementSqlProvider obj = new ItemsManagementSqlProvider();

            for (int i = 0; i < formVars.Length; i++)
            {
                string attribValue = formVars[i].value;
                //string jsonResult = formVars[i].name.Replace('%', '_');
                string jsonResult = formVars[i].name.Replace('-', ' ');
                string[] jsonVar = jsonResult.Split('_');
                FormValidation formValidation = new FormValidation();

                if (jsonVar.Length > 1)
                {
                    _attributeID = Int32.Parse(jsonVar[0]);
                    _inputTypeID = Int32.Parse(jsonVar[1]);
                    _ValidationTypeID = Int32.Parse(jsonVar[2]);
                    _attributeSetGroupID = Int32.Parse(jsonVar[4]);
                    _isIncludeInPriceRule = bool.Parse(jsonVar[5]);
                    _isIncludeInPromotions = bool.Parse(jsonVar[6]);
                    _displayOrder = Int32.Parse(jsonVar[7]);

                    //Save To Database 1. [aspx_Items] 2. Others 
                    if (_attributeID == 4)
                    {
                        sku = formVars[i].value;
                    }
                    else if (_attributeID == 22)
                    {
                        activeFrom = formVars[i].value;
                    }
                    else if (_attributeID == 23)
                    {
                        activeTo = formVars[i].value;
                    }
                    else if (_attributeID == 26)
                    {
                        hidePrice = formVars[i].value;
                    }
                    else if (_attributeID == 27)
                    {
                        isHideInRSS = formVars[i].value;
                    }
                    else if (_attributeID == 28)
                    {
                        isHideToAnonymous = formVars[i].value;
                    }


                    if (itemID == 0 && updateFlag == false)
                    {
                        itemID = obj.AddItem(itemID, itemTypeID, attributeSetID, taxClassID, storeID, portalID, userName, culture, true, isModified,
                            sku, activeFrom, activeTo, hidePrice, isHideInRSS, isHideToAnonymous, categoriesIDs, relatedItemsIDs, upSellItemsIDs, crossSellItemsIDs, downloadItemsValue, updateFlag);
                    }
                    else if (itemID > 0 && i == formVars.Length - 1)
                    {
                        itemID = obj.AddItem(itemID, itemTypeID, attributeSetID, taxClassID, storeID, portalID, userName, culture, true, isModified,
                            sku, activeFrom, activeTo, hidePrice, isHideInRSS, isHideToAnonymous, categoriesIDs, relatedItemsIDs, upSellItemsIDs, crossSellItemsIDs, downloadItemsValue, updateFlag);
                    }

                    if (itemID > 0)
                    {
                        if (_inputTypeID == 1)
                        {
                            if (_ValidationTypeID == 3)
                            {
                                if (formValidation.ValidateValue(formVars[i].name, _ValidationTypeID, formVars[i].value))
                                {
                                    attribValue = formVars[i].value;
                                }
                                else
                                {
                                    isFormValid = false;
                                    break;
                                }
                            }
                            else if (_ValidationTypeID == 5)
                            {
                                if (formValidation.ValidateValue(formVars[i].name, _ValidationTypeID, formVars[i].value))
                                {
                                    attribValue = formVars[i].value;
                                }
                                else
                                {
                                    isFormValid = false;
                                    break;
                                }
                            }
                            else
                            {
                                if (formValidation.ValidateValue(formVars[i].name, _ValidationTypeID, formVars[i].value))
                                {
                                    attribValue = formVars[i].value;
                                }
                                else
                                {
                                    isFormValid = false;
                                    break;
                                }
                            }
                        }
                        else if (_inputTypeID == 2)
                        {
                            if (formValidation.ValidateValue(formVars[i].name, _ValidationTypeID, formVars[i].value))
                            {
                                attribValue = formVars[i].value;
                            }
                            else
                            {
                                isFormValid = false;
                                break;
                            }
                        }
                        else if (_inputTypeID == 3)
                        {
                            if (formValidation.ValidateValue(formVars[i].name, _ValidationTypeID, formVars[i].value))
                            {
                                if (!string.IsNullOrEmpty(formVars[i].value))
                                {
                                    attribValue = formVars[i].value;
                                }
                            }
                            else
                            {
                                isFormValid = false;
                                break;
                            }
                        }
                        else if (_inputTypeID == 4)
                        {
                            if (formValidation.ValidateValue(formVars[i].name, _ValidationTypeID, formVars[i].value))
                            {
                                if (!string.IsNullOrEmpty(formVars[i].value))
                                {
                                    attribValue = formVars[i].value;
                                }
                            }
                            else
                            {
                                isFormValid = false;
                                break;
                            }
                        }
                        else if (_inputTypeID == 5 || _inputTypeID == 6 || _inputTypeID == 9 || _inputTypeID == 10 ||
                                 _inputTypeID == 11 || _inputTypeID == 12)
                        {
                            if (formValidation.ValidateValue(formVars[i].name, _ValidationTypeID, formVars[i].value))
                            {
                                attribValue = formVars[i].value;
                            }
                            else
                            {
                                isFormValid = false;
                                break;
                            }
                        }
                        else if (_inputTypeID == 7)
                        {
                            if (formValidation.ValidateValue(formVars[i].name, _ValidationTypeID, formVars[i].value))
                            {
                                attribValue = formVars[i].value;
                            }
                            else
                            {
                                isFormValid = false;
                                break;
                            }
                        }

                        else if (_inputTypeID == 8)
                        {
                            if (_imageCounterFirst % 2 == 0)
                            {
                                toInsertIntoDB = false;
                                if (!string.IsNullOrEmpty(formVars[i].value) && formVars[i].value.ToLower() != "undefined")
                                {
                                    if (formValidation.ValidateValue(formVars[i].name, _ValidationTypeID, formVars[i].value))
                                    {
                                        _imageVar = attribValue;
                                    }
                                    else
                                    {
                                        isFormValid = false;
                                        break;
                                    }
                                }
                                else
                                {
                                    _imageVar = "";
                                }
                            }
                            else
                            {
                                toInsertIntoDB = true;

                                if (attribValue != _imageVar)
                                {
                                    //_imageVar = _imageVar.Replace("../", "");
                                    _imageVar = _imageVar.Replace("/", "\\");
                                    //attribValue = attribValue.Replace("../", "");
                                    attribValue = attribValue.Replace("/", "\\");

                                    string tempFolder = @"Upload\temp";
                                    FileHelperController fileObj = new FileHelperController();
                                    attribValue = fileObj.MoveFileToModuleFolder(tempFolder, attribValue, _imageVar, itemLargeThumbNailSize, itemMediumThumbNailSize,  itemSmallThumbNailSize, @"Modules\ASPXCommerce\ASPXItemsManagement\uploads\", itemID, "item_");
                                }
                            }
                            _imageCounterFirst++;
                        }
                    }
                    if (isFormValid && toInsertIntoDB)
                    {
                        obj.SaveUpdateItemAttributes(itemID, attributeSetID, storeID, portalID, userName, culture, true, isModified, attribValue,
                            _attributeID, _inputTypeID, _ValidationTypeID, _attributeSetGroupID, _isIncludeInPriceRule, _isIncludeInPromotions,
                            _displayOrder);
                    }
                }
            }
            return itemID;
        }