public static void InsertNewBrand(string prevFilePath, AspxCommonInfo aspxCommonObj, BrandInfo brandInsertObj, string imagePath) { try { AspxBrandProvider.InsertNewBrand(prevFilePath, aspxCommonObj, brandInsertObj, imagePath); } catch (Exception e) { throw e; } }
public static void InsertNewBrand(string prevFilePath, AspxCommonInfo aspxCommonObj, BrandInfo brandInsertObj, string imagePath) { try { List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj); parameter.Add(new KeyValuePair<string, object>("@BrandID", brandInsertObj.BrandID)); parameter.Add(new KeyValuePair<string, object>("@BrandName", brandInsertObj.BrandName)); parameter.Add(new KeyValuePair<string, object>("@Branddescription", brandInsertObj.BrandDescription)); parameter.Add(new KeyValuePair<string, object>("@BrandImgUrl", imagePath)); parameter.Add(new KeyValuePair<string, object>("@isShowInSlider", brandInsertObj.IsShowInSlider)); parameter.Add(new KeyValuePair<string, object>("@IsFeatured", brandInsertObj.IsFeatured)); parameter.Add(new KeyValuePair<string, object>("@FeaturedFrom", brandInsertObj.FeaturedFrom)); parameter.Add(new KeyValuePair<string, object>("@FeaturedTo", brandInsertObj.FeaturedTo)); SQLHandler sqLh = new SQLHandler(); sqLh.ExecuteNonQuery("usp_Aspx_InsertAndUpdateBrand", parameter); } catch (Exception e) { throw e; } }
public void InsertNewBrand(string prevFilePath, AspxCommonInfo aspxCommonObj, BrandInfo brandInsertObj) { try { FileHelperController fileObj = new FileHelperController(); string uplodedValue = string.Empty; string imagePath; if (brandInsertObj.BrandImageUrl != null && prevFilePath != brandInsertObj.BrandImageUrl) { string tempFolder = @"Upload\temp"; uplodedValue = fileObj.MoveFileToSpecificFolder(tempFolder, prevFilePath, brandInsertObj.BrandImageUrl, @"Modules\AspxCommerce\AspxBrandManagement\uploads\", aspxCommonObj.StoreID, aspxCommonObj, "store_"); } imagePath = uplodedValue.Length > 0 ? uplodedValue : ""; AspxBrandController.InsertNewBrand(prevFilePath, aspxCommonObj, brandInsertObj, imagePath); } catch (Exception e) { throw e; } }