コード例 #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));
        }
コード例 #2
0
 public List <Student> GetAll()
 {
     return(dal.GetAll());
 }
コード例 #3
0
 public IEnumerable <student> GetStudents()
 {
     return(studentDAL.GetAll());
 }
コード例 #4
0
ファイル: StudentBLL.cs プロジェクト: elvanakdeniz/newRepo
 public ICollection <Student> GetList()
 {
     return(_studentDAL.GetAll());
 }