コード例 #1
0
        private void createToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CreatePurchaseOrder next = new CreatePurchaseOrder();

            next.Show();
            this.Hide();
        }
コード例 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            CreatePurchaseOrder next = new CreatePurchaseOrder();

            next.Show();
            this.Hide();
        }
コード例 #3
0
        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();
            }
        }