public Double GetPrice() { Double price = 0; foreach (TabItem item in MultiProductTabs.Items) { ProductControl productControl = (ProductControl)item.Content; price += productControl.GetPrice(); } return(price); }
public List <OrderDetailSubProduct> GetOrderDetailSubProducts() { List <OrderDetailSubProduct> products = new List <OrderDetailSubProduct>(); foreach (TabItem item in MultiProductTabs.Items) { ProductControl productControl = (ProductControl)item.Content; products.Add(productControl.GetOrderDetailSubProduct()); } return(products); }
private void AddTab(String tabName, Products product) { TabItem item1 = new TabItem(); item1.Header = tabName; ProductControl productControl = new ProductControl(product); productControl.OnUpdatePrice += productControl_OnUpdatePrice; item1.Content = productControl; MultiProductTabs.Items.Add(item1); }