private void btnConfirm_Click(object sender, EventArgs e) { info.userId = userFetch.Text; info.password = newTF.Text; try { if (passwordFetch.Text == oldTF.Text && newTF.Text == conTF.Text) { if (newTF.Text.Length < 4) { MessageBox.Show("Choose atleast 4 Length password!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { opr.updateInLogin(info); MessageBox.Show("Successfully Changed", "Success", MessageBoxButtons.OK); oldTF.Text = ""; newTF.Text = ""; conTF.Text = ""; MessageBox.Show("Session Expired! Login Again.", "Success", MessageBoxButtons.OK); // Application.Exit(); FormLogin fl = new FormLogin(); fl.Show(); this.Close(); } } else { MessageBox.Show("Password didn't match!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); oldTF.Text = ""; newTF.Text = ""; conTF.Text = ""; } } catch (Exception ex) { } }
private void logOut_Click(object sender, EventArgs e) { FormLogin fl = new FormLogin(); this.Hide(); fl.Show(); }
public void Init() { formLogin = new FormLogin(); formLogin.Show(); }