internal static void AddProductFeature(int featureId, int productId, int productFeatureValue)
{
using (SqlConnection sqlConnection = new SqlConnection(CMSCoreBase.CMSCoreConnectionString))
{
SqlCommand sqlCommand = new SqlCommand(SN_PRODUCT_FEATURE_ADD, sqlConnection);
sqlCommand.CommandType = System.Data.CommandType.StoredProcedure;
SqlParameter sqlParameter = null;
sqlParameter = new SqlParameter(PN_FEATURE_ID, System.Data.SqlDbType.Int);
sqlParameter.Direction = System.Data.ParameterDirection.Input;
sqlParameter.Value = featureId;
sqlCommand.Parameters.Add(sqlParameter);
sqlParameter = new SqlParameter(ProductDataMapper.PN_PRODUCT_ID, System.Data.SqlDbType.Int);
sqlParameter.Direction = System.Data.ParameterDirection.Input;
sqlParameter.Value = productId;
sqlCommand.Parameters.Add(sqlParameter);
sqlParameter = new SqlParameter(PN_PRODUCT_FEATURE_VALUE, System.Data.SqlDbType.Int);
sqlParameter.Direction = System.Data.ParameterDirection.Input;
sqlParameter.Value = productFeatureValue;
sqlCommand.Parameters.Add(sqlParameter);
try
{
sqlCommand.Connection.Open();
sqlCommand.ExecuteNonQuery();
sqlCommand.Connection.Close();
}
catch (Exception ex)
{
throw ex;
}
}
}