private void ExecuteRemove(object p) { if (p != null && p is StudyProgram) { try { var studyProgram = p as StudyProgram; ServiceDataProvider.DeleteStudyProgram(studyProgram.StudyProgramId); StudyPrograms.Remove(studyProgram); } catch (FaultException <DeleteFault> fe) { MessageBox.Show(string.Format("{0} {1}", fe.Detail.Message, fe.Detail.Description)); } } }