Esempio n. 1
0
        // метод для поиска услуг, аналогичен методу поиска клиентов
        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)));
        }
Esempio n. 2
0
 private void SearchButton_Click(object sender, EventArgs e)
 {
     search = new SearchServiceParam(nameTextBox.Text);
     UpdateView();
 }
Esempio n. 3
0
 public Services()
 {
     InitializeComponent();
     search = SearchServiceParam.Empty;
     UpdateView();
 }