private void btnKaydet_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(_entity.Parola)) { txtParola.Text = parola; } if (string.IsNullOrEmpty(_entity.HatirlatmaCevap)) { txtCevap.Text = cevap; } if (txtParola.Text != txtParolaTekrar.Text) { XtraMessageBox.Show("Parola ve Parola Tekrar Alanlarında Uyuşmazlık."); } else { if (_entity.KayitTarihi == null) { _entity.KayitTarihi = DateTime.Now; } if (kullaniciDal.AddOrUpDate(context, _entity)) { Kaydet(); saved = true; this.Close(); } } }
private void btnKaydet_Click(object sender, EventArgs e) { if (_entity.HatirlatmaCevap == txtCevap.Text) { if (txtParola.Text == txtParolaTekrar.Text) { _entity.Parola = txtParola.Text; kullaniciDal.AddOrUpDate(context, _entity); context.SaveChanges(); XtraMessageBox.Show("Parolanız Başarıyla Değiştirildi."); } else { XtraMessageBox.Show("Girilen Parolalar Uyuşmuyor"); txtParola.Text = null; txtParolaTekrar.Text = null; } } else { XtraMessageBox.Show("Hatırlatma Sorusu Cevabı Yanlış"); } //Hata verirse tek if olabilir. }