Exemple #1
0
 private void btnDel_Click(object sender, EventArgs e)
 {
     if (lbLicenses.SelectedItem != null)
     {
         License.Delete((License)lbLicenses.SelectedItem);
     }
     lbLicenses.Items.Clear();
     ShowLicenses();
 }
Exemple #2
0
 public static void Delete(TransportType transporttype)
 {
     License.Delete(transporttype);
     foreach (var route in Route.Routes)
     {
         if (route.TransportType == transporttype)
         {
             route.SetTransportType(null);
         }
     }
     foreach (var trn in Transportation.Transportations)
     {
         if (trn.TransportType == transporttype)
         {
             trn.TransportType = null;
         }
     }
     TransportTypes.Remove(transporttype);
 }