コード例 #1
0
        private void btnkaydet_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(_entity.Parola))
            {
                txtParola.Text       = parola;
                txtParolaTekrar.Text = parola;
            }

            if (string.IsNullOrEmpty(_entity.Cevap))
            {
                txtCevap.Text = cevap;
            }

            if (txtParola.Text != txtParolaTekrar.Text)
            {
                MessageBox.Show("Girilen Parola Aynı Değil");
            }
            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.Cevap == txtCevap.Text && txtParola.Text == txtParolaTekrar.Text)
     {
         _entity.Parola = txtParola.Text;
         kullaniciDAL.AddOrUpdate(context, _entity);
         context.SaveChanges();
         MessageBox.Show("Parolanız Başarıyla Değiştirildi.");
         this.Close();
     }
 }
コード例 #3
0
 private void btnDegistir_Click(object sender, EventArgs e)
 {
     if (_entity.Cevap == txtCevap.Text && txtParola.Text == txtParolaTekrari.Text)
     {
         _entity.Parola = txtParola.Text;
         kullaniciDal.AddOrUpdate(context, _entity);
         context.SaveChanges();
         MessageBox.Show("Parolanız başarılı bir şekilde değiştirildi.");
         this.Close();
     }
 }
コード例 #4
0
 private void btnEkle_Click(object sender, EventArgs e)
 {
     if (_entity.Cevap == txtCevap.Text)
     {
         _entity.Parola = txtSifre.Text;
         kullanicidal.AddOrUpdate(context, _entity);
         context.SaveChanges();
         MessageBox.Show("Şifre Değişti.");
         this.Close();
     }
 }
コード例 #5
0
 private void btnEkle_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(_entity.Parola))
     {
         txtSifre.Text = parola;
     }
     if (string.IsNullOrEmpty(_entity.Cevap))
     {
         txtCevap.Text = cevap;
     }
     _entity.KayitTarihi = DateTime.Now;
     kullanicidal.AddOrUpdate(context, _entity);
     Kaydet();
     saved = true;
 }
コード例 #6
0
ファイル: frmKullaniciIslem.cs プロジェクト: damar89/EmdErp
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(_entity.Parola))
     {
         txtParola.Text        = parola;
         txtParolaTekrari.Text = parola;
     }
     if (string.IsNullOrEmpty(_entity.Cevap))
     {
         txtParola.Text        = cevap;
         txtParolaTekrari.Text = cevap;
     }
     if (txtParola.Text != txtParolaTekrari.Text)
     {
         MessageBox.Show("Girilmiş olan Parola alanları aynı olmak zorundadır.");
     }
     else
     {
         if (_entity.KayitTarihi == null)
         {
             _entity.KayitTarihi = DateTime.Now;
         }
         if (gridLookKasa.EditValue != null)
         {
             _entity.KasaId = Convert.ToInt32(gridLookKasa.EditValue);
         }
         if (gridlookDepo.EditValue != null)
         {
             _entity.DepoId = Convert.ToInt32(gridlookDepo.EditValue);
         }
         if (kullaniciDal.AddOrUpdate(context, _entity))
         {
             Kaydet();
             saved = true;
             this.Close();
         }
     }
 }