public virtual void UpdateContentParameter(ContentParameter contentParameter)
 {
     try
     {
         Database database = DatabaseFactory.CreateDatabase("CustommerServiceConnection");
         DbCommand dbCommand = database.GetStoredProcCommand("spContentParameterUpdate");            
         
         database.AddInParameter(dbCommand, "@ContentParameterID", DbType.Int32, contentParameter.ContentParameterID);
         database.AddInParameter(dbCommand, "@ContentParameterName", DbType.String, contentParameter.ContentParameterName);
         database.AddInParameter(dbCommand, "@ContentParameterDescription", DbType.String, contentParameter.ContentParameterDescription);
         database.AddInParameter(dbCommand, "@ContentParameterActive", DbType.String, contentParameter.ContentParameterActive);
         database.AddInParameter(dbCommand, "@CreatedDate", DbType.DateTime, contentParameter.CreatedDate);
         database.AddInParameter(dbCommand, "@ModifiedDate", DbType.DateTime, contentParameter.ModifiedDate);
         database.AddInParameter(dbCommand, "@ContentParameterValue", DbType.String, contentParameter.ContentParameterValue);
         
         database.ExecuteNonQuery(dbCommand);
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.DataAccessUpdateContentParameterException, ex);
     }
 }
 public static void UpdateContentParameter(ContentParameter contentParameter)
 {            
     try
     {
         ContentParameterDAO contentParameterDAO = new ContentParameterDAO();
         contentParameterDAO.UpdateContentParameter(contentParameter);
     }
     catch (ApplicationException)
     {
         throw;
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.BusinessUpdateContentParameterException, ex);
     }
 }        
 public virtual ContentParameter CreateContentParameterFromReader(IDataReader reader)
 {
     ContentParameter item = new ContentParameter();
     try
     {
         if (!reader.IsDBNull(reader.GetOrdinal("ContentParameterID"))) item.ContentParameterID = (int)reader["ContentParameterID"];
         if (!reader.IsDBNull(reader.GetOrdinal("ContentParameterName"))) item.ContentParameterName = (string)reader["ContentParameterName"];
         if (!reader.IsDBNull(reader.GetOrdinal("ContentParameterDescription"))) item.ContentParameterDescription = (string)reader["ContentParameterDescription"];
         if (!reader.IsDBNull(reader.GetOrdinal("ContentParameterActive"))) item.ContentParameterActive = (string)reader["ContentParameterActive"];
         if (!reader.IsDBNull(reader.GetOrdinal("CreatedDate"))) item.CreatedDate = (DateTime)reader["CreatedDate"];
         if (!reader.IsDBNull(reader.GetOrdinal("ModifiedDate"))) item.ModifiedDate = (DateTime)reader["ModifiedDate"];
         if (!reader.IsDBNull(reader.GetOrdinal("ContentParameterValue"))) item.ContentParameterValue = (string)reader["ContentParameterValue"];
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.DataAccessCreateContentParameterFromReaderException, ex);
     }
     return item;
 }