Rejected CA notifications include who and why
This commit is contained in:
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
|
||||
{
|
||||
|
@ -1,13 +1,16 @@
|
||||
<font size="2" face="verdana">
|
||||
*****Please DO NOT reply to this email*****
|
||||
<br/><br/>
|
||||
Corrective Action# {0} section {3} has been rejected.
|
||||
Corrective Action# {0} section {3} has been rejected by {4}.
|
||||
<br/><br/>
|
||||
|
||||
Rejection reason: {5}
|
||||
<br/><br/>
|
||||
|
||||
Please log on to the Approval website to view the section and act accordingly
|
||||
<br/><br/>
|
||||
|
||||
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={1}
|
||||
{2}/CorrectiveAction/Edit?issueID={1}
|
||||
<br/><br/>
|
||||
|
||||
If you have any questions or trouble logging on please contact a site administrator.
|
||||
|
@ -62,9 +62,9 @@
|
||||
<add key="SPNMRBHoldFlagDirectory" value="D:\Websites\SPNMRBHoldFlag\" />
|
||||
<add key="SPNMRBHoldFlagFTPLogDirectory" value="D:\Websites\SPNMRBHoldFlagFTPLog\" />
|
||||
<add key="LotTempPipeLine" value="D:\Websites\FabApprovalTempPipeLine\" />
|
||||
<add key="DevWebSiteURL" value="mestsa05ec.ec.infineon.com" />
|
||||
<add key="DevWebSiteURL" value="mestsa05ec.infineon.com" />
|
||||
<add key="ProdWebSiteURLEC" value="messa016ec.ec.local" />
|
||||
<add key="ProdWebSiteURLStealth" value="messa016ec.ec.infineon.com" />
|
||||
<add key="ProdWebSiteURLStealth" value="messa016ec.infineon.com" />
|
||||
<!--<add key="ECDomain" value="TEMSCEC01.ec.local"/>-->
|
||||
<add key="ECDomain" value="ELSSREC01.ec.local" />
|
||||
<add key="ECADGroup" value="EC-MES-ALL-Users-R-L" />
|
||||
@ -80,6 +80,7 @@
|
||||
<add key="SSRSPassword" value="" />-->
|
||||
<add key="SSRSFolder" value="/Fab2Approval/Test/" />
|
||||
<add key="SSRSBindingsByConfiguration" value="false" />
|
||||
<add key="Test Email Recipients" value="chase.tucker@infineon.com"/>
|
||||
</appSettings>
|
||||
<system.net>
|
||||
<mailSettings>
|
||||
|
Loading…
x
Reference in New Issue
Block a user