コード例 #1
0
ファイル: OtherStockView.cs プロジェクト: Jusharra/RMS
 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;
     }
 }
コード例 #2
0
ファイル: OtherStockView.cs プロジェクト: Jusharra/RMS
 private void LoadGridView()
 {
     StoreDAO aDao = new StoreDAO();
     List<Store> aStores = new List<Store>();
     aStores = aDao.GetAllOtherStore();
     otherpurchaseStoredataGridView.DataSource = aStores;
 }