validation
This commit is contained in:
@ -58,7 +58,10 @@ namespace StateJobsNYSubmit.Pages
|
||||
if (vacancyID != null && !vacancyID.Trim().Equals(""))
|
||||
{
|
||||
posting = new Posting(vacancyID);
|
||||
if (!string.IsNullOrEmpty(Request.Form["SkillCheckboxes"]))
|
||||
{
|
||||
this.CoverLetter = posting.GenerateLetter(coverLetterFormat, userData, Request.Form["SkillCheckboxes"]);
|
||||
}
|
||||
this.Posting_ID = vacancyID;
|
||||
}
|
||||
else
|
||||
|
||||
@ -89,13 +89,18 @@ public class Posting
|
||||
this.VacancyID = id;
|
||||
}
|
||||
|
||||
public string GenerateLetter(string s, UserData data, string skills) {
|
||||
public string GenerateLetter(string s, UserData data, string skills)
|
||||
{
|
||||
string ret = "" + s;
|
||||
ret = ret.Replace("$name", this.ContactName);
|
||||
ret = ret.Replace("$vacancy", this.VacancyID);
|
||||
ret = ret.Replace("$title", this.Title);
|
||||
ret = ret.Replace("$box", this.BoxNumber);
|
||||
if (!string.IsNullOrEmpty(data.email))
|
||||
{
|
||||
|
||||
ret = ret.Replace("$email", data.email);
|
||||
}
|
||||
string skillRet = "• " + skills.Replace(",", "• ");
|
||||
ret = ret.Replace("$skills", skillRet);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user