Example #1
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            if (Islemler.BosKontrol(txtAd.Text) && Islemler.BosKontrol(txtAciklama.Text))
            {
                yapilacakIsRepository.Ekle(new YapilacakIs()
                {
                    Aciklama    = txtAciklama.Text,
                    Tanim       = txtAd.Text,
                    KullaniciId = kullanici.Id
                });
                MessageBox.Show("İş eklendi");

                this.Close();
            }
            else
            {
                MessageBox.Show("Alanları boş bırakmayınız");
            }
        }
Example #2
0
 private void btnGiris_Click(object sender, EventArgs e)
 {
     if (Islemler.BosKontrol(txtKullaniciAd.Text) && Islemler.BosKontrol(txtSifre.Text))
     {
         var kullanici = kullaniciRepository.KullaniciGirisKontrol(txtKullaniciAd.Text, txtSifre.Text);
         if (kullanici != null)
         {
             //giriş başarılı
             //MessageBox.Show("Giriş yapan kullanici :" + kullanici.Ad);
             FrmIsler frmIsler = new FrmIsler(kullanici);
             frmIsler.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Kullanici adı veya şifreniz hatalı");
         }
     }
 }
        private void btnKaydol_Click(object sender, EventArgs e)
        {
            if (Islemler.BosKontrol(txtKullaniciAd.Text) && Islemler.BosKontrol(txtSifre.Text) && Islemler.BosKontrol(txtAd.Text) && Islemler.BosKontrol(txtSoyad.Text))
            {
                dapperKullaniciRepository.Kaydet(new Kullanici()
                {
                    Ad          = txtAd.Text,
                    KullaniciAd = txtKullaniciAd.Text,
                    Sifre       = txtSifre.Text,
                    Soyad       = txtSoyad.Text
                });

                MessageBox.Show("Kayıt işleminiz başarı ile gerçekleşti, sisteme giriş yapabilirsiniz", "Başarılı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
            else
            {
                lblDurum.Visible = true;
                lblDurum.Text    = "Alanlardan herhangi biri boş geçilemez";
            }
        }