Esempio n. 1
0
 private void Order_btn_Click(object sender, EventArgs e)
 {//go to order form.
     try
     {
         Order_Form order_form = new Order_Form();
         order_form.Show();
         this.Hide();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Esempio n. 2
0
        private void Cancel_btn_Click(object sender, EventArgs e)
        {//cancel order
            DialogResult ask = MessageBox.Show("Are you sure want to cancel the order", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (ask.Equals(DialogResult.Yes)) //if yes then cancle
            {                                 //move to order form and close current form
                try
                {
                    Order_Form order_form = new Order_Form();
                    order_form.Show();
                    this.Hide();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }