コード例 #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;
 }
コード例 #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);
 }
コード例 #3
0
ファイル: Product.cs プロジェクト: zgying/CRMWeiXin
        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();
        }