public void btnKaydet_Click(object sender, EventArgs e)//public yaptım hata verebilir
        {
            bool MailKontrol = EmailKontrol(txtMail.Text);

            if (MailKontrol == true)
            {
                SqlBolum bolum    = new SqlBolum();
                bool     kontroll = bolum.KayitKontrol(txtKullanici.Text, txtSifre.Text);

                if (kontroll == true)
                {
                    MessageBox.Show("hoop hemşerim!");
                }

                else
                {
                    int kod = DogrulamaKodu();
                    gonderilecekKod      = kod;
                    KullaniciAdiGonder   = txtKullanici.Text;
                    KullaniciSifreGonder = txtSifre.Text;
                    KullaniciMailGonder  = txtMail.Text;
                    MailGonder dogrulama = new MailGonder();
                    dogrulama.DogrulamaGonder(txtMail.Text, kod);
                    MailDogrulama dogrula = new MailDogrulama();
                    dogrula.Show();
                    MessageBox.Show("Dikkat ! Doğrulama kodunuz Gereksiz bölümüne gitmiş olabilir.");
                }
            }
            else
            {
                MessageBox.Show("MAİL ADRESİNİZ HATALI ! LÜTFEN KONTROL EDİNİZ.");
            }
        }
Esempio n. 2
0
        public void btnGonder_Click_1(object sender, EventArgs e) //BU KOD SATIRLARINDA BİLGİLERİNİ UNUTAN KULLANICIMIZA MAİL YOLUYLA HATIRLATMA İŞLEMİ GERÇEKLEŞTİRİYORUZ.
        {
            SqlBolum mailgonder = new SqlBolum();
            string   mailadresi = txtMail.Text;
            bool     varMi      = mailgonder.KayitHatirlatma(mailadresi);

            if (varMi == true)
            {
                SqlBolum   getir      = new SqlBolum();
                string     bilgi      = getir.gonder(txtMail.Text);
                MailGonder hatirlatma = new MailGonder();
                hatirlatma.KullaniciHatirlatma(mailadresi, bilgi);

                MessageBox.Show("kullanıcı bilgileri gönderildi");
                Dispose();
            }
            else
            {
                MessageBox.Show("kullanıcı mevcut değil");
            }
        }
        private void btnTekrar_Click(object sender, EventArgs e)// BU KOD SATIRLARINDA YANLIŞ GİRİLEN VEYA VERİLEN SÜRE İÇERİNDE GİRİLMEYEN KODU TEKRAR GÖNDERME İŞLEMİNİ GERÇEKLEŞTİRİYORUZ.
        {
            kodTekrari++;
            if (kodTekrari == 3)
            {
                Application.Exit();
            }
            else
            {
                KullaniciEkle ekle  = new KullaniciEkle();
                string        deger = KullaniciEkle.KullaniciMailGonder;
                int           kod   = KullaniciEkle.gonderilecekKod;


                MailGonder gonder = new MailGonder();
                gonder.DogrulamaGonder(deger, kod);

                MailDogrulama gir = new MailDogrulama();
                gir.Show();
                this.Hide();
            }
        }