AJH.CMS.Core.Data.FeatureDataMapper.DeleteProductFeature C# (CSharp) Method

DeleteProductFeature() static private method

static private DeleteProductFeature ( int featureId, int productId ) : void
featureId int
productId int
return void
        internal static void DeleteProductFeature(int featureId, int productId)
        {
            using (SqlConnection sqlConnection = new SqlConnection(CMSCoreBase.CMSCoreConnectionString))
            {
                SqlCommand sqlCommand = new SqlCommand(SN_PRODUCT_FEATURE_DELETE, 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);

                try
                {
                    sqlCommand.Connection.Open();
                    sqlCommand.ExecuteNonQuery();
                    sqlCommand.Connection.Close();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }