Пример #1
0
 private void btnUyeOl_Click(object sender, EventArgs e)
 {
     if (txtAdi.Text.Trim() != "" && txtSoyadi.Text.Trim() != "" && txtMail.Text.Trim() != "" && txtSifre.Text.Trim() != "" && txtTelefon.Text.Trim() != "" && txtAdres.Text.Trim() != "")
     {
         cKullanicilar k     = new cKullanicilar();
         bool          sonuc = k.KullaniciKontrol(txtMail.Text, txtSifre.Text);
         if (sonuc)
         {
             MessageBox.Show("Bu Kullanıcı Kayıtlıdır");
             txtAdi.Focus();
         }
         else
         {
             k.KullaniciAd    = txtAdi.Text;
             k.KullaniciSoyad = txtSoyadi.Text;
             k.Mail           = txtMail.Text;
             k.Sifre          = txtSifre.Text;
             k.Telefon        = txtTelefon.Text;
             k.Adres          = txtAdres.Text;
             sonuc            = k.KullaniciEkle(k);
             if (sonuc)
             {
                 MessageBox.Show("Kaydınız Tamamlandı");
                 this.Close();
             }
         }
     }
 }
Пример #2
0
 private void btnGiris_Click(object sender, EventArgs e)
 {
     if (txtMail.Text.Trim() != "" && txtSifre.Text.Trim() != "")
     {
         cKullanicilar k     = new cKullanicilar();
         bool          sonuc = k.KullaniciKontrol(txtMail.Text, txtSifre.Text);
         if (sonuc)
         {
             MessageBox.Show("Mail veya Şifre Yanlış");
         }
         else
         {
             frmBiletAl frm = new frmBiletAl();
             k.KullaniciNoGetir(txtMail.Text, frm.txtkullanici);
             this.Close();
             frm.Show();
         }
     }
     else
     {
         MessageBox.Show("Mail ve Şifre Alanı Boş Bırakılamaz");
     }
 }