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(); } }
private void loadSearch(string text) { dataGridView1.DataSource = libraryapp.FindBorrowHistory(text); }