Exemplo n.º 1
0
        public string ToStringFull()
        {
            Route          route          = Route;
            Transportation transportation = Transportation;

            return(String.Format("Driver: {0}\nTransport type: {1}", route.ToString(), transportation.ToString()));
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     Transportation.Delete(transportation);
     Close();
 }
Exemplo n.º 4
0
 public ShowTransportationForm(Transportation transportation, MainForm mf)
 {
     InitializeComponent();
     this.mf             = mf;
     this.transportation = transportation;
 }
Exemplo n.º 5
0
 public RouteTransportationAgreement(Route route, Transportation transportation)
 {
     Route          = route;
     Transportation = transportation;
     Agreements.Add(this);
 }
Exemplo n.º 6
0
 public static void Delete(Transportation transportation)
 {
     Transportations.Remove(transportation);
     RouteTransportationAgreement.Delete(transportation);
 }