/// <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;
            }
        }
 public AttributeFormInfo SaveUpdateAttributeInfo(AttributesGetByAttributeIdInfo attributeInfo, AttributeConfig config)
 {
     try
     {
         return AspxItemAttrMgntController.SaveAttribute(attributeInfo, config);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemplo n.º 3
0
 public static AttributeFormInfo SaveAttribute(AttributesGetByAttributeIdInfo attributeToInsert, AttributeConfig config)
 {
     try
     {
         return(AspxItemAttrMgntProvider.SaveAttribute(attributeToInsert, config));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 public static AttributeFormInfo SaveAttribute(AttributesGetByAttributeIdInfo attributeToInsert, AttributeConfig config)
 {
     try
     {
       return  AspxItemAttrMgntProvider.SaveAttribute(attributeToInsert, config);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemplo n.º 5
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;
            }
        }