Ejemplo n.º 1
0
        private void lblforgotpassword_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            string user = txtusername.Text;

            try
            {
                MySqlDataReader sdr = conn.viewData("SELECT * FROM user WHERE email='" + txtusername.Text + "'");

                while (sdr.Read())
                {
                    if (user == sdr["email"].ToString())
                    {
                        string       position = sdr["position"].ToString();
                        frmresetpass obj      = new frmresetpass();
                        obj.Show();
                        this.Hide();
                    }
                    else
                    {
                        MessageBox.Show("Invalid credentials... Please try Again with valid credentials", "Invalid", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Connection Error!" + ex, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 2
0
        private void changePasswordToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmresetpass obj = new frmresetpass();

            obj.Show();
            this.Hide();
        }