コード例 #1
0
        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.");
            }
        }
コード例 #2
0
        private void btnGiris_Click(object sender, EventArgs e) //BU KOD SATIRLARINDA GİRİLEN GİRİŞ BİLGİLERİ DOĞRULTUSUNDA SİSTEME GİRİŞ YAPMA VEYA YAPAMAMA İŞLEMİNİ GERÇEKLEŞTİRDİK.
        {
            SqlBolum nesne        = new SqlBolum();
            string   id           = txtKullanici.Text;
            string   sifre        = txtSifre.Text;
            bool     kullanici_mi = false;

            kullanici_mi = nesne.KayitKontrol(id, sifre);

            if (kullanici_mi == true)
            {
                sifre        = txtSifre.Text;
                kullaniciadi = txtKullanici.Text;
                MessageBox.Show("GİRİŞ BAŞARILI");
                KullaniciAnasayfa AnasayfaGit = new KullaniciAnasayfa();
                AnasayfaGit.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("GİRİŞ BAŞARISIZ");
                txtKullanici.Text = "";
                txtSifre.Text     = "";
            }


            Console.ReadLine();
        }