Moved System.IO references from DMO classes to Static Helpers
Removed nugetSource from pipeline Removed more comments Created Static Classes for most DMO / Controller Classes Push ConfigurationManager.AppSettings to controller Align Tests with other Projects
This commit is contained in:
26
Fab2ApprovalSystem/Misc/TrainingHelper.cs
Normal file
26
Fab2ApprovalSystem/Misc/TrainingHelper.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Fab2ApprovalSystem.Models;
|
||||
|
||||
namespace Fab2ApprovalSystem.Misc;
|
||||
|
||||
public class TrainingHelper {
|
||||
|
||||
public static void NotifyTrainee(AppSettings appSettings, int userId, int assignmentId, int ecnId, string title, string recipient) {
|
||||
string emailSentList = "";
|
||||
string subject = string.Empty;
|
||||
string userEmail = string.Empty;
|
||||
string senderName = "ECN Training";
|
||||
string emailTemplate = "ECNTrainingAssigned.txt";
|
||||
|
||||
subject = "ECN# " + ecnId + " - Training Assignment Notice - " + title;
|
||||
|
||||
EmailNotification en = new(appSettings, subject);
|
||||
userEmail = recipient;
|
||||
string[] emailparams = new string[4];
|
||||
emailparams[0] = assignmentId.ToString();
|
||||
emailparams[1] = ecnId.ToString();
|
||||
emailparams[2] = GlobalVars.hostURL;
|
||||
|
||||
en.SendNotificationEmail(emailTemplate, GlobalVars.SENDER_EMAIL, senderName, userEmail, null, subject, emailparams);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user