Пример #1
0
        void filter()
        {
            searchReset();

            while (listView1.Items.Count > 0)
            {
                listView1.Items[0].Remove();
            }

            List <Nomenclature> nomenclatureList = null;

            if (DataConfig.typeConnection == DataConstants.CONNETION_LOCAL)
            {
                // OLEDB
                searchNomenclatureOleDb = new SearchNomenclatureOleDb();
                searchNomenclatureOleDb.setPrices(ListViewPrices);
                nomenclatureList = searchNomenclatureOleDb.filterNomenclature(filterTextBox.Text);
            }
            else if (DataConfig.typeConnection == DataConstants.CONNETION_SERVER)
            {
                // MSSQL SERVER
                searchNomenclatureSqlServer = new SearchNomenclatureSqlServer();
                searchNomenclatureSqlServer.setPrices(ListViewPrices);
                nomenclatureList = searchNomenclatureSqlServer.filterNomenclature(filterTextBox.Text);
            }
            LoadNomenclature(nomenclatureList);
        }
Пример #2
0
 public void Run()
 {
     if (DataConfig.typeConnection == DataConstants.CONNETION_LOCAL)
     {
         // OLEDB
         searchNomenclatureOleDb = new SearchNomenclatureOleDb();
         searchNomenclatureOleDb.setPrices(ListViewPrices);
         searchNomenclatureOleDb.autoFindNomenclature(ListViewNomenclature, this);
     }
     else if (DataConfig.typeConnection == DataConstants.CONNETION_SERVER)
     {
         // MSSQL SERVER
         searchNomenclatureSql = new SearchNomenclatureSqlServer();
         searchNomenclatureSql.setPrices(ListViewPrices);
         searchNomenclatureSql.autoFindNomenclature(ListViewNomenclature, this);
     }
 }