private void btnSubmit_Click(object sender, EventArgs e) { if (Page.IsValid) { JobApplicant applicant = new JobApplicant(); applicant.JobPosting = new JobPosting(GetJobPostingGuid()); applicant.FirstName = tbFirstName.Text; applicant.LastName = tbLastName.Text; applicant.Email = tbEmail.Text; applicant.HowHeard = tbHear.Text; applicant.HowLongChristian = tbChristian.Text; applicant.Class100 = bool.Parse(ddlClass100.SelectedValue); applicant.Class100Date = tbClass100.Text.Trim() != string.Empty ? DateTime.Parse(tbClass100.Text) : DateTime.Parse("1/1/1900"); applicant.ChurchMember = bool.Parse(ddlMember.SelectedValue); applicant.NeighborhoodGroup = bool.Parse(ddlGroup.SelectedValue); applicant.Serving = bool.Parse(ddlServing.SelectedValue); applicant.ServingMinistry = tbServing.Text; applicant.Baptized = bool.Parse(ddlBaptized.SelectedValue); applicant.Tithing = bool.Parse(ddlTithe.SelectedValue); applicant.Experience = tbExperience.Text; applicant.LedToApply = tbLed.Text; applicant.Coverletter = tbCoverLetter.Text; applicant.Resume.ByteArray = fuResume.FileBytes; applicant.Resume.SetFileInfo(fuResume.PostedFile.FileName); applicant.Resume.Save(CurrentUser.Identity.Name); applicant.Save(CurrentUser.Identity.Name, true); SendMail(applicant); Response.Redirect(string.Format("~/default.aspx?pageid={0}", ThankYouPageSetting), true); } }
private void btnUpdate_Click(object sender, EventArgs e) { JobApplicant applicant = new JobApplicant(GetApplicantGuid()); if (ihPersonID.Value.Trim() != string.Empty) { applicant.Person.PersonID = int.Parse(ihPersonID.Value); } else { applicant.Person.PersonID = -1; } applicant.FirstName = tbFirstName.Text; applicant.LastName = tbLastName.Text; applicant.Email = tbEmail.Text; applicant.JobPosting = new JobPosting(tbPosition.Text); applicant.HowHeard = tbHeard.Text; applicant.HowLongChristian = tbChristian.Text; applicant.Class100 = cbClass100.Checked; applicant.Class100Date = DateTime.Parse(dtbClass100Date.Text); applicant.ChurchMember = cbMember.Checked; applicant.NeighborhoodGroup = cbGroup.Checked; applicant.Serving = cbServing.Checked; applicant.ServingMinistry = tbMinistry.Text; applicant.Baptized = cbBaptized.Checked; applicant.Tithing = cbTithe.Checked; applicant.Experience = tbExperience.Text; applicant.LedToApply = tbLed.Text; applicant.Coverletter = tbCoverletter.Text; applicant.RejectionNoticeSent = cbRejection.Checked; applicant.ReviewedByHR = cbReviewed.Checked; applicant.Save(CurrentUser.Identity.Name, true); Response.Redirect(string.Format("~/default.aspx?page={0}&guid={1}&parCurrentGroup=Finance", ApplicantListPageIDSetting, applicant.JobPosting.JobPostingGuid.ToString())); }
private void lbRemovePerson_Click(object sender, EventArgs e) { JobApplicant applicant = new JobApplicant(GetApplicantGuid()); applicant.Person.PersonID = -1; ihPersonID.Value = string.Empty; lblPersonEdit.Text = string.Empty; lbRemovePerson.Visible = false; applicant.Save(CurrentUser.Identity.Name, true); }
private void btnReviewed_Click(object sender, EventArgs e) { string[] sApplicants = ihIncludeList.Value.Trim().Split(','); foreach (string id in sApplicants) { if (id.Trim() != string.Empty) { try { JobApplicant applicant = new JobApplicant(int.Parse(id)); applicant.ReviewedByHR = true; applicant.Save(CurrentUser.Identity.Name, false); ihIncludeList.Value = string.Empty; } catch { } } } ShowList(); }
private void btnSendEmail_Click(object sender, EventArgs e) { string[] sApplicants = ihIncludeList.Value.Trim().Split(','); foreach (string id in sApplicants) { if (id.Trim() != string.Empty) { try { JobApplicant applicant = new JobApplicant(int.Parse(id)); SendMail(applicant.FirstName, applicant.LastName, applicant.Email, applicant.JobPosting.Title, applicant.DateCreated); applicant.RejectionNoticeSent = true; applicant.Save(CurrentUser.Identity.Name, false); ihIncludeList.Value = string.Empty; } catch { } } } ShowList(); }