예제 #1
0
 public async Task <bool> changeLine(MesAuditOrgDto auditOrgDto)
 {
     if (await _mesAuditOrgService.Changeline(auditOrgDto))
     {
         return(true);
     }
     return(false);
 }
예제 #2
0
        public async Task <bool> Changeline(MesAuditOrgDto auditOrgDto)
        {
            var data = _mesAuditOrgRepository.FindAll(x => x.Line_ID.Trim() == auditOrgDto.Line_ID.Trim()).ToList();

            data = data.Select(x => {
                x.IsWT  = auditOrgDto.IsWT;
                x.IsSME = auditOrgDto.IsSME;
                x.Is6S  = auditOrgDto.Is6S;
                x.IsWS  = auditOrgDto.IsWS;
                return(x);
            }).ToList();
            try
            {
                await _mesAuditOrgRepository.SaveAll();

                return(true);
            }
            catch (System.Exception)
            {
                return(false);

                throw;
            }
        }