private void button1_Click(object sender, EventArgs e) { try { int code = Convert.ToInt32(textBox1.Text); GoodFactory.DeleteGoods(code); } catch { MessageBox.Show("Enter the number!"); } }
private void button1_Click(object sender, EventArgs e) { int num_fields = 5; values = new string[num_fields]; values[0] = textBox1.Text; values[1] = textBox2.Text; values[2] = comboBox1.Text; values[3] = textBox3.Text; values[4] = textBox4.Text; if (check(values) == 1) { GoodFactory.Add_Goods(values); textBox1.Text = (Convert.ToInt32(textBox1.Text) + 1).ToString(); textBox2.Text = ""; comboBox1.Text = ""; textBox3.Text = ""; textBox4.Text = ""; } }
public FilterContr(FilterCol obj) { filtrationGoods = new GoodsFilter(); allGoods = GoodFactory.getGoods(); }
public AddGoods() { InitializeComponent(); textBox1.Text = (GoodFactory.count() + 1).ToString(); }