private void button2_Click(object sender, EventArgs e) { ChoosePage cp = new ChoosePage(); cp.Show(); this.Hide(); }
private void btngirisyap_Click(object sender, EventArgs e) { string user = txtusername.Text; string pass = txtpassword.Text; MySqlCommand cmd = new MySqlCommand(); MySqlDataReader dr; baglanti.Open(); cmd.Connection = baglanti; cmd.CommandText = "SELECT * FROM tableuser where username='******' AND password='******'"; dr = cmd.ExecuteReader(); if (dr.Read()) { ChoosePage cp = new ChoosePage(); cp.Show(); this.Hide(); } else { MessageBox.Show("Kullanıcı adını ve şifrenizi kontrol ediniz."); txtusername.Clear(); txtpassword.Clear(); } baglanti.Close(); }