示例#1
0
        private void UyeAraTxtBox_TextChanged(object sender, EventArgs e) // ÜYE ARAMAK İÇİN TEXTCHANGED
        {
            TumUyelerGridView.DataSource = null;
            DataTable dt = BLL_Uye.UyeAra(UyeAraTxtBox.Text);

            TumUyelerGridView.DataSource = dt;
        }
示例#2
0
        private void ProfilGuncelleButon_Click(object sender, EventArgs e)
        {
            E_Uye uye = new E_Uye();

            uye.TC            = Session.TC;
            uye.Sehir         = PGSehirComboBox.SelectedItem.ToString();
            uye.Adres         = PGAdresTxtBox.Text;
            uye.Telefon       = PGTelTxtBox.Text;
            uye.EhliyetSinifi = PGEhSinifTxtBox.Text;
            uye.EhliyetYili   = Convert.ToInt32(PGEhYilNumeric.Value);

            int durum = BLL_Uye.UyeProfilGuncelle(uye);

            if (durum == -1)
            {
                MessageBox.Show("Girdiğiniz verileri kontrol edin.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if (durum == 0)
            {
                MessageBox.Show("Bilgiler güncellenirken bir sorun oluştu.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Güncelleme başarıyla gerçekleştirildi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                GuncelleCheckBox.Checked       = false;
                ProfilGuncelleGroupBox.Enabled = false;
                TextBoxTemizle();
                PGSehirComboBox.SelectedIndex = -1;
                PGEhYilNumeric.Value          = 0;
                ProfilVerileri();
            }
        }
示例#3
0
        private void UyeOlButon_Click(object sender, EventArgs e)
        {
            if (SifreTekrarTxtBox.Text == SifreTxtBox.Text)
            {
                E_Uye ekle = new E_Uye();

                ekle.Eposta      = EpostaTxtBox.Text;
                ekle.Sifre       = SifreTxtBox.Text;
                ekle.TC          = TCTxtBox.Text;
                ekle.Ad          = AdTxtBox.Text;
                ekle.Soyad       = SoyadTxtBox.Text;
                ekle.DogumTarihi = DogumTarihPicker.Value;
                if (radioButton1.Checked == true)
                {
                    ekle.Cinsiyet = Convert.ToChar(radioButton1.Text);
                }
                else
                {
                    ekle.Cinsiyet = Convert.ToChar(radioButton2.Text);
                }

                ekle.Sehir         = SehirComboBox.Text.ToString();
                ekle.Adres         = AdresTxtBox.Text;
                ekle.Telefon       = TelTxtBox.Text;
                ekle.EhliyetSinifi = EhSinifTxtBox.Text;
                ekle.EhliyetYili   = Convert.ToInt32(EhYilNumeric.Value);

                int durum = BLL_Uye.UyeEkle(ekle);

                if (durum == -1)
                {
                    MessageBox.Show("Lütfen tüm alanları eksiksiz doldurunuz.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                else if (durum == 0)
                {
                    MessageBox.Show("Bu e-posta zaten kayıtlı.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                else if (durum == 1)
                {
                    MessageBox.Show("Bu TC No zaten kayıtlı.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                else if (durum == 2)
                {
                    MessageBox.Show("Kayıt işlemi başarıyla tamamlandı.\nBilgileriniz e-posta adresinize gönderildi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Mail posta = new Mail();
                    posta.MailGonder(EpostaTxtBox.Text, SifreTxtBox.Text, AdTxtBox.Text, SoyadTxtBox.Text);
                    GirisForm yeni = new GirisForm();
                    yeni.Show();
                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("Giridğiniz şifreler uyuşmuyor.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#4
0
        void TumUyeGridVerileri() //YÖNETİCİ İÇİN TÜM ÜYELER
        {
            TumUyelerGridView.DataSource = null;
            DataTable dt = BLL_Uye.TumUyeler();

            TumUyelerGridView.DataSource = dt;
            TumUyelerGridView.Refresh();
        }
示例#5
0
        //-----------------------------------------------------------------------------------------
        //ÜYE PROFİL SAYFASI

        void ProfilVerileri()
        {
            E_Uye uye = BLL_Uye.UyeninProfilVerileri(Session.TC);

            ProfilEpostaLabel.Text   = uye.Eposta.ToString();
            ProfilAdLabel.Text       = uye.Ad.ToString();
            ProfilSoyadLabel.Text    = uye.Soyad.ToString();
            ProfilDgmTarihLabel.Text = uye.DogumTarihi.ToShortDateString();
            ProfilCinsiyetLabel.Text = uye.Cinsiyet.ToString();
            ProfilSehirLabel.Text    = uye.Sehir.ToString();
            ProfilAdresLabel.Text    = uye.Adres.ToString();
            ProfilTelLabel.Text      = uye.Telefon.ToString();
            ProfilEhSinifLabel.Text  = uye.EhliyetSinifi.ToString();
            ProfilEhYilLabel.Text    = uye.EhliyetYili.ToString();
            ProfilKytTarihLabel.Text = uye.KayitTarihi.ToString();
        }
示例#6
0
        private void GirisYapButon_Click(object sender, EventArgs e)
        {
            E_Uye uye = new E_Uye();

            uye.Eposta = EpostaTxtBox.Text;
            uye.Sifre  = SifreTxtBox.Text;
            int durum = BLL_Uye.UyeGiris(uye);

            if (durum == 0 || durum == -1)
            {
                MessageBox.Show("E-posta yada şifrenizi kontrol edin.");
            }
            else if (durum == 1) //DÖNEN YETKİ 1 İSE MÜŞTERİ
            {
                E_Uye bilgi = BLL_Uye.UyeBilgiGetir(uye.Eposta, uye.Sifre);

                Session.TC       = bilgi.TC;
                Session.UyeAd    = bilgi.Ad;
                Session.UyeSoyad = bilgi.Soyad;
                Session.Eposta   = uye.Eposta;
                Session.Yetki    = 1;


                KullaniciArayuz kullanici = new KullaniciArayuz();
                kullanici.Show();
                this.Hide();
            }
            else if (durum == 2) //DÖNEN YETKİ 2 İSE ŞUBE
            {
                E_Sube bilgi = BLL_Sube.SubeIDGetir(uye.Eposta, uye.Sifre);
                Session.UyeAd  = bilgi.Ad;
                Session.SubeID = bilgi.ID;
                SubeArayuz sube = new SubeArayuz();
                sube.Show();
                this.Hide();
            }
            else if (durum == 3) //DÖNEN YETKİ 3 İSE YÖNETİCİ
            {
                YonetimArayuz yonetim = new YonetimArayuz();
                yonetim.Show();
                this.Hide();
            }
        }
示例#7
0
 private void SifreGuncelleButon_Click(object sender, EventArgs e)
 {
     if (EskiSifreTxtBox.Text.Length > 5 && YeniSifreTxtBox.Text.Length > 5 && YeniTekrarTxtBox.Text.Length > 5)
     {
         E_Uye kontrol = new E_Uye();
         kontrol.Eposta = Session.Eposta;
         kontrol.Sifre  = EskiSifreTxtBox.Text.ToString();
         int durum = BLL_Uye.UyeGiris(kontrol);
         if (durum > 0)
         {
             if (YeniSifreTxtBox.Text.ToString() == YeniTekrarTxtBox.Text.ToString())
             {
                 E_Uye uye = new E_Uye();
                 uye.Eposta = Session.Eposta;
                 uye.Sifre  = YeniSifreTxtBox.Text.ToString();
                 int durum2 = BLL_Uye.UyeSifreDegistir(uye);
                 if (durum2 == 0 || durum2 == -1)
                 {
                     MessageBox.Show("Şifre değiştirilirken bir sorun oluştu.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
                 else
                 {
                     MessageBox.Show("Şifreniz değiştirildi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                     TextBoxTemizle();
                 }
             }
             else
             {
                 MessageBox.Show("Yeni şifreniz tekrarıyla uyuşmuyor.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
         else
         {
             MessageBox.Show("Eski şifrenizi kontrol ediniz.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     else
     {
         MessageBox.Show("Girdiğiniz şifreleri kontrol ediniz.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
示例#8
0
        private void YoneticiEkleButon_Click(object sender, EventArgs e) // YÖNETİCİ EKLEME İŞLEMİ
        {
            E_Uye uye = new E_Uye();

            uye.Eposta = YEPostaTxtBox.Text;
            uye.Sifre  = YSifreTxtBox.Text;
            int durum = BLL_Uye.YoneticiEkle(uye);

            if (durum == 0)
            {
                MessageBox.Show("Bu e-posta zaten kayıtlı.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if (durum == -1)
            {
                MessageBox.Show("Girilen verileri kontrol edin.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if (durum == 1)
            {
                MessageBox.Show("Kayıt başarılı.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                YEPostaTxtBox.Clear();
                YSifreTxtBox.Clear();
            }
        }