Example #1
0
        public bool sifremiunuttum(string Email)
        {
            Kullanicilar sorgu = (from c in col.Kullanicilars
                                  where c.Email == Email
                                  select c).FirstOrDefault();

            if (sorgu != null)
            {
                string parola = sorgu.Parola;

                MailMessage msg = new MailMessage();                                                                      //yeni bir mail nesnesi Oluşturuldu.
                msg.IsBodyHtml = true;                                                                                    //mail içeriğinde html etiketleri kullanılsın mı?

                msg.To.Add(Email);                                                                                        //Kime mail gönderilecek.
                msg.From    = new MailAddress("*****@*****.**", "izmitenucuzurun", System.Text.Encoding.UTF8); //mail kimden geliyor, hangi ifade görünsün?
                msg.Subject = "Parola Hatırlatma Maili";                                                                  //mailin konusu
                msg.Body    = "<a>Parolanız = " + parola + " </a>";                                                       //mailin içeriği

                SmtpClient smp = new SmtpClient();
                smp.Credentials = new NetworkCredential("*****@*****.**", "*******"); //kullanıcı adı şifre
                smp.Port        = 587;
                smp.Host        = "smtp.gmail.com";                                              //gmail üzerinden gönderiliyor.
                smp.EnableSsl   = true;
                smp.Send(msg);                                                                   //msg isimli mail gönderiliyor.

                return(true);
            }

            else
            {
                return(false);
            }
        }
Example #2
0
 public bool KullaniciKayit(Kullanicilar kullanici)
 {
     kullanici.Parola = MD5Sifrele(kullanici.Parola);
     col.Kullanicilars.Add(kullanici);
     col.SaveChanges();
     return(true);
 }
Example #3
0
        public void KullaniciOnayGüncelle(bool onay, int kullaniciid)
        {
            Kullanicilar veri = (from c in col.Kullanicilars
                                 where c.KullaniciId == kullaniciid
                                 select c).FirstOrDefault();

            if (veri != null)
            {
                veri.Onay = onay;
                col.SaveChanges();
            }
        }
Example #4
0
        public bool uyelikonaylama(string email, string sayi)
        {
            var sorgu = (from c in col.Kullanicilars
                         where c.Email == email && c.Sayi == sayi
                         select c).FirstOrDefault();

            if (sorgu != null)
            {
                Kullanicilar veri = (from c in col.Kullanicilars
                                     where c.Email == email
                                     select c).FirstOrDefault();
                veri.Onay = true;
                col.SaveChanges();

                return(true);
            }

            else
            {
                return(false);
            }
        }
Example #5
0
 public bool Kaydetme(Kullanicilar veri)
 {
     col.Kullanicilars.Add(veri);
     col.SaveChanges();
     return true;
 }
Example #6
0
 public bool KullaniciKayit(Kullanicilar kullanici)
 {
     kullanici.Parola = MD5Sifrele(kullanici.Parola);
     col.Kullanicilars.Add(kullanici);
     col.SaveChanges();
     return true;
 }
Example #7
0
 public bool Kaydetme(Kullanicilar veri)
 {
     col.Kullanicilars.Add(veri);
     col.SaveChanges();
     return(true);
 }