private void button2_Click(object sender, EventArgs e) { ProductModification p = new ProductModification(); p.Show(); this.Hide(); }
private void button3_Click(object sender, EventArgs e) { this.Hide(); ProductModification pmod = new ProductModification(); pmod.Show(); }
private void button1_Click(object sender, EventArgs e) { string pid; pid = textBox1.Text; if (radioButton1.Checked == true) { foreach (Product p in Database.productList.ToList()) { if (pid == p.ProductID) { Database.productList.Remove(p); ProductModification p1 = new ProductModification(); p1.Show(); this.Hide(); return; } } System.Windows.Forms.MessageBox.Show("Product ID entered is incorrect"); } else if (radioButton1.Checked == false) { System.Windows.Forms.MessageBox.Show("Please check the radio button to confirm"); } }
private void button1_Click(object sender, EventArgs e) { string id; string pname; string pdesc; decimal pprice; int pstock; id = textBox1.Text; pname = textBox2.Text; pdesc = textBox3.Text; pprice = Decimal.Parse(textBox4.Text); pstock = int.Parse(textBox5.Text); Database.productList.Add(new Product(id, pname, pdesc, pprice, pstock)); this.Hide(); Form form20 = new ProductModification(); form20.Show(); }