Ejemplo 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));
        }
Ejemplo n.º 2
0
 public List <Student> GetAll()
 {
     return(dal.GetAll());
 }
Ejemplo n.º 3
0
 public IEnumerable <student> GetStudents()
 {
     return(studentDAL.GetAll());
 }
Ejemplo n.º 4
0
 public ICollection <Student> GetList()
 {
     return(_studentDAL.GetAll());
 }