public static void AddProductVersion(Product product, int versionId)
 {
     //see if already exists in cart
     Simplicity.Data.Version version = ProductBO.GetVersion(versionId);
     ShoppingItem shoppingItem = new ShoppingItem();
     shoppingItem.ProductEntity = product;
     shoppingItem.VersionEntity = version;
     shoppingItem.DurationInMonths = WebConstants.DEFAULT_DURATION;
     shoppingItem.Quantity = version.MinUsers;
     AddShoppingItem(shoppingItem);
 }
 public static void AddProductDetail(Product product, int productDetailId, int versionId)
 {
     ProductDetail productDetail = ProductBO.GetProductDetail(productDetailId);
     Simplicity.Data.Version version = ProductBO.GetVersion(versionId);
     ShoppingItem shoppingItem = new ShoppingItem();
     shoppingItem.ProductEntity = product;
     shoppingItem.ProductDetailEntity = productDetail;
     shoppingItem.VersionEntity = version;
     shoppingItem.DurationInMonths = WebConstants.DEFAULT_DURATION;
     shoppingItem.Quantity = version.MinUsers;
     AddShoppingItem(shoppingItem);
 }
 /// <summary>
 /// Create a new Product object.
 /// </summary>
 /// <param name="productID">Initial value of the ProductID property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="shortName">Initial value of the ShortName property.</param>
 /// <param name="termsURL">Initial value of the TermsURL property.</param>
 public static Product CreateProduct(global::System.Int32 productID, global::System.String name, global::System.String shortName, global::System.String termsURL)
 {
     Product product = new Product();
     product.ProductID = productID;
     product.Name = name;
     product.ShortName = shortName;
     product.TermsURL = termsURL;
     return product;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Products EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProducts(Product product)
 {
     base.AddObject("Products", product);
 }
Exemple #5
0
 public ProductBO(Product productEntity)
 {
     this.productEntity = productEntity;
 }