Пример #1
0
        public IEnumerable <Prodcat> GetTWLProdcatList(GetTWLProdcatListApi getTWLProdcatListApi)
        {
            var sb = new StringBuilder();

            if (!string.IsNullOrWhiteSpace(getTWLProdcatListApi.coNum))
            {
                sb.AppendFormatWithEscape("prodcat.co_num = '{0}'", getTWLProdcatListApi.coNum);
                if (!string.IsNullOrWhiteSpace(getTWLProdcatListApi.whNum))
                {
                    sb.AppendFormatWithEscape(" AND prodcat.wh_num = '{0}'", getTWLProdcatListApi.whNum);
                    if (!string.IsNullOrWhiteSpace(getTWLProdcatListApi.prodcat))
                    {
                        sb.AppendFormatWithEscape(" AND prodcat.prodcat BEGINS '{0}'", getTWLProdcatListApi.prodcat);
                    }
                }
            }
            var where = sb.ToString();
            return(this.prodcatRepository.GetList(where, getTWLProdcatListApi.batchsize, getTWLProdcatListApi.fldlist));
        }
Пример #2
0
 public IEnumerable <Prodcat> GetTWLProdcatList(GetTWLProdcatListApi getTWLProdcatListApi)
 {
     return(this.prodcatService.GetTWLProdcatList(getTWLProdcatListApi));
 }