public HttpResponseMessage Get(string securityToken, int schoolId, int classId, int sectionId, string type)
        {
            var response = new MonthlyReportResponse {
                Status = "OK"
            };

            if (IsValid(securityToken))
            {
                var svc = new AttendenceReportService(this._dbContext);
                if (type.Equals("Month", StringComparison.InvariantCultureIgnoreCase))
                {
                    response.Reports = svc.GetMonthlyReport(schoolId, classId, sectionId);
                }
                else
                {
                    response.Reports = svc.GetYearlyReport();
                }
            }
            else
            {
                response = new MonthlyReportResponse {
                    Status = "Error", ErrorCode = "ERR001", ErrorMessage = "Invalide security token"
                };
            }

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }
        public HttpResponseMessage Get(string securityToken, int schoolId, string studentId)
        {
            var response = new MonthlyReportVMResponse {
                Status = "OK"
            };

            if (IsValid(securityToken))
            {
                var svc = new AttendenceReportService(this._dbContext);
                response.Attendence = svc.GetMonthlyReportByStudent(schoolId, studentId);
            }
            else
            {
                response = new MonthlyReportVMResponse {
                    Status = "Error", ErrorCode = "ERR001", ErrorMessage = "Invalide security token"
                };
            }

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }
        public HttpResponseMessage Get(string securityToken, int schoolId, int classId, int sectionId)
        {
            var response = new DailyReportResponse {
                Status = "OK"
            };

            if (IsValid(securityToken))
            {
                var svc = new AttendenceReportService(this._dbContext);
                response.Reports = svc.GetDailyReport(schoolId, classId, sectionId);
            }
            else
            {
                response = new DailyReportResponse {
                    Status = "Error", ErrorCode = "ERR001", ErrorMessage = "Invalide security token"
                };
            }

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }