public void CompleteAuthorList(ComboBox comboBoxAuthors) { _comboBoxAuthors = comboBoxAuthors; comboBoxAuthors.DataSource = libraryPresenter.GetAuthors(); comboBoxAuthors.AutoCompleteMode.ToString(); comboBoxAuthors.Text = ""; }
private void AuthorsList_Load(object sender, EventArgs e) { int id = 1; LoadCheckboxes(); try { id = _librarypresenter.GetAuthors().Last().Id + 1; } catch { } textBoxAuthorId.Text = id.ToString(); }
private IList <IAuthor> SearchByAuthor(string searchText) { IList <IAuthor> allAuthors = _libraryPresenter.GetAuthors(); var searchResult = from author in allAuthors where author.authorName().ToLower().Contains(searchText.ToLower()) orderby author.authorName() ascending select author; return(searchResult.ToList()); }