Ejemplo n.º 1
0
        /// <summary>
        /// Logout button Click event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_logout_Click(object sender, EventArgs e)
        {
            DialogResult result = COM_MESSAGE.informationMessage("Do you realy want to Log out!!! you will lost all unsaved data", "Confirmation");

            if (result == DialogResult.Yes)
            {
                IS_LOGOUT = true;
                this.Close();
                frm_Login LoginForm = new frm_Login();
                LoginForm.Show();
            }
        }
Ejemplo n.º 2
0
        private void btn_cancel_Click(object sender, EventArgs e)
        {
            DialogResult result = COM_MESSAGE.informationMessage("Do you realy want to CANCEL!!! you will lost all unsaved data", "Confirmation");

            if (result == DialogResult.Yes)
            {
                this.Close();
            }
        }
Ejemplo n.º 3
0
        private void FrmAddUnits_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
            {
                DialogResult result = DialogResult.Yes;

                if (!IS_SUCCESS_MESSAGE)
                {
                    result = COM_MESSAGE.informationMessage("Do you realy want to CANCEL!!! you will lost all unsaved data", "Confirmation");
                }

                if (result == DialogResult.Yes)
                {
                    e.Cancel = false;
                }
                else
                {
                    e.Cancel = true;
                }
            }
        }