private void button3_Click(object sender, EventArgs e) { InfBox1.Clear(); List <Tovar> listOfTovar = new List <Tovar>(); InfBox1.Text = tempSklad.InfName(TextSearh.Text); TextSearh.Clear(); }
private void Search_Click(object sender, EventArgs e) { try { int x = Int16.Parse(TextSearh.Text); InfBox1.Clear(); List <Tovar> listOfTovar = new List <Tovar>(); InfBox1.Text = tempSklad.InfIndex(Convert.ToInt16(TextSearh.Text)); } catch { string er = "Неверное введено значение"; MessageBox.Show(er); } finally { TextSearh.Clear(); } }