Broadening notifications for cancelled TECNs

This commit is contained in:
Chase Tucker
2023-10-31 09:06:19 -07:00
parent 0289e62e9f
commit 5d701ded55
3 changed files with 19 additions and 2 deletions

View File

@ -31,6 +31,7 @@ namespace Fab2ApprovalSystem.Controllers
ECN_DMO ecnDMO = new ECN_DMO();
WorkflowDMO wfDMO = new WorkflowDMO();
TrainingDMO trainingDMO = new TrainingDMO();
UserAccountDMO userDMO = new UserAccountDMO();
//
@ -2115,6 +2116,12 @@ namespace Fab2ApprovalSystem.Controllers
string emailSentList = "";
List<string> emailIst = MiscDMO.GetTECNCancelledApprovalNotifyList(ecnNumber).Distinct().ToList();
List<int> notificationUserList = ecnDMO.GetTECNNotificationUsers().ToList();
foreach (int userId in notificationUserList)
{
string email = userDMO.GetUserEmailByID(userId.ToString());
if (email != null && !emailIst.Contains(email)) emailIst.Add(email);
}
string emailTemplate = "TECNCancelled.txt";
string userEmail = string.Empty;