コード例 #1
0
        public async Task <Tracking[]> TraceByWaybillNo(TraceByWaybillDto TraceByWaybillDto)
        {
            ClientInformation objClientInformation = new ClientInformation();

            objClientInformation.ClientID = TraceByWaybillDto.clientID;
            objClientInformation.Password = TraceByWaybillDto.password;
            objClientInformation.Version  = TraceByWaybillDto.version;
            return(await client.TraceByWaybillNoAsync(objClientInformation, TraceByWaybillDto.WaybillNo));
        }
コード例 #2
0
        public async Task <IActionResult> TraceByWaybill([FromBody] TraceByWaybillDto TraceByWaybillDto)
        {
            try
            {
                Tracking[] TraceByWaybillResponse = new Tracking[0];
                return(Ok(TraceByWaybillResponse));
                //await _NaqelServices.TraceByWaybillNoDetails(TraceByWaybillDto);
                //if (TraceByWaybillResponse.Length > 0)
                //{
                //    return Ok(TraceByWaybillResponse);
                //}
                //else
                //{
                //    return BadRequest(new GenericResultDto<string> { Result = "There is no information on the Waybill, Please try again later" });
                //}
            }

            catch (Exception err)
            {
                return(BadRequest(new GenericResultDto <string> {
                    Result = err.Message
                }));
            }
        }
コード例 #3
0
 public async Task <Tracking[]> TraceByWaybillNoDetails(TraceByWaybillDto TraceByWaybillDto)
 {
     return(await _NaqelDataAccess.TraceByWaybillNo(TraceByWaybillDto));
 }