private void button1_Click(object sender, EventArgs e) { if (txteskisifre.Text == Sifre) { if (txtyenisifre.Text == txtyenisifretekrar.Text) { try { nesne.sifreguncelle(KullaniciAd, txtyenisifre.Text); MessageBox.Show("Şifreniz değiştirildi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information); txteskisifre.Text = ""; txtyenisifre.Text = ""; txtyenisifretekrar.Text = ""; this.Hide(); } catch { MessageBox.Show("HATA", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } else { MessageBox.Show("Şifreler aynı olmalıdır", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } else { MessageBox.Show("Eski şifreniz doğrulanamadı!", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Stop); } }