Example #1
0
        private void buttonExit_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("Do you want to exit the application?", "Exit", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

            if (result.Equals(DialogResult.OK))
            {
                this.Hide();
                FormListOfOrder formListOfOrder = new FormListOfOrder();
                formListOfOrder.Show();
            }
            else
            {
                listViewNewOrder.Items.Clear();
            }
        }
Example #2
0
 private void buttonExit_Click(object sender, EventArgs e)
 {
     DialogResult result = MessageBox.Show("Do you want to exit the application?", "Exit", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
     if (result.Equals(DialogResult.OK))
     {
         this.Hide();
         FormListOfOrder formListOfOrder = new FormListOfOrder();
         formListOfOrder.Show();
     }
     else
     {
         listViewNewOrder.Items.Clear();
     }
 }