Пример #1
0
        public string ToStringFull()
        {
            Route          route          = Route;
            Transportation transportation = Transportation;

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