Dynamicweb 8 Documentation
LanguageID Property (Price)
Example 

Gets or sets the language ID.
Syntax
'Declaration
 
Public Property LanguageID As String
public string LanguageID {get; set;}

Property Value

The language ID.
Example
class MyPage : System.Web.UI.Page
{
   public Dynamicweb.eCommerce.Variants.VariantOptionCollection getVariantOptions(Dynamicweb.eCommerce.Prices.Price price)
   {
       string SQL = "SELECT EcomVariantsOptions.* FROM EcomVariantsOptions ";
       SQL += "INNER JOIN EcomVariantGroups ON EcomVariantGroups.VariantGroupID = EcomVariantsOptions.VariantOptionGroupID ";
       SQL += "WHERE EcomVariantsOptions.VariantOptionLanguageID = '" + price.LanguageID + "' ";
       SQL += "AND EcomVariantsOptions.VariantOptionID = '" + price.UnitID + "' ";
       SQL += "AND EcomVariantGroups.VariantGroupUnit = " + Database.SqlBool(true) + " ";
       SQL += "ORDER BY VariantOptionSortOrder, VariantOptionId";

       return GetVariantOptionCollection(SQL);
   }

   private Dynamicweb.eCommerce.Variants.VariantOptionCollection GetVariantOptionCollection(string sql)
   {
       Dynamicweb.eCommerce.Variants.VariantOptionCollection col = default(Dynamicweb.eCommerce.Variants.VariantOptionCollection);
       string CacheKey = "Variant.Option.Collection." + sql;

       if (HttpContext.Current.Items.Contains(CacheKey))
       {
           col = (Dynamicweb.eCommerce.Variants.VariantOptionCollection)HttpContext.Current.Items[CacheKey];
       }
       else
       {
           col = new Dynamicweb.eCommerce.Variants.VariantOptionCollection();
           col.Load(sql);
           HttpContext.Current.Items.Add(CacheKey, col);
       }
       return col;
   }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Price Class
Price Members

Send Feedback