Пример #1
0
        //AgentBoss
        public static ReportKeyValueListResponseFloatDto GetAgentBossReportSellerOnTimeRequest(AgentBossReportSellerOnTimeRequest request)
        {
            ReportKeyValueListResponseFloatDto response = new ReportKeyValueListResponseFloatDto();

            try {
                if (!AgentBossServices.CheckAgentBoss(request.user_id, request.auth_token, response))
                {
                    response.message = MessagesSource.GetMessage("invalid.agentboss");
                    return(response);
                }

                SellerReportOnTimeRequest req = new SellerReportOnTimeRequest {
                    entity_id       = request.driver_id,
                    periodical_data = request.periodical_data,
                    for_role        = UserType.AgentBoss
                };

                return(ReportsServices.GetSellerReportOnTime(req));
            } catch (Exception e)
            {
                response.MakeExceptionResponse(e);
                return(response);
            }
        }
        public NegotiatedContentResult <ReportKeyValueListResponseFloatDto> PostGetSellerReportOnTimeBoss([FromBody] AgentBossReportSellerOnTimeRequest request)
        {
            ReportKeyValueListResponseFloatDto resp = ReportsServices.GetAgentBossReportSellerOnTimeRequest(request); //GetSellerReportOnTime(request, UserType.AgentBoss);

            return(Content(HttpStatusCode.OK, resp));
        }