Example #1
0
        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
            Dashboard_Login dsh = new Dashboard_Login();

            dsh.Show();
        }
Example #2
0
        private void BtnPasswordUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=LoginDB;Integrated Security=True");
                conn.Open();

                SqlCommand cmmd = new SqlCommand(@"insert into PasswordUpdate values ('" + textBoxPassUpdate1.Text +
                                                 "', " +
                                                 "'" + textBoxPassUpdate2.Text + "', '" + textBoxPassUpdate3.Text + "')", conn);

                cmmd.ExecuteNonQuery();
                conn.Close();
            }
            catch {
            }

            if (MessageBox.Show("Update registration complete") == DialogResult.OK)
            {
                this.Close();
                Dashboard_Login dsh = new Dashboard_Login();
                dsh.Show();
            }
        }