private void button2_Click(object sender, RoutedEventArgs e) { this.Hide(); profile pf = new profile(); pf.Show(); }
private void button1_Click(object sender, RoutedEventArgs e) { SqlCommand cmd = new SqlCommand("select count(*) from tl where email='" + textBox1.Text + "' and password='******'", con); con.Open(); int res = (int)cmd.ExecuteScalar(); con.Close(); if (res == 1) { this.Hide(); profile pf = new profile(); pf.Show(); } else { MessageBox.Show("Invalid user"); } }