Exemple #1
0
        public static ReportKeyValueListResponseFloatDto GetSuperUserSellerReportDelivered(SuperUserReportSellerDeliveredRequest request)
        {
            ReportKeyValueListResponseFloatDto response = new ReportKeyValueListResponseFloatDto();

            try
            {
                if (!SuperUserServices.CheckSuperUser(request.user_id, request.auth_token, response))
                {
                    response.message = MessagesSource.GetMessage("invalid.super.user");
                    return(response);
                }

                SellerReportDeliveredRequest req = new SellerReportDeliveredRequest
                {
                    entity_id       = request.agency_id,
                    periodical_data = request.periodical_data,
                    for_role        = UserType.SuperUser
                };

                return(ReportsServices.GetSellerReportSellerReportDelivered(req));
            }
            catch (Exception e)
            {
                response.MakeExceptionResponse(e);
                return(response);
            }
        }
        public NegotiatedContentResult <ReportKeyValueListResponseFloatDto> PostGetSellerReportDeliveredSUser([FromBody] SuperUserReportSellerDeliveredRequest request)
        {
            ReportKeyValueListResponseFloatDto resp = ReportsServices.GetSuperUserSellerReportDelivered(request);

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