This project is read-only.

Helper Methods

static void Initialize (string databaseName, [bool createBaseDataSet], [string signUpPageUrl])
  Initializes the Freemium helper. You can specify the sign up page where to redirect users that cannot access a specific feature. If createBaseDataSet is set to true a base set of stock-keeping units and features will be created automatically in this database
static bool IsFeatureEnabledForCurrentUser (string featureName)
  Returns if a feature is enabled for the current user
static bool IsFeatureEnabledForUser (string featureName, string userName)
  Returns if a feature is enabled for a given user
static bool IsFeatureEnabledForStockKeepingUnit (string featureName, string skuName)
  Returns if a feature is enabled for a given sku
static void RequireFeatureEnabledForCurrentPage (string featureName)
  Validates if the current user has acceess to the current page. If not, the user is redirected to the Sign Up page
static bool ExistsStockKeepingForRole (string rolename)
  Checks if an associated SKU exists for the given role
static IEnumerable<Feature> GetAllFeatures()
  Retrieves all the features
static IEnumerable<SKU> GetAllStockKeepingUnits()
  Retrieves all the SKUs
static IEnumerable<Feature> GetAllFeaturesForStockKeepingUnit (string skuName)
  Retrieves all the enabled features for a SKU
static IEnumerable<SKU> GetAllStockKeepingUnitsForFeature (string featureName)
  Retrieves all the SKUs where a feature is enabled
static Feature GetFeature (string featureName)
  Retrieves a feature
static SKU GetStockKeepingUnit (string skuName)
  Retrieves a SKU
static byte[] GetStockKeepingUnitImage ( string skuName, [string imageCssClass])
  Retrieves the image of the specified Stock Keeping Unit.
static void CreateFeature (string name, string description)
  Creates a new Feature
static void UpdateFeature (string featureName, string description)
  Updates a feature
static void RemoveFeature (string featureName)
  Removes a feature
static void RemoveStockKeepingUnit (string skuSName)
  Removes a SKU
static void CreateStockKeepingUnit (string name, string description, decimal price, [byte[] image])
  Creates a new SKU
static void UpdateStockKeepingUnit (string name, string description, decimal price, bool updateImage, [byte[] image])
  Updates a SKU
static void UpdateFeatureForStockKeepingUnit ()
  Enables or disables a feature for a SKU
static void UpdateFeatureByStockKeepingUnitMatrix ()
  Updates the SKU/Features matrix using the data in the submited Form
@helper GetFeatureByStockKeepingUnitMatrixHtml ([string tableCssClass], [string enabledCssClass], [string disabledCssClass], [string editFeaturePageUrl], [string editSkuPageUrl], [bool allowEdit], [bool includeFormTag], [string saveText])
  Shows the SKU/Features matrix, to display which features are enabled in each SKU
@helper GetStockKeepingUnitsListHtml ([string itemContainerCssClass], [string itemCssClass], [string signUpForSkuPageUrl], [Func<dynamic, object> template])
  Shows the SKUs offered by your web site as an HTML list (ul). This method supports passing an inline template parameter to customize the look and feel of each SKU in the list.
@helper GetStockKeepingUnitImageHtml ( string skuName, [string imageCssClass])
  Shows an HTML image tag for the SKU image


int Id The feature ID.
string Name The feature name.
string Description The feature description.

SKU (Stock Keeping Unit)

int Id The Stock Keeping Unit ID.
string Name The Stock Keeping Unit name.
string Description The Stock Keeping Unit description.
double Price The Stock Keeping Unit price.

Last edited Dec 29, 2010 at 6:12 PM by jsenior, version 5


No comments yet.