Ejemplo n.º 1
0
        public IEnumerable <Depmst> GetTWLDepartments(string coNum, string whNum, int batchsize = 0, string fldlist = "")
        {
            var getTWLDepartmentsApi = new GetTWLDepartmentsApi()
            {
                coNum     = coNum,
                whNum     = whNum,
                batchsize = batchsize,
                fldlist   = fldlist
            };

            return(this.depmstService.GetTWLDepartments(getTWLDepartmentsApi));
        }
Ejemplo n.º 2
0
        public IEnumerable <Depmst> GetTWLDepartments(GetTWLDepartmentsApi getTWLDepartmentsApi)
        {
            var sb = new StringBuilder();

            if (!string.IsNullOrWhiteSpace(getTWLDepartmentsApi.coNum))
            {
                sb.AppendFormatWithEscape("depmst.co_num = '{0}'", getTWLDepartmentsApi.coNum);
                if (!string.IsNullOrWhiteSpace(getTWLDepartmentsApi.whNum))
                {
                    sb.AppendFormatWithEscape(" AND depmst.wh_num = '{0}'", getTWLDepartmentsApi.whNum);
                }
                if (getTWLDepartmentsApi.deptNum > 0)
                {
                    sb.AppendFormatWithEscape(" AND depmst.dept_num = '{0}'", getTWLDepartmentsApi.deptNum);
                }
                if (!string.IsNullOrWhiteSpace(getTWLDepartmentsApi.deptType))
                {
                    sb.AppendFormatWithEscape(" AND depmst.dept_type = '{0}'", getTWLDepartmentsApi.deptType);
                }
            }
            var where = sb.ToString();
            return(this.depmstRepository.GetList(where, getTWLDepartmentsApi.batchsize, getTWLDepartmentsApi.fldlist));
        }
Ejemplo n.º 3
0
 public IEnumerable <Depmst> GetTWLDepartments(GetTWLDepartmentsApi getTWLDepartmentsApi)
 {
     return(this.depmstService.GetTWLDepartments(getTWLDepartmentsApi));
 }