Example #1
0
        private void Visszaerkezett(object sender, RoutedEventArgs e)
        {
            Futar futar = (Futar)Futarok.SelectedItem;
            int   i     = 0;

            while (i < futar.Szallitasok.Count && futar.Szallitasok[i].Erkezes != DateTime.MinValue)
            {
                i++;
            }
            futar.Szallitasok[i].Erkezes = System.DateTime.Now;
            VisszaerkezettGomb.IsEnabled = false;
            UjSzallitasGomb.IsEnabled    = true;
        }
Example #2
0
 private void GombEllenorzes()
 {
     if (Futarok.SelectedItem != null)
     {
         Futar futar = (Futar)Futarok.SelectedItem;
         int   i     = 0;
         while (i < futar.Szallitasok.Count && futar.Szallitasok[i].Erkezes != DateTime.MinValue)
         {
             i++;
         }
         UjSzallitasGomb.IsEnabled    = i < futar.Szallitasok.Count ? false : true;
         VisszaerkezettGomb.IsEnabled = i < futar.Szallitasok.Count ? true : false;
     }
 }
Example #3
0
 private void Ok(object sender, RoutedEventArgs e)
 {
     if (NevSzoveg.Text == "" || SzallitoeszkozTipusSzoveg.Text == "" || SzallitoeszkozLeirasSzoveg.Text == "" || MaxTomegSzoveg.Text == "")
     {
         MessageBox.Show("Hibás adat(ok)!");
     }
     else
     {
         Futar = new Futar()
         {
             Nev = NevSzoveg.Text, SzallitoeszkozTipus = SzallitoeszkozTipusSzoveg.Text, SzallitoeszkozLeiras = SzallitoeszkozLeirasSzoveg.Text, MaxTomeg = int.Parse(MaxTomegSzoveg.Text)
         };
         this.DialogResult = true;
     }
 }