コード例 #1
0
 public ActionResult KayitOl(KayitModal model)
 {
     if (ModelState.IsValid)
     {
         KullaniciYonet           ky         = new KullaniciYonet();
         BLHatalar <Kullanicilar> kayitsonuc = ky.KullaniciKayit(model);
         if (kayitsonuc.Hata.Count > 0)
         {
             kayitsonuc.Hata.ForEach(x => ModelState.AddModelError("", x));
             return(View(model));
         }
     }
     return(View());
 }
コード例 #2
0
        public ActionResult Giris(LoginModal model)
        {
            if (ModelState.IsValid)
            {
                KullaniciYonet           ky         = new KullaniciYonet();
                BLHatalar <Kullanicilar> kayitsonuc = ky.LoginUser(model);

                if (kayitsonuc.Hata.Count > 0)
                {
                    kayitsonuc.Hata.ForEach(x => ModelState.AddModelError("", x));
                    return(View(model));
                }
                Session["login"] = kayitsonuc.sonuc;

                return(RedirectToAction("Index"));
            }
            return(View(model));
        }