private void btnInfosmall_Click(object sender, EventArgs e) { IBeverage beverage = _repo.GetBeverage(GridID); FormOrder form = new FormOrder(beverage); form.OrderButtonClicked += AddToCartButtonClicked; form.ShowDialog(); }
private void btnInfosmall_Click(object sender, EventArgs e) { Type bevtype = _repo.GetBeverage(GridID).GetType(); Beverage beverage = (Beverage)Activator.CreateInstance(bevtype); beverage.UniqueID = beverage.ProductID; FormOrder form = new FormOrder(beverage); form.OrderButtonClicked += AddToCartButtonClicked; form.ShowDialog(); }