private void butSearch_Click(object sender, EventArgs e)
 {
     CategoryGroupModel model = new CategoryGroupModel();
     model.CategoryGroupName = txtFilter.Text.ToString();
     var list = _repo.Get(model);
     dgvList.Rows.Clear();
     ListToGrid(list);
 }
Beispiel #2
0
        public IEnumerable<CategoryGroupModel> Get(CategoryGroupModel model)
        {
            IEnumerable<CategoryGroupModel> query = GetAll();

            if (model.CategoryGroupName != null) { query = query.Where(p => p.CategoryGroupName.Contains(model.CategoryGroupName.ToString())); }

            return query;
        }