Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (txtnewpasss.Text != null && txtretypepas.Text != null)
            {
                if (txtnewpasss.Text == txtretypepas.Text)
                {
                    DialogResult R = MessageBox.Show("Save your New password ?", "RESET CONFIRMATION", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (DialogResult.Yes == R)
                    {
                        string del  = "UPDATE [dbo].[REGISTRATION] SET [PASSWORDS] ='" + txtretypepas.Text + "' WHERE ACCOUNTID = '" + lblaccountid.Text + "'";
                        string del2 = "UPDATE [dbo].[USERLOGIN] SET [PASSWORDS] = '" + txtretypepas.Text + "' WHERE ACCOUNTID = '" + lblaccountid.Text + "'";
                        clsSQLClientFunctions.GlobalExecuteCommand(clsDeclaration.sLclSystemConnection, del);
                        clsSQLClientFunctions.GlobalExecuteCommand(clsDeclaration.sLclSystemConnection, del2);

                        MessageBox.Show("New Password Successfully Save!");
                        txtfname.Text     = txtlname.Text = txtmname.Text = txtnewpasss.Text = txtretypepas.Text = null;
                        lblaccountid.Text = lblusername.Text = "0000000000";
                        cmbusertype.Text  = null;
                        txtfname.Focus();
                        LOGIN_FORM main = (LOGIN_FORM)Application.OpenForms["LOGIN_FORM"];
                        main.Visible = true;
                        this.Dispose();
                    }
                }
                else
                {
                    MessageBox.Show("Password did not match", "NOTICE", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
Exemple #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            LOGIN_FORM FLogin = new LOGIN_FORM(2);
            FLogin.ShowDialog();

            if (!FLogin.LoginStatus)
                return;

            Properties.Settings.Default.ParameterHis = "";
            Properties.Settings.Default.Save();
            comboBox1.Items.Clear();
        }
Exemple #3
0
    private void btnlogout_Click(object sender, EventArgs e)
    {
        DialogResult dr = MessageBox.Show("Are you sure you want to logout?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

        if (dr == DialogResult.Yes)
        {
            logout();
            LOGIN_FORM main = (LOGIN_FORM)Application.OpenForms["LOGIN_FORM"];
            main.Visible = true;
            this.Dispose();
        }
    }
Exemple #4
0
        private void FUpdateDb_Load(object sender, EventArgs e)
        {
            FLogin = new LOGIN_FORM(2);
            FLogin.ShowDialog();

            if (!FLogin.LoginStatus)
            {
                this.Close();
            }

            User = new AppUser();
            User = FLogin.User;
        }