Пример #1
0
        //Inventory Tab - Runs a sql query with every keystroke within searchTextbox.
        private void InventorySearchTextbox_TextChanged(object sender, EventArgs e)
        {
            if (inventoryGridIndex == 0)
            {
                inventoryGridIndex = 1;
            }

            if (String.IsNullOrEmpty(InventorySearchTextbox.Text))
            {
                Inventory.DisplayInventory(InventoryDataGrid, con);
            }
            else if (System.Text.RegularExpressions.Regex.IsMatch(InventorySearchTextbox.Text, "^[a-zA-Z0-9]"))
            {
                Inventory.InventorySearch(InventoryDataGrid, InventoryFilterCombo.Text, InventorySearchTextbox.Text, con);
            }
        }