Beispiel #1
0
 public void AddProductStock(int productId, decimal originalQuantity, DateTime date, decimal cost, int supplierId)
 {
     ProductStock newProductStock = new ProductStock
     {
         ProductId = productId,
         CurrentQuantity = originalQuantity,
         OriginalQuantity = originalQuantity,
         Date = date,
         Cost = cost,
         SupplierId = supplierId
     };
     db.ProductStocks.InsertOnSubmit(newProductStock);
     Save();
 }
 partial void DeleteProductStock(ProductStock instance);
 partial void UpdateProductStock(ProductStock instance);
 partial void InsertProductStock(ProductStock instance);
		private void detach_ProductStocks(ProductStock entity)
		{
			this.SendPropertyChanging();
			entity.Supplier = null;
		}
		private void attach_ProductStocks(ProductStock entity)
		{
			this.SendPropertyChanging();
			entity.Product = this;
		}