Пример #1
0
 private void AddRecord(DataMatchUploadRequest dataMatchUploadRequest)
 {
     if (dataMatchUploadRequest == null)
     {
         return;
     }
     UploadRequests.Add(dataMatchUploadRequest);
 }
Пример #2
0
        public async Task <DataMatchUploadResponse> Post([FromBody] DataMatchUploadRequest dataMatchUploadRequest)
        {
            DataMatchUploadResponse dataMatchUploadResponse = new DataMatchUploadResponse();

            dataMatchUploadResponse.fileId          = GetFileIdFromHeader();
            dataMatchUploadResponse.businessId      = GetBusinessIdFromHeader();
            dataMatchUploadResponse.ResponseHeader  = new ResponseHeader(dataMatchUploadRequest.RequestHeader);
            dataMatchUploadResponse.ResponseDetails = new List <ResponseDetail>();
            foreach (Detail detail in dataMatchUploadRequest.RequestDetail)
            {
                ResponseDetail responseDetail = new ResponseDetail(detail);
                dataMatchUploadResponse.ResponseDetails.Add(responseDetail);
            }
            dataMatchUploadResponse = Validate(dataMatchUploadResponse);
            AddRecord(dataMatchUploadRequest);
            return(dataMatchUploadResponse);
        }