Ejemplo n.º 1
0
 private void itemNametextBox_TextChanged(object sender, EventArgs e)
 {
     if (itemNametextBox.Text == "" || string.IsNullOrEmpty(itemNametextBox.Text))
     {
         StoreDAO aDao = new StoreDAO();
         List<Store> aStores = new List<Store>();
         aStores = aDao.GetAllOtherStore();
         otherpurchaseStoredataGridView.DataSource = aStores;
     }
     else
     {
         StoreDAO aDao = new StoreDAO();
         List<Store> aStores = new List<Store>();
         aStores = aDao.GetAllOtherStore();
         List<Store> aastore=( from myRow in aStores.AsEnumerable()
                       where myRow.ItemName.ToUpper().StartsWith(itemNametextBox.Text.ToUpper())
                       select myRow).ToList();
        // DataView view = results.AsDataView();
         otherpurchaseStoredataGridView.DataSource = aastore;
     }
 }
Ejemplo n.º 2
0
 private void LoadGridView()
 {
     StoreDAO aDao = new StoreDAO();
     List<Store> aStores = new List<Store>();
     aStores = aDao.GetAllOtherStore();
     otherpurchaseStoredataGridView.DataSource = aStores;
 }