Ejemplo n.º 1
0
        public void SearchFaculty(object parameter)
        {
            IEnumerable <Faculty> faculty = null;
            IFaculty facultyObj           = new FacultyService(new Data.WpfDbContext());

            if (Filter == Filter.ById)
            {
                if (int.TryParse(FilterParameter, out int res))
                {
                    faculty = facultyObj.GetDetailsById(res);
                }
            }
            else if (Filter == Filter.ByName)
            {
                faculty = facultyObj.GetDetailsByName(FilterParameter);
            }
            FilterFaculty = new ObservableCollection <Faculty>(faculty);
        }