public ActionResult Index() { if (Session["LogedUserID"] != null) { try { var doc = db.SP_SelectAlerts(); return(View(doc)); } catch (Exception ex) { return(View()); } } else { return(RedirectToAction("../Login/Index")); } }