private void button2_Click_1(object sender, RoutedEventArgs e) { Main_Menu a = new Main_Menu(); a.Show(); this.Hide(); }
private void button_Click(object sender, RoutedEventArgs e) { OracleCommand cmd = new OracleCommand("select * from login where username='******' and password='******'", con); OracleDataReader odr = cmd.ExecuteReader(); if (odr.Read()) { String s = odr["user_admin"].ToString(); if (s == "User") { this.Hide(); String sql1 = "create or replace view selected_customer as select customer_id from login where customer_id=" + odr["customer_id"].ToString(); OracleCommand cmd1 = new OracleCommand(sql1, con); cmd1.ExecuteNonQuery(); Main_Menu a = new Main_Menu(); a.Show(); } else { Admin a = new Admin(); this.Hide(); a.Show(); } mediaElement.Stop(); } else { MessageBox.Show("Login Failed. Try Again"); } }
private void button2_Click_1(object sender, RoutedEventArgs e) { Main_Menu b = new Main_Menu(); b.Show(); this.Hide(); mediaElement.Stop(); }