public string ToStringFull() { Route route = Route; Transportation transportation = Transportation; return(String.Format("Driver: {0}\nTransport type: {1}", route.ToString(), transportation.ToString())); }
public static void Delete(Transportation tr) { List <RouteTransportationAgreement> rtas = new List <RouteTransportationAgreement>(); foreach (var rta in Agreements) { if (rta.Transportation == tr) { rtas.Add(rta); } } foreach (var rta in Agreements) { Delete(rta); } }
private void btnDelete_Click(object sender, EventArgs e) { Transportation.Delete(transportation); Close(); }
public ShowTransportationForm(Transportation transportation, MainForm mf) { InitializeComponent(); this.mf = mf; this.transportation = transportation; }
public RouteTransportationAgreement(Route route, Transportation transportation) { Route = route; Transportation = transportation; Agreements.Add(this); }
public static void Delete(Transportation transportation) { Transportations.Remove(transportation); RouteTransportationAgreement.Delete(transportation); }