private void ClearOrders(object context) { foreach (OrderLine ol in DepOrderList) { ol.ChangeQuantity = 0; } DepOrderList.Clear(); OrderNote.Text = ""; ////TODO Clear Radiobuttons properly }
public void ChangeOrderList(TextBox tb) { OrderLine ol = tb.DataContext as OrderLine; if (ol.Quantity > 0 && !DepOrderList.Contains(ol)) { DepOrderList.Add(ol); } else if (ol.Quantity == 0 && DepOrderList.Contains(ol)) { DepOrderList.Remove(ol); } }