private void ReloadMechanics() { if (this.AssignedSchedule != null && this.AssignedSchedule.Count > 0) { foreach (var item in this.AssignedSchedule) { MechanicViewModel mechanic = MechanicList.Where(m => m.Id == item.MechanicId).FirstOrDefault(); if (mechanic != null) { SelectedMechanicList.Add((MechanicViewModel)mechanic); } } foreach (var item in SelectedMechanicList) { MechanicList.Remove((MechanicViewModel)item); } RebindListboxes(); } else { this.AssignedSchedule = new List <SPKScheduleViewModel>(); } RebindListboxes(); }