SqlCommand sqlGiris = new SqlCommand("SELECT * FROM musteriBilgileri where KullaniciAdi=@p1 AND sifre=@p2", baglanti);
sqlGiris.Parameters.AddWithValue("@p1", txtKullaniciAdi.Text);
sqlGiris.Parameters.AddWithValue("@p2", txtSifre.Text);
baglanti.Open();
dr = sqlGiris.ExecuteReader();
while (dr.Read())
{
yetkiseviyesi = Int32.Parse(dr["yetkiseviyesi"].ToString());
}
if (yetkiseviyesi == 0)
{
MusteriPaneli frMusteriPaneli = new MusteriPaneli();
this.Hide();
frMusteriPaneli.Show();
}
if (yetkiseviyesi == 1)
{
calisanPaneli frCalisanPaneli = new calisanPaneli();
this.Hide();
frCalisanPaneli.Show();
}
if (yetkiseviyesi == 2)
{
YoneticiPaneli frYoneticiPaneli = new YoneticiPaneli();
this.Hide();
frYoneticiPaneli.Show();
}