示例#1
0
        private void btn_exit_Click(object sender, EventArgs e)
        {
            frm_user form = new frm_user();

            form.Show();
            this.Hide();
        }
        private void btn_switch_Click(object sender, EventArgs e)
        {
            frm_user f1 = new frm_user();

            f1.Show();
            con.Dispose();
            this.Hide();
        }
示例#3
0
 private void btn_submit_Click(object sender, EventArgs e)
 {
     if (txt_new.Text == txt_confirm.Text)
     {
         con.Open();
         OleDbCommand cmd = new OleDbCommand();
         cmd.Connection  = con;
         cmd.CommandText = "UPDATE LOGIN SET [Password]='" + txt_new.Text + "' WHERE [Password]='" + txt_old.Text + "'";
         cmd.ExecuteNonQuery();
         MessageBox.Show("Password has been changed successfully");
         con.Close();
         frm_user form = new frm_user();
         form.Show();
         this.Hide();
     }
     else
     {
         MessageBox.Show("Try Again!");
     }
 }