Rejected CA notifications include who and why
This commit is contained in:
committed by
Tucker Chase (IT FI MES)
parent
d6af4b6ef9
commit
0289e62e9f
@ -1870,9 +1870,9 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
int assigneeId = ca.D1AssigneeID;
|
||||
int requestorId = ca.RequestorID;
|
||||
int qaId = ca.QAID;
|
||||
NotifySectionRejection(issueID, assigneeId, dSection);
|
||||
NotifySectionRejection(issueID, requestorId, dSection);
|
||||
NotifySectionRejection(issueID, qaId, dSection);
|
||||
NotifySectionRejection(issueID, assigneeId, userID, dSection, comments);
|
||||
NotifySectionRejection(issueID, requestorId, userID, dSection, comments);
|
||||
NotifySectionRejection(issueID, qaId, userID, dSection, comments);
|
||||
|
||||
return Content("Successfully Saved");
|
||||
}
|
||||
@ -1893,11 +1893,14 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
return Content(e.Message);
|
||||
}
|
||||
}
|
||||
public void NotifySectionRejection(int issueID, int userId, string section)
|
||||
public void NotifySectionRejection(int issueID, int recipientUserId, int loggedInUserId, string section, string comment)
|
||||
{
|
||||
try
|
||||
{
|
||||
string userEmail = userDMO.GetUserEmailByID(userId.ToString());
|
||||
LoginModel recipient = userDMO.GetUserByID(recipientUserId);
|
||||
string recipientEmail = recipient.Email;
|
||||
|
||||
LoginModel loggedInUser = userDMO.GetUserByID(loggedInUserId);
|
||||
|
||||
string emailTemplate = "CorrectiveActionSectionRejection.txt";
|
||||
//string userEmail = string.Empty;
|
||||
@ -1906,16 +1909,18 @@ namespace Fab2ApprovalSystem.Controllers
|
||||
|
||||
//subject = "Corrective Action Assignment";
|
||||
EmailNotification en = new EmailNotification(subject, ConfigurationManager.AppSettings["EmailTemplatesPath"]);
|
||||
string[] emailparams = new string[4];
|
||||
string[] emailparams = new string[6];
|
||||
emailparams[0] = Functions.ReturnCANoStringFormat(issueID);
|
||||
emailparams[1] = issueID.ToString();
|
||||
emailparams[2] = GlobalVars.hostURL;
|
||||
emailparams[3] = section;
|
||||
emailparams[4] = loggedInUser.FirstName + " " + loggedInUser.LastName;
|
||||
emailparams[5] = comment;
|
||||
//#if(DEBUG)
|
||||
// userEmail = "rkotian1@irf.com";
|
||||
//#endif
|
||||
|
||||
en.SendNotificationEmail(emailTemplate, GlobalVars.SENDER_EMAIL, senderName, userEmail, null, subject, emailparams);
|
||||
en.SendNotificationEmail(emailTemplate, GlobalVars.SENDER_EMAIL, senderName, recipientEmail, null, subject, emailparams);
|
||||
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user