// метод для поиска услуг, аналогичен методу поиска клиентов public IEnumerable <Models.Library.Service> GetServices(SearchServiceParam search) { var queryable = Services.AsQueryable(); if (!string.IsNullOrWhiteSpace(search.Name)) { queryable = queryable.Where(s => s.Name.Contains(search.Name)); } return(queryable.ToArray().Select(s => Mapper.GetServiceFromDb(s))); }
private void SearchButton_Click(object sender, EventArgs e) { search = new SearchServiceParam(nameTextBox.Text); UpdateView(); }
public Services() { InitializeComponent(); search = SearchServiceParam.Empty; UpdateView(); }