public OrderLine(OrderLineId id, int quantity, decimal itemprice, decimal itempricediscount, decimal total, Order order, Product product) { this.id= id; this.quantity= quantity; this.itemprice= itemprice; this.itempricediscount= itempricediscount; this.total= total; this.order= order; this.product= product; }
private static Product GetProductFromReader(IDataReader dataReader) { Product product = new Product(); product.ProductID = DBHelper.GetGuid(dataReader, "ProductID"); product.ProductGroupID = DBHelper.GetGuid(dataReader, "ProductGroupID"); product.ShortDescription = DBHelper.GetString(dataReader, "ShortDescription"); product.FullDescription = DBHelper.GetString(dataReader, "FullDescription"); product.Price = DBHelper.GetDecimal(dataReader, "Price"); product.TaxID = DBHelper.GetGuid(dataReader, "Tax"); product.Name = DBHelper.GetString(dataReader, "Name"); product.Code = DBHelper.GetString(dataReader, "Code"); product.ManufacturerID = DBHelper.GetGuid(dataReader, "ManufacturerID"); return product; }
public void BindData(Guid ProductID) { Product product = ProductManager.GetProductByID(ProductID); this.product = product; if (product != null) { this.Text = product.Name; this.txtName.Text = product.Name; this.txtCode.Text = product.Code; this.txtShortDesc.Text = product.ShortDescription; this.txtDesc.Text = product.FullDescription; this.txtGroup.Text = product.ProductGroup.Name; this.txtPrice.Text = product.Price.ToString("0.00 zł"); } }
public OrderLineId(Order order, Product product) { this.order= order; this.product= product; }