private void GetPeopleByDeptIdAndClassIdFromService(Guid departmentId, Guid classId) { try { CACCCheckInDb.People people = null; logger.Debug("Retrieving GetAllFromPeople from CACCCheckInService"); using (CACCCheckInServiceProxy proxy = new CACCCheckInServiceProxy()) { proxy.Open(); people = new CACCCheckInDb.People(proxy.GetPeopleByDeptIdAndClassId( departmentId, classId)); people.CollectionChanged += new NotifyCollectionChangedEventHandler(PeopleCollectionChanged); people.ItemEndEdit += new CACCCheckInDb.ItemEndEditEventHandler(PeopleItemEndEdit); } Debug.Assert(View != null); View.ViewDispatcher.BeginInvoke(DispatcherPriority.DataBind, new DispatcherOperationCallback( delegate(object arg) { View.PeopleDataContext = people; return(null); }), null); } catch (Exception ex) { Debug.Assert(View != null); View.ViewDispatcher.BeginInvoke(DispatcherPriority.DataBind, new DispatcherOperationCallback( delegate(object arg) { View.DisplayExceptionDetail(ex); return(null); }), null); } }