예제 #1
0
        public ActionResult Attendance()
        {
            var businessFacade = new BusinessLayer.BusinessFacade();
            var users          = businessFacade.StudentList();

            return(View(users));
        }
        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));
        }
        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()));
        }
        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));
        }