Example #1
0
        // show the advertisements which are unprocessed
        public ActionResult Index()
        {
            if (HttpContext.Session["ID"] != null && !HttpContext.Session["ID"].ToString().Equals(""))
            {
                //  UniversityStaff staff =db.UniversityStaffs.Find((int)HttpContext.Session["staffID"]);

                return(View("index", advertisementDAO.GetAdvsUnprocessed()));
            }
            else
            {
                TempData["Message"] = "please login in again!";
                return(RedirectToAction("Login", "Login"));
            }
            // List<Advertisement> advertisements=advertisementDAO.GetAdvsUnprocessed();
            // return View("Index",advertisements);
        }