public int SaveUpdateAttributeSetInfo(int attributeSetId, int attributeSetBaseId, string attributeSetName, int storeId, int portalId, bool isActive, bool isModified, string userName, bool flag, string saveString) { try { AttributeSetInfo attributeSetInfoToInsert = new AttributeSetInfo { AttributeSetID = attributeSetId, AttributeSetBaseID = attributeSetBaseId, AttributeSetName = attributeSetName, StoreID = storeId, PortalID = portalId, IsActive = isActive, IsModified = isModified, UpdatedBy = userName, AddedBy = userName, Flag = flag, SaveString = saveString }; ItemAttributesManagementSqlProvider obj = new ItemAttributesManagementSqlProvider(); return obj.SaveUpdateAttributeSet(attributeSetInfoToInsert); } catch (Exception ex) { throw ex; } }
/// <summary> /// To Save Attribute Set /// </summary> /// <returns></returns> public int SaveUpdateAttributeSet(AttributeSetInfo attributeSetInfoToInsert) { try { List<KeyValuePair<string, object>> ParaMeterCollection = new List<KeyValuePair<string, object>>(); ParaMeterCollection.Add(new KeyValuePair<string, object>("@AttributeSetID", attributeSetInfoToInsert.AttributeSetID)); ParaMeterCollection.Add(new KeyValuePair<string, object>("@AttributeSetBaseID", attributeSetInfoToInsert.AttributeSetBaseID)); ParaMeterCollection.Add(new KeyValuePair<string, object>("@AttributeSetName", attributeSetInfoToInsert.AttributeSetName)); ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsActive", attributeSetInfoToInsert.IsActive)); ParaMeterCollection.Add(new KeyValuePair<string, object>("@IsModified", attributeSetInfoToInsert.IsModified)); ParaMeterCollection.Add(new KeyValuePair<string, object>("@StoreID", attributeSetInfoToInsert.StoreID)); ParaMeterCollection.Add(new KeyValuePair<string, object>("@PortalID", attributeSetInfoToInsert.PortalID)); ParaMeterCollection.Add(new KeyValuePair<string, object>("@UserName", attributeSetInfoToInsert.AddedBy)); ParaMeterCollection.Add(new KeyValuePair<string, object>("@UpdateFlag", attributeSetInfoToInsert.Flag)); ParaMeterCollection.Add(new KeyValuePair<string, object>("@SaveString", attributeSetInfoToInsert.SaveString)); SQLHandler Sq = new SQLHandler(); return Sq.ExecuteNonQuery("dbo.usp_ASPX_AttributeSetAddUpdate", ParaMeterCollection, "@AttributeSetIDOut"); } catch (Exception e) { throw e; } }