private void createToolStripMenuItem_Click(object sender, EventArgs e) { CreatePurchaseOrder next = new CreatePurchaseOrder(); next.Show(); this.Hide(); }
private void button2_Click(object sender, EventArgs e) { CreatePurchaseOrder next = new CreatePurchaseOrder(); next.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { int index = listBox1.SelectedIndex; string item = listBox1.Items[index].ToString(); string quantity = textBox1.Text; try { int.Parse(textBox1.Text); DateTime.Parse(textBox2.Text); string date = textBox2.Text; ConfirmPurchase next1 = new ConfirmPurchase(item, quantity, date); next1.Show(); this.Hide(); } catch (FormatException q) { MessageBox.Show(q.Message, "Please enter a valid int or date (yyyy-mm-dd)"); CreatePurchaseOrder next = new CreatePurchaseOrder(); next.Show(); this.Hide(); } }