public class Van { private string VanNumber; public string vanNumber { get { return VanNumber; } set { VanNumber = value; } } public List<Delivery> Deliveries = new List<Delivery>(); public override string ToString() { return VanNumber.ToString(); } }
public class Delivery { private string CustomerName; public string customerName { get { return CustomerName; } set { CustomerName = value; } } private string CustomerAddress; public string customerAddress { get { return CustomerAddress; } set { CustomerAddress = value; } } private DateTime ArrivalTime; public DateTime arrivalTime { get { return ArrivalTime; } set { ArrivalTime = value; } } public override string ToString() { return CustomerName + " " + CustomerAddress + " " + ArrivalTime.ToString(); } }
((Van)VanComboBox.SelectedItem).Deliveries.Add(DeliveryItem)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)