コード例 #1
0
        public ActionResult Attendance()
        {
            var businessFacade = new BusinessLayer.BusinessFacade();
            var users          = businessFacade.StudentList();

            return(View(users));
        }
コード例 #2
0
        public JsonResult GetStudentAttendanceProgress(int studentId)
        {
            //1) make call to Business facade to calculate the student's progress
            var businessFacade  = new BusinessLayer.BusinessFacade();
            var studentProgress = businessFacade.CalculateStudentProgess(studentId);

            return(Json(studentProgress.GetProgressList(), JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
        public ActionResult Authenticate(LogonUserModel user)
        {
            var businessFacade = new BusinessLayer.BusinessFacade();
            var response       = businessFacade.AuthenticateUser(user);
            var errorMessage   = response.GetErrorMessage();

            TempData.Add("ErrorMessage", errorMessage);
            TempData.Add("UserId", response.GetUserId());
            return(RedirectToAction(response.GetRedirectUrl()));
        }
コード例 #4
0
        public ActionResult SignOn(LogonUserModel user)
        {
            var businessFacade = new BusinessLayer.BusinessFacade();
            var response       = businessFacade.AuthoriseAccessCard();

            //TempData.Add("UserId", response.GetUserId());
            //TempData.Add("IsAuthorised", response.IsAuthorised);

            //return RedirectToAction(response.GetRedirectUrl());
            return(null);
        }
コード例 #5
0
        // GET: Student
        public ActionResult Index()
        {
            var businessFacade = new BusinessLayer.BusinessFacade();
            var users          = businessFacade.StudentList();

            //var students = from s in users select s;
            //if (!String.IsNullOrEmpty(search))
            //{
            //    users = users.Where(s => s.FirstName.Contains(search));
            //}
            return(View(users));
        }