Esempio n. 1
0
        // GET: StudentController
        public ActionResult Index()
        {
            if (string.IsNullOrEmpty(HttpContext.Session.GetString("User")))
            {
                TempData["Pesan"] = "<span class='alert alert-danger'>Anda belum login/span>";
                return(RedirectToAction("Login", "User"));
            }
            else
            {
                TempData["Pesan"] = string.Empty;
            }

            if (TempData["Pesan"] != null)
            {
                ViewBag.Pesan = TempData["Pesan"];
            }

            var model = _student.GetAll().ToList();

            return(View(model));
        }
Esempio n. 2
0
 public List <Student> GetAll()
 {
     return(dal.GetAll());
 }
Esempio n. 3
0
 public IEnumerable <student> GetStudents()
 {
     return(studentDAL.GetAll());
 }
Esempio n. 4
0
 public ICollection <Student> GetList()
 {
     return(_studentDAL.GetAll());
 }