private void buttonTraziRaspored_Click(object sender, RoutedEventArgs e) { TempRaspored.Clear(); foreach (var r in Raspored) { if (r.DatumP.Equals(SelectedKriterijum)) { TempRaspored.Add(r); } } }
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); } }