コード例 #1
0
 /// <summary>
 /// To Save Attribute
 /// </summary>
 /// <returns></returns>
 public static void SaveAttribute(AttributesGetByAttributeIdInfo attributeToInsert)
 {
     try
     {
         AspxItemAttrMgntProvider.SaveAttribute(attributeToInsert);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #2
0
 public static AttributeFormInfo SaveAttribute(AttributesGetByAttributeIdInfo attributeToInsert, AttributeConfig config)
 {
     try
     {
         return(AspxItemAttrMgntProvider.SaveAttribute(attributeToInsert, config));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #3
0
        /// <summary>
        /// To Save Attribute
        /// </summary>
        /// <returns></returns>
        public static AttributeFormInfo SaveAttribute(AttributesGetByAttributeIdInfo attributeToInsert, AttributeConfig config)
        {
            try
            {
                List <KeyValuePair <string, object> > parameterCollection = new List <KeyValuePair <string, object> >();
                parameterCollection.Add(new KeyValuePair <string, object>("AttributeID", attributeToInsert.AttributeID));
                parameterCollection.Add(new KeyValuePair <string, object>("AttributeName", attributeToInsert.AttributeName));
                parameterCollection.Add(new KeyValuePair <string, object>("InputTypeID", attributeToInsert.InputTypeID));

                parameterCollection.Add(new KeyValuePair <string, object>("DefaultValue", attributeToInsert.DefaultValue));
                parameterCollection.Add(new KeyValuePair <string, object>("Length", attributeToInsert.Length));
                parameterCollection.Add(new KeyValuePair <string, object>("AliasName", attributeToInsert.AliasName));
                parameterCollection.Add(new KeyValuePair <string, object>("AliasToolTip", attributeToInsert.AliasToolTip));
                parameterCollection.Add(new KeyValuePair <string, object>("AliasHelp", attributeToInsert.AliasHelp));
                parameterCollection.Add(new KeyValuePair <string, object>("DisplayOrder", attributeToInsert.DisplayOrder));

                parameterCollection.Add(new KeyValuePair <string, object>("IsUnique", attributeToInsert.IsUnique));
                parameterCollection.Add(new KeyValuePair <string, object>("IsRequired", attributeToInsert.IsRequired));
                parameterCollection.Add(new KeyValuePair <string, object>("ShowInAdvanceSearch", attributeToInsert.ShowInAdvanceSearch));
                parameterCollection.Add(new KeyValuePair <string, object>("ShowInComparison", attributeToInsert.ShowInComparison));
                parameterCollection.Add(new KeyValuePair <string, object>("IsIncludeInPriceRule", attributeToInsert.IsIncludeInPriceRule));
                parameterCollection.Add(new KeyValuePair <string, object>("IsEnableEditor", attributeToInsert.IsEnableEditor));
                parameterCollection.Add(new KeyValuePair <string, object>("IsShowInItemDetail", attributeToInsert.IsShowInItemDetail));
                parameterCollection.Add(new KeyValuePair <string, object>("IsShowInItemListing", attributeToInsert.IsShowInItemListing));


                parameterCollection.Add(new KeyValuePair <string, object>("IsUseInFilter", attributeToInsert.IsUseInFilter));
                parameterCollection.Add(new KeyValuePair <string, object>("IsActive", attributeToInsert.IsActive));
                parameterCollection.Add(new KeyValuePair <string, object>("IsModified", attributeToInsert.IsModified));
                parameterCollection.Add(new KeyValuePair <string, object>("ValidationTypeID", attributeToInsert.ValidationTypeID));

                parameterCollection.Add(new KeyValuePair <string, object>("StoreID", attributeToInsert.StoreID));
                parameterCollection.Add(new KeyValuePair <string, object>("PortalID", attributeToInsert.PortalID));
                parameterCollection.Add(new KeyValuePair <string, object>("UserName", attributeToInsert.AddedBy));
                parameterCollection.Add(new KeyValuePair <string, object>("CultureName", attributeToInsert.CultureName));

                parameterCollection.Add(new KeyValuePair <string, object>("ItemTypes", attributeToInsert.ItemTypes));
                parameterCollection.Add(new KeyValuePair <string, object>("UpdateFlag", attributeToInsert.Flag));
                parameterCollection.Add(new KeyValuePair <string, object>("IsUsedInConfigItem", attributeToInsert.IsUsedInConfigItem));
                parameterCollection.Add(new KeyValuePair <string, object>("SaveOptions", attributeToInsert.SaveOptions));
                parameterCollection.Add(new KeyValuePair <string, object>("attrValId", attributeToInsert.AttributeValueID));

                //config
                parameterCollection.Add(new KeyValuePair <string, object>("GroupID", config.GroupID));
                parameterCollection.Add(new KeyValuePair <string, object>("AttributeSetID", config.AttributeSetID));
                OracleHandler sqlH = new OracleHandler();
                return(sqlH.ExecuteAsObject <AttributeFormInfo>("usp_Aspx_AttributeAddOnTime", parameterCollection));
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        /// <summary>
        /// To Save Attribute
        /// </summary>
        /// <returns></returns>
        public void SaveAttribute(AttributesGetByAttributeIdInfo attributeToInsert)
        {
            try
            {
                List <KeyValuePair <string, object> > parameterCollection = new List <KeyValuePair <string, object> >();
                parameterCollection.Add(new KeyValuePair <string, object>("@AttributeID", attributeToInsert.AttributeID));
                parameterCollection.Add(new KeyValuePair <string, object>("@AttributeName", attributeToInsert.AttributeName));
                parameterCollection.Add(new KeyValuePair <string, object>("@InputTypeID", attributeToInsert.InputTypeID));

                parameterCollection.Add(new KeyValuePair <string, object>("@DefaultValue", attributeToInsert.DefaultValue));
                parameterCollection.Add(new KeyValuePair <string, object>("@Length", attributeToInsert.Length));
                parameterCollection.Add(new KeyValuePair <string, object>("@AliasName", attributeToInsert.AliasName));
                parameterCollection.Add(new KeyValuePair <string, object>("@AliasToolTip", attributeToInsert.AliasToolTip));
                parameterCollection.Add(new KeyValuePair <string, object>("@AliasHelp", attributeToInsert.AliasHelp));
                parameterCollection.Add(new KeyValuePair <string, object>("@DisplayOrder", attributeToInsert.DisplayOrder));

                parameterCollection.Add(new KeyValuePair <string, object>("@IsUnique", attributeToInsert.IsUnique));
                parameterCollection.Add(new KeyValuePair <string, object>("@IsRequired", attributeToInsert.IsRequired));
                parameterCollection.Add(new KeyValuePair <string, object>("@ShowInAdvanceSearch", attributeToInsert.ShowInAdvanceSearch));
                parameterCollection.Add(new KeyValuePair <string, object>("@ShowInComparison", attributeToInsert.ShowInComparison));
                parameterCollection.Add(new KeyValuePair <string, object>("@IsIncludeInPriceRule", attributeToInsert.IsIncludeInPriceRule));
                parameterCollection.Add(new KeyValuePair <string, object>("@IsIncludeInPromotions", attributeToInsert.IsIncludeInPromotions));
                parameterCollection.Add(new KeyValuePair <string, object>("@IsEnableEditor", attributeToInsert.IsEnableEditor));
                parameterCollection.Add(new KeyValuePair <string, object>("@ShowInSearch", attributeToInsert.ShowInSearch));
                parameterCollection.Add(new KeyValuePair <string, object>("@ShowInGrid", attributeToInsert.ShowInGrid));

                parameterCollection.Add(new KeyValuePair <string, object>("@IsEnableSorting", attributeToInsert.IsEnableSorting));
                parameterCollection.Add(new KeyValuePair <string, object>("@IsUseInFilter", attributeToInsert.IsUseInFilter));
                parameterCollection.Add(new KeyValuePair <string, object>("@IsShownInRating", attributeToInsert.IsShownInRating));
                parameterCollection.Add(new KeyValuePair <string, object>("@IsActive", attributeToInsert.IsActive));
                parameterCollection.Add(new KeyValuePair <string, object>("@IsModified", attributeToInsert.IsModified));
                parameterCollection.Add(new KeyValuePair <string, object>("@ValidationTypeID", attributeToInsert.ValidationTypeID));

                parameterCollection.Add(new KeyValuePair <string, object>("@StoreID", attributeToInsert.StoreID));
                parameterCollection.Add(new KeyValuePair <string, object>("@PortalID", attributeToInsert.PortalID));
                parameterCollection.Add(new KeyValuePair <string, object>("@UserName", attributeToInsert.AddedBy));
                parameterCollection.Add(new KeyValuePair <string, object>("@CultureName", attributeToInsert.CultureName));

                parameterCollection.Add(new KeyValuePair <string, object>("@ItemTypes", attributeToInsert.ItemTypes));
                parameterCollection.Add(new KeyValuePair <string, object>("@UpdateFlag", attributeToInsert.Flag));
                parameterCollection.Add(new KeyValuePair <string, object>("@IsUsedInConfigItem", attributeToInsert.IsUsedInConfigItem));
                parameterCollection.Add(new KeyValuePair <string, object>("@SaveOptions", attributeToInsert.SaveOptions));
                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery("dbo.usp_Aspx_AttributeAddUpdate", parameterCollection);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
コード例 #5
0
 public void SaveUpdateAttributeInfo(AttributesGetByAttributeIdInfo attributeInfo)
 {
     try
     {
         AttributesGetByAttributeIdInfo attributeInfoToInsert = attributeInfo;
         ItemAttributesManagementSqlProvider obj = new ItemAttributesManagementSqlProvider();
         obj.SaveAttribute(attributeInfoToInsert);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #6
0
        /// <summary>
        /// To Save Attribute 
        /// </summary>
        /// <returns></returns>
        public void SaveAttribute(AttributesGetByAttributeIdInfo attributeToInsert)
        {
            try
            {
                List<KeyValuePair<string, object>> parameterCollection = new List<KeyValuePair<string, object>>();
                parameterCollection.Add(new KeyValuePair<string, object>("@AttributeID", attributeToInsert.AttributeID));
                parameterCollection.Add(new KeyValuePair<string, object>("@AttributeName", attributeToInsert.AttributeName));
                parameterCollection.Add(new KeyValuePair<string, object>("@InputTypeID", attributeToInsert.InputTypeID));

                parameterCollection.Add(new KeyValuePair<string, object>("@DefaultValue", attributeToInsert.DefaultValue));
                parameterCollection.Add(new KeyValuePair<string, object>("@Length", attributeToInsert.Length));
                parameterCollection.Add(new KeyValuePair<string, object>("@AliasName", attributeToInsert.AliasName));
                parameterCollection.Add(new KeyValuePair<string, object>("@AliasToolTip", attributeToInsert.AliasToolTip));
                parameterCollection.Add(new KeyValuePair<string, object>("@AliasHelp", attributeToInsert.AliasHelp));
                parameterCollection.Add(new KeyValuePair<string, object>("@DisplayOrder", attributeToInsert.DisplayOrder));

                parameterCollection.Add(new KeyValuePair<string, object>("@IsUnique", attributeToInsert.IsUnique));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsRequired", attributeToInsert.IsRequired));
                parameterCollection.Add(new KeyValuePair<string, object>("@ShowInAdvanceSearch", attributeToInsert.ShowInAdvanceSearch));
                parameterCollection.Add(new KeyValuePair<string, object>("@ShowInComparison", attributeToInsert.ShowInComparison));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsIncludeInPriceRule", attributeToInsert.IsIncludeInPriceRule));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsIncludeInPromotions", attributeToInsert.IsIncludeInPromotions));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsEnableEditor", attributeToInsert.IsEnableEditor));
                parameterCollection.Add(new KeyValuePair<string, object>("@ShowInSearch", attributeToInsert.ShowInSearch));
                parameterCollection.Add(new KeyValuePair<string, object>("@ShowInGrid", attributeToInsert.ShowInGrid));

                parameterCollection.Add(new KeyValuePair<string, object>("@IsEnableSorting", attributeToInsert.IsEnableSorting));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsUseInFilter", attributeToInsert.IsUseInFilter));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsShownInRating", attributeToInsert.IsShownInRating));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsActive", attributeToInsert.IsActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsModified", attributeToInsert.IsModified));
                parameterCollection.Add(new KeyValuePair<string, object>("@ValidationTypeID", attributeToInsert.ValidationTypeID));

                parameterCollection.Add(new KeyValuePair<string, object>("@StoreID", attributeToInsert.StoreID));
                parameterCollection.Add(new KeyValuePair<string, object>("@PortalID", attributeToInsert.PortalID));
                parameterCollection.Add(new KeyValuePair<string, object>("@UserName", attributeToInsert.AddedBy));
                parameterCollection.Add(new KeyValuePair<string, object>("@CultureName", attributeToInsert.CultureName));

                parameterCollection.Add(new KeyValuePair<string, object>("@ItemTypes", attributeToInsert.ItemTypes));
                parameterCollection.Add(new KeyValuePair<string, object>("@UpdateFlag", attributeToInsert.Flag));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsUsedInConfigItem", attributeToInsert.IsUsedInConfigItem));
                parameterCollection.Add(new KeyValuePair<string, object>("@SaveOptions", attributeToInsert.SaveOptions));
                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery("dbo.usp_Aspx_AttributeAddUpdate", parameterCollection);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
コード例 #7
0
        /// <summary>
        /// To Save Attribute 
        /// </summary>
        /// <returns></returns>
        public static AttributeFormInfo SaveAttribute(AttributesGetByAttributeIdInfo attributeToInsert, AttributeConfig config)
        {
            try
            {
                List<KeyValuePair<string, object>> parameterCollection = new List<KeyValuePair<string, object>>();
                parameterCollection.Add(new KeyValuePair<string, object>("@AttributeID", attributeToInsert.AttributeID));
                parameterCollection.Add(new KeyValuePair<string, object>("@AttributeName", attributeToInsert.AttributeName));
                parameterCollection.Add(new KeyValuePair<string, object>("@InputTypeID", attributeToInsert.InputTypeID));

                parameterCollection.Add(new KeyValuePair<string, object>("@DefaultValue", attributeToInsert.DefaultValue));
                parameterCollection.Add(new KeyValuePair<string, object>("@Length", attributeToInsert.Length));
                parameterCollection.Add(new KeyValuePair<string, object>("@AliasName", attributeToInsert.AliasName));
                parameterCollection.Add(new KeyValuePair<string, object>("@AliasToolTip", attributeToInsert.AliasToolTip));
                parameterCollection.Add(new KeyValuePair<string, object>("@AliasHelp", attributeToInsert.AliasHelp));
                parameterCollection.Add(new KeyValuePair<string, object>("@DisplayOrder", attributeToInsert.DisplayOrder));

                parameterCollection.Add(new KeyValuePair<string, object>("@IsUnique", attributeToInsert.IsUnique));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsRequired", attributeToInsert.IsRequired));
                parameterCollection.Add(new KeyValuePair<string, object>("@ShowInAdvanceSearch", attributeToInsert.ShowInAdvanceSearch));
                parameterCollection.Add(new KeyValuePair<string, object>("@ShowInComparison", attributeToInsert.ShowInComparison));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsIncludeInPriceRule", attributeToInsert.IsIncludeInPriceRule));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsEnableEditor", attributeToInsert.IsEnableEditor));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsShowInItemDetail", attributeToInsert.IsShowInItemDetail));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsShowInItemListing", attributeToInsert.IsShowInItemListing));


                parameterCollection.Add(new KeyValuePair<string, object>("@IsUseInFilter", attributeToInsert.IsUseInFilter));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsActive", attributeToInsert.IsActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsModified", attributeToInsert.IsModified));
                parameterCollection.Add(new KeyValuePair<string, object>("@ValidationTypeID", attributeToInsert.ValidationTypeID));

                parameterCollection.Add(new KeyValuePair<string, object>("@StoreID", attributeToInsert.StoreID));
                parameterCollection.Add(new KeyValuePair<string, object>("@PortalID", attributeToInsert.PortalID));
                parameterCollection.Add(new KeyValuePair<string, object>("@UserName", attributeToInsert.AddedBy));
                parameterCollection.Add(new KeyValuePair<string, object>("@CultureName", attributeToInsert.CultureName));

                parameterCollection.Add(new KeyValuePair<string, object>("@ItemTypes", attributeToInsert.ItemTypes));
                parameterCollection.Add(new KeyValuePair<string, object>("@UpdateFlag", attributeToInsert.Flag));
                parameterCollection.Add(new KeyValuePair<string, object>("@IsUsedInConfigItem", attributeToInsert.IsUsedInConfigItem));
                parameterCollection.Add(new KeyValuePair<string, object>("@SaveOptions", attributeToInsert.SaveOptions));
                parameterCollection.Add(new KeyValuePair<string, object>("@attrValId", attributeToInsert.AttributeValueID));

                //config
                parameterCollection.Add(new KeyValuePair<string, object>("@GroupID", config.GroupID));
                parameterCollection.Add(new KeyValuePair<string, object>("@AttributeSetID", config.AttributeSetID));
                SQLHandler sqlH = new SQLHandler();
                return sqlH.ExecuteAsObject<AttributeFormInfo>("[dbo].[usp_Aspx_AttributeAddOnTime]", parameterCollection);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
コード例 #8
0
 public AttributeFormInfo SaveUpdateAttributeInfo(AttributesGetByAttributeIdInfo attributeInfo, AttributeConfig config)
 {
     try
     {
         return AspxItemAttrMgntController.SaveAttribute(attributeInfo, config);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #9
0
 public void SaveUpdateAttribute(AttributesGetByAttributeIdInfo attributeInfo)
 {
     try
     {
         AspxItemAttrMgntController.SaveAttribute(attributeInfo);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #10
0
 public static AttributeFormInfo SaveAttribute(AttributesGetByAttributeIdInfo attributeToInsert, AttributeConfig config)
 {
     try
     {
       return  AspxItemAttrMgntProvider.SaveAttribute(attributeToInsert, config);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #11
0
 /// <summary>
 /// To Save Attribute 
 /// </summary>
 /// <returns></returns>
 public static void SaveAttribute(AttributesGetByAttributeIdInfo attributeToInsert)
 {
     try
     {
         AspxItemAttrMgntProvider.SaveAttribute(attributeToInsert);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #12
0
 public void SaveUpdateAttributeInfo(int attributeId, string attributeName, int inputTypeID, string defaultValue, int validationTypeID,
     System.Nullable<int> length, string aliasName, string aliasToolTip, string aliasHelp, int displayOrder, bool isUnique, bool isRequired, bool isEnableEditor,
     bool showInGrid, bool showInSearch, bool showInAdvanceSearch, bool showInComparison, bool isIncludeInPriceRule,
     bool isIncludeInPromotions, bool isEnableSorting, bool isUseInFilter, bool isShownInRating, int storeId, int portalId,
     bool isActive, bool isModified, string userName, string cultureName, string itemTypes, bool flag, bool isUsedInConfigItem, string saveOptions)
 {
     try
     {
         AttributesGetByAttributeIdInfo attributeInfoToInsert = new AttributesGetByAttributeIdInfo
         {
             AttributeID = attributeId,
             AttributeName = attributeName,
             InputTypeID = inputTypeID,
             DefaultValue = defaultValue,
             ValidationTypeID = validationTypeID,
             Length = length > 0 ? length : null,
             AliasName = aliasName,
             AliasToolTip = aliasToolTip,
             AliasHelp = aliasHelp,
             DisplayOrder = displayOrder,
             IsUnique = isUnique,
             IsRequired = isRequired,
             IsEnableEditor = isEnableEditor,
             ShowInGrid = showInGrid,
             ShowInSearch = showInSearch,
             ShowInAdvanceSearch = showInAdvanceSearch,
             ShowInComparison = showInComparison,
             IsIncludeInPriceRule = isIncludeInPriceRule,
             IsIncludeInPromotions = isIncludeInPromotions,
             IsEnableSorting = isEnableSorting,
             IsUseInFilter = isUseInFilter,
             IsShownInRating = isShownInRating,
             StoreID = storeId,
             PortalID = portalId,
             IsActive = isActive,
             IsModified = isModified,
             UpdatedBy = userName,
             AddedBy = userName,
             CultureName = cultureName,
             ItemTypes = itemTypes,
             Flag = flag,
             IsUsedInConfigItem = isUsedInConfigItem,
             SaveOptions = saveOptions
         };
         ItemAttributesManagementSqlProvider obj = new ItemAttributesManagementSqlProvider();
         obj.SaveAttribute(attributeInfoToInsert);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }