private void btnGiris_Click(object sender, EventArgs e) { string kullaniciAdi = txtKullaniciAdi.Text; string sifre = txtSifre.Text; tblKullanicilar k; if ((k = MamiKatmanı.Login(kullaniciAdi, sifre)) != null) { Kullanici = k; MessageBox.Show("Giriş Başarılı", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); Form frmAnaMenü = new frmParent(); frmAnaMenü.Show(); this.Hide(); } else { MessageBox.Show("Kullanıcı adı veya şifre hatalı!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }