コード例 #1
0
 public void CompleteAuthorList(ComboBox comboBoxAuthors)
 {
     _comboBoxAuthors           = comboBoxAuthors;
     comboBoxAuthors.DataSource = libraryPresenter.GetAuthors();
     comboBoxAuthors.AutoCompleteMode.ToString();
     comboBoxAuthors.Text = "";
 }
コード例 #2
0
        private void AuthorsList_Load(object sender, EventArgs e)
        {
            int id = 1;

            LoadCheckboxes();
            try
            {
                id = _librarypresenter.GetAuthors().Last().Id + 1;
            }
            catch
            {
            }
            textBoxAuthorId.Text = id.ToString();
        }
コード例 #3
0
        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());
        }