Example #1
0
        public HttpResponseMessage reportTinhTrangBo3([FromBody] ReportTinhTrangBoRequest request)
        {
            var response = new ReportTinhTrangBoResponse();

            if (TokenBUS.tokenCheck(request, response, 3))
            {
                ChamSocBUS.ReportTinhTrangBo(request, ref response);
                if (response.IsError)
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, response));
                }
                else
                {
                    response.Data = ChamSocRepository.ReportTinhTrangBo(request.NgayBatDau);
                }
            }
            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }
Example #2
0
        public HttpResponseMessage reportTinhTrangBo2([FromBody] ReportTinhTrangBoRequest request)
        {
            var response  = new ReportTinhTrangBoResponse();
            var tokendata = TokenBUS.tokenData(request, response, 2);

            if (!response.IsError)
            {
                ChamSocBUS.ReportTinhTrangBo(request, ref response);
                if (response.IsError)
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, response));
                }
                else
                {
                    response.Data = ChamSocRepository.ReportTinhTrangBo(tokendata.AgencyId, request.NgayBatDau);
                }
            }
            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }