private void FullTextSearch() { List <SearchRes> res = new List <SearchRes>(); string table = "pupils"; string attr; int atr = view.PupilAtr(); if (atr == 1) { attr = "name"; } else { attr = "surname"; } int search = view.FullText(); string query = view.SearchQuery(); switch (search) { case 1: res.AddRange(fullTextSearch.getFullPhrase(attr, table, query)); view.PrintFullTextSearch_FullPhrase(res); break; case 2: res.AddRange(fullTextSearch.getAllWithNotIncludedWord(attr, table, query)); view.PrintFullTextSearch_NotIncludedWord(res); break; default: throw new Exception("Wrong entity selected"); } }