Uat_Study
			
			
		
		
							parent
							
								
									8f4b47aad6
								
							
						
					
					
						commit
						ea79b01d4c
					
				| 
						 | 
				
			
			@ -132,7 +132,7 @@ namespace IRaCIS.Core.Application.ViewModel
 | 
			
		|||
        public string FromEmail { get; set; } = string.Empty;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public List<UserTypeEnum> ToUserTypeList { get; set; }
 | 
			
		||||
        public List<UserTypeEnum>? ToUserTypeList { get; set; }
 | 
			
		||||
        public List<UserTypeEnum> CopyUserTypeList { get; set; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,8 +71,8 @@ namespace IRaCIS.Core.Application.Service
 | 
			
		|||
        {
 | 
			
		||||
 | 
			
		||||
            await TestEmailConfigAsync(new TrialEmailNoticeConfigAddOrEdit() { 
 | 
			
		||||
            
 | 
			
		||||
            AuthorizationCode=inDto.EmailAuthorizationCode,
 | 
			
		||||
             
 | 
			
		||||
             AuthorizationCode=inDto.EmailAuthorizationCode,
 | 
			
		||||
             FromEmail=inDto.EmailFromEmail,
 | 
			
		||||
             FileName=inDto.EmailFromName,
 | 
			
		||||
             SMTPServerAddress=inDto.EmailSMTPServerAddress,
 | 
			
		||||
| 
						 | 
				
			
			@ -913,7 +913,9 @@ namespace IRaCIS.Core.Application.Service
 | 
			
		|||
 | 
			
		||||
        private async Task TestEmailConfigAsync(TrialEmailNoticeConfigAddOrEdit config)
 | 
			
		||||
        {
 | 
			
		||||
            var toUserList = await  _repository.Where<TrialUser>(t => t.TrialId == config.TrialId && config.ToUserTypeList.Contains(t.User.UserTypeEnum)).Select(t => new { t.User.EMail, t.User.FullName }).ToListAsync();
 | 
			
		||||
            var toUserList = await _repository.Where<TrialUser>(t => t.TrialId == config.TrialId)
 | 
			
		||||
                .WhereIf(config.ToUserTypeList != null, t => config.ToUserTypeList.Contains(t.User.UserTypeEnum))
 | 
			
		||||
                .Select(t => new { t.User.EMail, t.User.FullName }).ToListAsync();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            if (!config.FromEmail.Contains("@") || string.IsNullOrEmpty(config.FromEmail))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue