示例#1
0
        private void home_Click(object sender, RoutedEventArgs e)
        {
            profile a = new profile();

            a.Show();
            this.Hide();
        }
示例#2
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            profile a = new profile();

            this.Hide();
            a.Show();
            mediaElement.Stop();
        }
示例#3
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            OracleCommand    cmd = new OracleCommand("select * from login natural join selected_customer", con);
            OracleDataReader odr = cmd.ExecuteReader();

            if (odr.Read())
            {
                if ((String.IsNullOrEmpty(old.Password)) || (String.IsNullOrEmpty(new1.Password)) || (String.IsNullOrEmpty(newcon.Password)))
                {
                    MessageBox.Show("Some Fields have been left blank.");
                }
                else
                {
                    if ((odr["password"].ToString() == old.Password) && (new1.Password == newcon.Password))
                    {
                        OracleCommand    cmd1 = new OracleCommand("update login set password='******' where customer_id =" + odr["customer_id"].ToString(), con);
                        OracleDataReader odr1 = cmd1.ExecuteReader();
                        MessageBox.Show("Password Changed.");
                        profile a = new profile();
                        a.Show();
                        this.Hide();
                    }
                    else
                    {
                        if ((odr["password"].ToString() != old.Password))
                        {
                            MessageBox.Show("Invalid Old Password");
                        }
                        else
                        {
                            MessageBox.Show("New Password and Confirm Passwords do not match.");
                        }
                    }
                }
            }
        }