private void loadSearch(string text)
        {
            dataGridView1.DataSource = libraryapp.FindBook(text);
            switch (dataGridView1.Rows.Count)
            {
            case 0:
                EnableBtn(false);
                break;

            default:
                EnableBtn(true);
                break;
            }
        }
        private object loadSearch(string text)
        {
            switch (selectedTable)
            {
            case TblEnums.Book:
                return(libraryapp.FindBook(text));

            case TblEnums.Account:
                return(libraryapp.FindAccount(text));

            case TblEnums.Borrow:
                return(libraryapp.FindBorrowHistory(text));

            default:
                throw new NotImplementedException();
            }
        }
Exemple #3
0
 private void loadSearchBook()
 {
     dataGridView1.DataSource = libraryapp.FindBook(textBox1.Text.Trim());
 }