protected void lnkOnayla_Click(object sender, EventArgs e)
    {
        UyeIslem yeni  = new UyeIslem();
        int      UyeId = (int)((NuyeBilgi)Session[SiteTanim.QSKullaniciSession]).UyeId;
        var      sonuc = yeni.UyeDuzenle(new NuyeOl
        {
            Ad        = txtAd.Text,
            Adres     = txtAdres.Text,
            TelefonNo = txtTelefonNo.Text,
            Soyad     = txtSoyad.Text,
            Email     = txtEmail.Text,
            Sifre     = txtSifre.Text,
            PostaKodu = Convert.ToInt32(txtPostaKodu.Text),
            UyeId     = UyeId
        });

        if (sonuc.Basarilimi)
        {
            Response.Redirect("/user/uyelik-bilgilerim.aspx");
        }
        else
        {
            if (sonuc.HataBilgi != null)
            {
                lbMesaj.Text = "Bir hata oluştu";
            }
            else
            {
                lbMesaj.Text = sonuc.Mesaj;
            }
        }
    }
示例#2
0
    protected void btnGiris_Click(object sender, EventArgs e)
    {
        UyeIslem uye   = new UyeIslem();
        var      sonuc = uye.Giris(KullaniciAdi.Value, password.Value);

        if (sonuc.Basarilimi)
        {
            Session[SiteTanim.QSKullaniciSession] = sonuc.Veri;
            Response.Redirect("/yonetim/default.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        UyeIslem yeni  = new UyeIslem();
        var      sonuc = yeni.UyelikBilgileriGetirHepsini();

        if (sonuc.Basarilimi)
        {
            rptUyeler.DataSource = sonuc.Veri;
            rptUyeler.DataBind();
        }
    }
示例#4
0
    protected void btnGonder_Click(object sender, EventArgs e)
    {
        UyeIslem yeni  = new UyeIslem();
        var      sonuc = yeni.SifremiUnuttum(txtEmail.Text);

        if (sonuc.Basarilimi) //Eger sistemde girilen email varsa
        {
            string body = string.Empty;
            using (StreamReader reader = new StreamReader(Server.MapPath("~/MailSablon/mailsablonsifresifirlama.htm")))
            {
                body = reader.ReadToEnd();
            }


            body = body.Replace("{AdSoyad}", sonuc.Veri.Adi + " " + sonuc.Veri.Soyadi);
            body = body.Replace("{Sifre}", sonuc.Veri.Sifre);
            body = body.Replace("{Mail}", sonuc.Veri.Eposta);

            MailMessage mesaj = new MailMessage();
            mesaj.To.Add(new MailAddress(txtEmail.Text));                                                                     //Mailin kime gönderileceği
            mesaj.From       = new MailAddress("*****@*****.**", "Adhibe-Property", System.Text.Encoding.UTF8); //Mailin kimden gönderileceği.
            mesaj.Subject    = "Adhibe Kullanıcı Bilgileri";                                                                  //Mailin konusu.
            mesaj.Body       = body;
            mesaj.IsBodyHtml = true;


            //Mail içeriği.
            SmtpClient client = new SmtpClient();
            client.Host        = "smtp.adhibe-property.com";//Gmailin kullandığı adres.
            client.Port        = 587;
            client.Credentials = new NetworkCredential("*****@*****.**", "Adhibe6541");
            client.EnableSsl   = false;
            try
            {
                client.Send(mesaj);//Yukarıda oluşturdugumuz maili gönderiyoruz.
                lblbilgi.Text = "Şifreniz e-mail adresinize gönderilmiştir.";
            }
            catch
            {
                lblbilgi.Text = "Mesaj gönderilirken bir hata oluştu.";
            }
        }
        else
        {
            lblbilgi.Text = "E-mail adresi bulunamadı."; //Kayıtlı bir adres yoksa bilgi labelimize yazdırıyoruz.
        }

        System.Threading.Thread.Sleep(2000);//İşlemi 2 saniyeliğine askıya alıyoruz.
    }
示例#5
0
    protected void SifreDegistir_Click(object sender, EventArgs e)
    {
        int      UyeId = (int)((NuyeBilgi)Session[SiteTanim.QSKullaniciSession]).UyeId;
        UyeIslem yeni  = new UyeIslem();
        var      sonuc = yeni.SifreDegistir(ayarlar.Temizle(txtEskiSifre.Text), ayarlar.Temizle(txtYeniSifre.Text), UyeId);

        if (sonuc.Basarilimi)
        {
            lblMesaj.Text = "Şifre değiştirme işlemi gerçekleştirildi.";
        }
        else
        {
            lblMesaj.Text = sonuc.Mesaj;
        }
    }
示例#6
0
    protected void Onayla_Click(object sender, EventArgs e)
    {
        UyeIslem uye   = new UyeIslem();
        var      sonuc = uye.Giris(ayarlar.Temizle(txtEmail.Text), ayarlar.Temizle(txtSifre.Text));

        if (sonuc.Basarilimi)
        {
            Session[SiteTanim.QSKullaniciSession] = sonuc.Veri;
            Response.Redirect("/default.aspx");
        }
        else
        {
            lblMesaj.Text = sonuc.Mesaj;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            return;
        }
        UyeIslem yeni = new UyeIslem();

        UyeId = ((NuyeBilgi)Session[SiteTanim.QSKullaniciSession]).UyeId;
        var sonuc = yeni.UyelikBilgileriGetir(UyeId);

        if (sonuc.Basarilimi)
        {
            txtAd.Text        = sonuc.Veri.Adi;
            txtPostaKodu.Text = Convert.ToString(sonuc.Veri.PostaKodu);
            txtTelefonNo.Text = sonuc.Veri.Telefon;
            txtEmail.Text     = sonuc.Veri.Eposta;
            txtSoyad.Text     = sonuc.Veri.Soyadi;
            txtSifre.Text     = sonuc.Veri.Sifre;
            txtAdres.Text     = sonuc.Veri.Adres;
        }
    }
    protected void lnkOnayla_Click(object sender, EventArgs e)
    {
        NuyeOl yeni = new NuyeOl
        {
            Ad         = ayarlar.Temizle(txtAd.Text),
            Soyad      = ayarlar.Temizle(txtSoyad.Text),
            Adres      = ayarlar.Temizle(txtAdres.Text) + ayarlar.Temizle(txtAdres2.Text) + ayarlar.Temizle(txtAdres3.Text),
            PostaKodu  = int.Parse(ayarlar.Temizle(txtPostaKodu.Text)),
            UlkeId     = int.Parse(drpUlke.SelectedValue),
            SehirAd    = ayarlar.Temizle(txtSehirAd.Text),
            TelefonNo  = ayarlar.Temizle(txtTelefonNo.Text),
            KayitTarih = DateTime.Now,
            Email      = ayarlar.Temizle(txtEmail.Text),
            Sifre      = ayarlar.Temizle(txtSifre.Text),
            UyeTip     = (int)UyeTip.Bireysel
        };

        UyeIslem uye   = new UyeIslem();
        var      sonuc = uye.UyeOl(yeni);

        if (sonuc.Basarilimi == true)
        {
            Session[SiteTanim.QSKullaniciSession] = sonuc.Veri;
            Response.Redirect("/default.aspx");
        }
        else
        {
            if (sonuc.HataBilgi != null)
            {
                lblMesaj.Text = "Bir hata oluştu.";
            }
            else
            {
                lblMesaj.Text = sonuc.Mesaj;
            }
        }
    }