public ActionResult Index() { if (Session[Helper.Sabitler.SessionKisiKey] == null || string.IsNullOrEmpty(Session[Helper.Sabitler.SessionKisiKey].ToString())) { return(RedirectToAction("Login", "Anasayfa")); } else { string kisiKey = Session[Helper.Sabitler.SessionKisiKey].ToString(); if (Convert.ToInt32(kisiKey) > 0) { YetkiBS s = new YetkiBS(); KISILER kisi = s.KisiBilgileriGetir(Convert.ToInt32(kisiKey)); ViewBag.adi = kisi.KisiAdi; return(View()); } else { return(RedirectToAction("Login", "Anasayfa")); } } /// return View(); }
public ActionResult Login(string sifre, string mail) { YetkiBS yet = new YetkiBS(); int kisiKey = yet.YetkiliMi(sifre, mail); if (kisiKey > 0) { // return Redirect("~/Home/Index"); // FormsAuthentication.SetAuthCookie(kisiKey.ToString(), false); //return RedirectToAction("Index", "Home", new { kisiKey = kisiKey }); Session[Helper.Sabitler.SessionKisiKey] = kisiKey.ToString(); return(RedirectToAction("Index", "Home")); } else { return(View()); } }