コード例 #1
0
        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();
                }
            }
        }
コード例 #2
0
 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.
 }