Exemple #1
0
        public IEnumerable <Carrier> GetTWLCarriers(string coNum, string whNum, int batchsize = 0, string fldlist = "")
        {
            var getTWLCarriersApi = new GetTWLCarriersApi()
            {
                coNum     = coNum,
                whNum     = whNum,
                batchsize = batchsize,
                fldlist   = fldlist
            };

            return(this.carrierService.GetTWLCarriers(getTWLCarriersApi));
        }
Exemple #2
0
        public IEnumerable <Carrier> GetTWLCarriers(GetTWLCarriersApi getTWLCarriersApi)
        {
            var sb = new StringBuilder();

            if (!string.IsNullOrWhiteSpace(getTWLCarriersApi.coNum))
            {
                sb.AppendFormatWithEscape("carrier.co_num = '{0}'", getTWLCarriersApi.coNum);
                if (!string.IsNullOrWhiteSpace(getTWLCarriersApi.whNum))
                {
                    sb.AppendFormatWithEscape(" AND carrier.wh_num = '{0}'", getTWLCarriersApi.whNum);
                    if (!string.IsNullOrWhiteSpace(getTWLCarriersApi.carrierId))
                    {
                        sb.AppendFormatWithEscape(" AND carrier.carrier_id = '{0}'", getTWLCarriersApi.carrierId);
                    }
                }
            }
            var where = sb.ToString();
            return(this.carrierRepository.GetList(where, getTWLCarriersApi.batchsize, getTWLCarriersApi.fldlist));
        }
Exemple #3
0
 public IEnumerable <Carrier> GetTWLCarriers(GetTWLCarriersApi getTWLCarriersApi)
 {
     return(this.carrierService.GetTWLCarriers(getTWLCarriersApi));
 }