示例#1
0
        public IEnumerable <Sapb> GetSapbByReportFunction(GetSapbByReportFunctionRequestApi getSapbByReportFunctionRequestApi)
        {
            var where = new StringBuilder();

            // Need to allow company 0 so don't default in current company
            if (getSapbByReportFunctionRequestApi.cono > 0)
            {
                where.Append($"sapb.cono = {getSapbByReportFunctionRequestApi.cono}");
            }

            if (!string.IsNullOrWhiteSpace(getSapbByReportFunctionRequestApi.currproc))
            {
                if (where.ToString().Length > 0)
                {
                    where.AppendFormat(" AND ");
                }
                where.AppendFormatWithEscape("sapb.currproc = '{0}'", getSapbByReportFunctionRequestApi.currproc);
            }
            if (!string.IsNullOrWhiteSpace(getSapbByReportFunctionRequestApi.reportnm))
            {
                if (where.ToString().Length > 0)
                {
                    where.AppendFormat(" AND ");
                }
                where.AppendFormatWithEscape("sapb.reportnm BEGINS '{0}'", getSapbByReportFunctionRequestApi.reportnm);
            }
            return(this.sapbRepository.GetList(where.ToString(), getSapbByReportFunctionRequestApi.batchsize, getSapbByReportFunctionRequestApi.fldlist));
        }
示例#2
0
 public IEnumerable <Sapb> GetSapbByReportFunction(GetSapbByReportFunctionRequestApi getSapbByReportFunctionRequestApi)
 {
     return(this.sapbService.GetSapbByReportFunction(getSapbByReportFunctionRequestApi));
 }