示例#1
0
        public IEnumerable <Empmst> GetTWLEmployees(string coNum, string whNum, int batchsize = 0, string fldlist = "")
        {
            var getTWLEmployeesApi = new GetTWLEmployeesApi()
            {
                coNum     = coNum,
                whNum     = whNum,
                batchsize = batchsize,
                fldlist   = fldlist
            };

            return(this.empmstService.GetTWLEmployees(getTWLEmployeesApi));
        }
示例#2
0
 public IEnumerable <Empmst> GetTWLEmployees(string coNum, int type, string empNum, int batchsize = 0, string fldlist = "")
 {
     if (type == 1)
     {
         var getTWLEmployeesApi = new GetTWLEmployeesApi()
         {
             coNum     = coNum,
             whNum     = string.Empty,
             empNum    = empNum,
             batchsize = batchsize,
             fldlist   = fldlist
         };
         return(this.empmstService.GetTWLEmployees(getTWLEmployeesApi));
     }
     else
     {
         return(null);
     }
 }
示例#3
0
        public IEnumerable <Empmst> GetTWLEmployees(GetTWLEmployeesApi getTWLEmployeesApi)
        {
            var sb = new StringBuilder();

            if (!string.IsNullOrWhiteSpace(getTWLEmployeesApi.coNum))
            {
                sb.AppendFormatWithEscape("empmst.co_num = '{0}'", getTWLEmployeesApi.coNum);
                if (!string.IsNullOrWhiteSpace(getTWLEmployeesApi.whNum))
                {
                    sb.AppendFormatWithEscape(" AND empmst.wh_num = '{0}'", getTWLEmployeesApi.whNum);
                }
                if (!string.IsNullOrWhiteSpace(getTWLEmployeesApi.empNum))
                {
                    sb.AppendFormatWithEscape(" AND empmst.emp_num = '{0}'", getTWLEmployeesApi.empNum);
                }
                if (!string.IsNullOrWhiteSpace(getTWLEmployeesApi.empName))
                {
                    sb.AppendFormatWithEscape(" AND empmst.emp_name BEGINS '{0}'", getTWLEmployeesApi.empName);
                }
            }
            var where = sb.ToString();
            return(this.empmstRepository.GetList(where, getTWLEmployeesApi.batchsize, getTWLEmployeesApi.fldlist));
        }
示例#4
0
 public IEnumerable <Empmst> GetTWLEmployees(GetTWLEmployeesApi getTWLEmployeesApi)
 {
     return(this.empmstService.GetTWLEmployees(getTWLEmployeesApi));
 }