public ActionResult LoginKullanici(LoginViewModel model) { if (ModelState.IsValid) { BusinessLayerResult <Kullanicilar> res = k.LoginUser(model); if (res.Errors.Count > 0) { res.Errors.ForEach(x => ModelState.AddModelError("", x.Message)); return(View(model)); } Session["logink"] = res.Result; return(RedirectToAction("Index")); } return(View(model)); }
public ActionResult Login(LoginViewModel model) { BusinessLayerResult <KanBanKullanici> res = km.LoginUser(model); if (res.Hata.Count > 0) { if (res.Hata.Find(x => x.Kod == HataMesajiKodlari.KullaniciAktifDegil) != null) { ViewBag.SetLink = "http://Home/Login/134-5678-56546"; } res.Hata.ForEach(x => ModelState.AddModelError("", x.Mesaj)); return(View(model)); } CurrentSession.Set <KanBanKullanici>("login", res.Result);//session kullanıcı bilgi saklama return(RedirectToAction("SelectProject")); }