public ActionResult AttendanceReview()
        {
            try
            {
                //IAttendanceService attendanceReviewService = new AttendanceReviewService();
                //var studentAttendance = attendanceReviewService.GetAttendanceReview(StudentNo);

                //return View(studentAttendance);
                IAttendanceService attendanceReviewService = new AttendanceReviewService();

                DateTime dateFrom = DateTime.Now.AddDays(-35);
                DateTime dateTo   = DateTime.Now;

                var studentAttendance = attendanceReviewService.GetAttendanceReview(StudentNo, dateFrom, dateTo);

                return(View(studentAttendance));
            }
            catch (Exception ex)
            {
                _logger.Error("Exception Occurred in ReportsController", ex);

                //ViewData["ErrorMessage"] = ex.Message;
                Response.Redirect("../User/Result/error");

                return(null);
            }
        }
        public void AttendanceReviewService_Returns_Attendance_Review_Data_View_Model_For_Student_No_2917()
        {
            IAttendanceService attendanceService = new AttendanceReviewService();
            var studentAttendance = attendanceService.GetAttendanceReview(2917);

            Assert.IsNotNull(studentAttendance);
        }
        public void AttendanceReviewService_Returns_Attendance_Review_Data_For_Student_No_2917()
        {
            IAttendanceService attendanceR = new AttendanceReviewService();
            var attendancReport            = attendanceR.GetAttendanceReview(2917);

            Assert.IsNotNull(attendancReport);
        }
        public void AttendanceReviewService_Returns_Total_Completed_Hours_For_Student_No_2917()
        {
            IAttendanceService attendanceService = new AttendanceReviewService();
            var studentAttendance = attendanceService.GetAttendanceReview(2917);

            Assert.IsNotNull(studentAttendance.TotalCompletedHours);
        }
Пример #5
0
        public ActionResult AttendanceReview(string dateFrom, string dateTo, string returnUrl)
        {
            try
            {
                IAttendanceService attendanceReviewService = new AttendanceReviewService();

                DateTime dtDateFrom = Convert.ToDateTime(dateFrom);
                DateTime dtDateTo   = Convert.ToDateTime(dateTo);

                var studentAttendance = attendanceReviewService.GetAttendanceReview(StudentNo, dtDateFrom, dtDateTo);

                return(View(studentAttendance));
            }
            catch (Exception ex)
            {
                //ViewData["ErrorMessage"] = ex.Message;
                Response.Redirect("../User/Result/error");

                return(null);
            }
        }