I just wrote this and don't like how bulky it is, also given the fact I will have to add at least another if
statement.
I was going to switch it to a case statement but wanted to check if there were even better ways to reduce the clutter.
string emailLetterPath = Server.MapPath("~/emails/rejected.htm");
if (jobApplicantAndJob.Jobs.Title == "Store Sales Manager" || jobApplicantAndJob.Jobs.Title == "Sales Representative")
{
emailLetterPath = Server.MapPath("~/emails/TC1RejectedP3.htm");
}
if (jobApplicantAndJob.Jobs.Title == "Outside Sales Professional")
{
emailLetterPath = Server.MapPath("~/emails/TC2RejectedP3.htm");
}
The default option should be the rejected.htm
.