Exemplo n.º 1
0
 /// <summary>
 /// Create a new StoreProduct object.
 /// </summary>
 /// <param name="productID">Initial value of the ProductID property.</param>
 public static StoreProduct CreateStoreProduct(global::System.Int32 productID)
 {
     StoreProduct storeProduct = new StoreProduct();
     storeProduct.ProductID = productID;
     return storeProduct;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the StoreProducts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToStoreProducts(StoreProduct storeProduct)
 {
     base.AddObject("StoreProducts", storeProduct);
 }
Exemplo n.º 3
0
        public static void Insert(Hashtable values)
        {
            DAL.StoreProduct R = new DAL.StoreProduct
            {
                Name = values["Name"].ToString(),
                Description = values["Description"].ToString(),
                CategoryID = int.Parse(values["CategoryID"].ToString()),
                Price = decimal.Parse(values["Price"].ToString()),
                Deleted = bool.Parse(values["Deleted"].ToString()),
                CreateDate = DateTime.Now,
                PortalID = Product.PortalID
            };

            Utils.DbContext.AddToStoreProducts(R);
            Utils.DbContext.SaveChanges();
        }