示例#1
0
        // GET: Home
        public ActionResult Index()
        {
            AnaokuluContext  db           = new AnaokuluContext();
            List <kullanici> kullanicilar = db.kullanici.ToList();

            return(View(db.kullanici.ToList()));
        }
示例#2
0
        public ActionResult SifremiUnuttum(string eposta)
        {
            AnaokuluContext db        = new AnaokuluContext();
            kullanici       kullanici = db.kullanici.Where(x => x.eposta == eposta).SingleOrDefault();

            if (kullanici != null)
            {
                //kullanici.sifre = new Random().Next(100000, 99999).ToString();
                //db.SaveChanges();
                string konu  = "Şifre Hatırlatma";
                string mesaj = "Yeni Şifreniz:" + kullanici.sifre;
                Eposta.Gonder(kullanici.eposta, konu, mesaj);
                ViewBag.Uyari = "Epostanıza şifreniz gönderilmiştir..";
            }
            else
            {
                ViewBag.Uyari = "Böyle Bir Eposta Adresi Bulunamadı..";
            }

            return(View());
        }
示例#3
0
        public ActionResult Index(string eposta, string sifre)

        {
            AnaokuluContext db  = new AnaokuluContext();
            kullanici       kkk = db.kullanici.Where(x => x.eposta == eposta && x.sifre == sifre).SingleOrDefault();

            if (kkk == null)
            {
                //bulunamadı
                ViewBag.Uyari = "Kullanıcı Bulunamadı:(";
            }
            else
            {
                //bulundu

                // ViewBag.Uyari = "Kullanici Bulundu:)";
                Session["kullanici"] = kkk;
                return(RedirectToAction("Index", "Home"));
            }
            return(View());
        }