Exemplo n.º 1
0
 private void buttonTraziRaspored_Click(object sender, RoutedEventArgs e)
 {
     TempRaspored.Clear();
     foreach (var r in Raspored)
     {
         if (r.DatumP.Equals(SelectedKriterijum))
         {
             TempRaspored.Add(r);
         }
     }
 }
Exemplo n.º 2
0
 private void buttonObrisiRaspored_Click(object sender, RoutedEventArgs e)
 {
     if (SelektovanRaspored == null || string.IsNullOrWhiteSpace(SelektovanRaspored.Jmbg))
     {
         return;
     }
     foreach (Raspored r in TempRaspored)
     {
         if (r.Jmbg == SelektovanRaspored.Jmbg)
         {
             WorkingTimeController workingTimeController = new WorkingTimeController();
             workingTimeController.DeleteWorkingTime(r.Jmbg);
             TempRaspored.Remove(r);
             Raspored.Remove(r);
             SelektovanRaspored = null;
             ClearFields();
             break;
         }
     }
 }
Exemplo n.º 3
0
        private void UpdateTempRaspored()
        {
            Raspored.Clear();
            TempRaspored.Clear();
            WorkingTimeController workingTimeController = new WorkingTimeController();
            List <WorkingTime>    times = workingTimeController.ViewWorkingTimes();

            if (times != null)
            {
                foreach (WorkingTime w in times)
                {
                    Raspored.Add(new Raspored()
                    {
                        Jmbg = w.doctor.Jmbg, DatumP = w.StartDate, DatumK = w.EndDate, Ime = w.doctor.Name, Prezime = w.doctor.Surname, Smena = w.WorkShift
                    });
                }
            }
            foreach (var r in Raspored)
            {
                TempRaspored.Add(r);
            }
        }