internal static void Update(int prefernceId, bool isEnabled)
{
using (SqlConnection sqlConnection = new SqlConnection(CMSCoreBase.CMSCoreConnectionString))
{
SqlCommand sqlCommand = new SqlCommand(SN_PREFERENCE_UPDATE, sqlConnection);
sqlCommand.CommandType = System.Data.CommandType.StoredProcedure;
SqlParameter sqlParameter = null;
sqlParameter = new SqlParameter(PN_PREFERENCE_ID, System.Data.SqlDbType.Int);
sqlParameter.Direction = System.Data.ParameterDirection.Input;
sqlParameter.Value = prefernceId;
sqlCommand.Parameters.Add(sqlParameter);
sqlParameter = new SqlParameter(PN_PREFERENCE_IS_ENABLED, System.Data.SqlDbType.Bit);
sqlParameter.Direction = System.Data.ParameterDirection.Input;
sqlParameter.Value = isEnabled;
sqlCommand.Parameters.Add(sqlParameter);
try
{
sqlCommand.Connection.Open();
sqlCommand.ExecuteNonQuery();
sqlCommand.Connection.Close();
}
catch (Exception ex)
{
throw ex;
}
}
}