protected void Submit_Click(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; To.Add("*****@*****.**"); To.Add("*****@*****.**"); To.Add("*****@*****.**"); foreach (Control control in MainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } emailBody = email.CreateEmailBody(formInfo); email.SendHTMLEmail("Sullivan International Housing Application - " + HousingForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //email.SendHTMLEmail("Housing Application", emailBody, attachments, "*****@*****.**"); //In case the student enters their email in wrong try { To.Clear(); To.Add(HousingForm.aoEmail); email.SendHTMLEmail("Sullivan International Housing Application - " + HousingForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } //Send and create Tiffs. Don't put below removing DOB //Tiffer(); try { var dob = formInfo.FirstOrDefault(f => f.controlID == "tBoxDateOfBirth"); formInfo.Remove(dob); emailBody = email.CreateEmailBody(formInfo); To.Clear(); To.Add(HousingForm.Email); email.SendHTMLEmail("Sullivan International Housing Application - " + HousingForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } Response.Redirect("Confirmation.aspx"); }
protected void Submit_Click(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; if (PersonalInfoForm.ReEntry == "Naw") { if (PersonalInfoForm.CampusAttending == "Louisville") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Online" || PersonalInfoForm.CampusAttending == "Louisa" || PersonalInfoForm.CampusAttending == "CarlisleNicholas" || PersonalInfoForm.CampusAttending == "Northern Kentucky") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Fort Knox") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } } else { if (PersonalInfoForm.CampusAttending == "Online" || PersonalInfoForm.CampusAttending == "Louisa" || PersonalInfoForm.CampusAttending == "CarlisleNicholas" || PersonalInfoForm.CampusAttending == "Northern Kentucky") { To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Fort Knox") { To.Add("*****@*****.**"); } else { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } } foreach (Control control in MainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } emailBody = email.CreateEmailBody(formInfo); attachments.Add("C:\\Websites\\secure.sullivan.edu\\Admissions\\PDFs\\disclosure.pdf"); email.SendHTMLEmail("Disability Disclosure - " + PersonalInfoForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //In case the student enters their email in wrong try { To.Clear(); To.Add(PersonalInfoForm.Email); email.SendHTMLEmail("Disability Disclosure - " + PersonalInfoForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } //Send and create Tiffs Tiffer(); Session["AllAttachments"] = allAttachments; Response.Redirect("Confirmation.aspx"); }
protected void Submit_Click(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; string housing; if (PersonalInfoForm.ReEntry == "Naw") { if (PersonalInfoForm.CampusAttending == "Louisville") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Online" || PersonalInfoForm.CampusAttending == "Louisa" || PersonalInfoForm.CampusAttending == "CarlisleNicholas" || PersonalInfoForm.CampusAttending == "Northern Kentucky") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Fort Knox") { To.Add("*****@*****.**"); } } else { if (PersonalInfoForm.CampusAttending == "Online" || PersonalInfoForm.CampusAttending == "Louisa" || PersonalInfoForm.CampusAttending == "CarlisleNicholas" || PersonalInfoForm.CampusAttending == "Northern Kentucky") { To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Fort Knox") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } } foreach (Control control in MainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } emailBody = email.CreateEmailBody(formInfo); email.SendHTMLEmail("MBA Accounting - " + PersonalInfoForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //In case the student enters their email in wrong try { To.Clear(); To.Add(PersonalInfoForm.Email); email.SendHTMLEmail("MBA Accounting - " + PersonalInfoForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } //Send and create Tiffs Tiffer(); Session["AllAttachments"] = allAttachments; if (ViewState["Housing"] == null) { housing = "No"; } else { housing = (string)ViewState["Housing"]; } if (housing == "No" && ViewState["CampusNumber"] == null) { Response.Redirect("Confirmation.aspx"); } else if (housing == "Yes") { Session["Campus"] = ViewState["Campus"]; Session["StudentName"] = ViewState["StudentName"]; Session["CampusNumber"] = ViewState["CampusNumber"]; Session["Phone"] = ViewState["Phone"]; Session["Email"] = ViewState["Email"]; Session["enrollmentFee"] = ViewState["enrollmentFee"]; Session["Transcript"] = ViewState["Transcript"]; Session["Housing"] = ViewState["Housing"]; Response.Redirect("housing.aspx"); } else { Session["Campus"] = ViewState["Campus"]; Session["StudentName"] = ViewState["StudentName"]; Session["CampusNumber"] = ViewState["CampusNumber"]; Session["Phone"] = ViewState["Phone"]; Session["Email"] = ViewState["Email"]; Session["enrollmentFee"] = ViewState["enrollmentFee"]; Session["Transcript"] = ViewState["Transcript"]; Session["Housing"] = ViewState["Housing"]; Response.Redirect("IPED.aspx"); } }
protected void SubmitApplication(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; AdditionalDocs additionalDocs = new AdditionalDocs(); if (Page.IsValid) { //Start by looping through each control in the Wizard Step foreach (Control step in pnlMain.Controls) { if (step is Panel) { foreach (Control control in step.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } } else if (step is UserControl) { foreach (Control currentControl in step.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } }//end foreach loop if (Enroll.enrollStartDate == "Winter: January 2018") { var withdrawPanels = formInfo.Where(f => f.panelID == "pnlWithdraw" || f.panelID == "pnlWithdrawFortKnox").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } } else { var withdrawPanels = formInfo.Where(f => f.panelID == "pnlOldWithdraw").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } } if (EnrollAcknowledge.DisplayGradWork == "No") { var gradWork = formInfo.Where(r => r.panelID == "pnlGradWork").ToList(); foreach (var work in gradWork) { formInfo.Remove(work); } } if (PersonalInfo1.State != "California") { var state = formInfo.Where(f => f.panelID == "pnlCalifornia").ToList(); foreach (var statePanel in state) { formInfo.Remove(statePanel); } } emailBody = email.CreateEmailBody(formInfo); if (Enroll.Campus == "Lexington") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } email.SendHTMLEmail("Sullivan International Application - " + PersonalInfo1.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); Session["enrollmentFee"] = "200.00"; Session["Campus"] = "International" + Enroll.Campus; if (Enroll.Campus == "Lexington") { Session["emailRecipients"] = "*****@*****.**"; } else { Session["emailRecipients"] = "[email protected]; [email protected]"; } //Send and create Tiffs Tiffer(); Session["AllAttachments"] = allAttachments; try { if (Enroll.AlumniIncentive == "Yes") { string alumniBody; allAttachments.Clear(); To.Clear(); To.Add(PersonalInfo1.Email); alumniBody = "<html><p>Hello " + PersonalInfo1.StudentName + "</p>" + "<p>IMPORTANT: In order to receive the Alumni Tuition Incentive, the Alumnus must be registered with the Alumni Association prior to completing an enrollment. " + "Visit <a href='http://alumni.sullivan.edu/register/' target='_blank'>http://alumni.sullivan.edu/register/</a> to register for the Alumni Association. If the alumnus is already a member of the Alumni Association, " + "visit <a href='http://alumni.sullivan.edu/register/' target='_blank'>http://alumni.sullivan.edu/register/</a> to verify enrollment. If you are not the alumnus, please note you are responsible for ensuring the " + "Alumnus registers prior to you completing the enrollment process.</p>"; //Bcc.Add("*****@*****.**"); email.SendHTMLEmail("Sullivan University Alumni Incentive - " + PersonalInfo1.StudentName, alumniBody, To, Bcc, Cc, "*****@*****.**", allAttachments); To.Clear(); To.Add("*****@*****.**"); panelsNeeded.Clear(); panelsNeeded.Add("PersonalInfoPanel"); panelsNeeded.Add("PersonalInfoPanel2"); panelsNeeded.Add("EnrollPanel"); panelsNeeded.Add("programPanel"); panelsNeeded.Add("pnlAlumnusName"); IEnumerable <FieldInfo> alumniFields = formInfo.Where(f => panelsNeeded.Contains(f.panelID)); alumniBody = additionalDocs.BuildAlumniIncentive(alumniFields); email.SendHTMLEmail("Alumni Incentive - " + PersonalInfo1.StudentName, alumniBody, To, Bcc, Cc, "*****@*****.**", allAttachments); } } catch { } ScriptManager.RegisterClientScriptBlock(this, typeof(System.Web.UI.Page), "TrackSubmission", "TrackSubmission();", true); Response.Redirect("InternationalEnrollmentFee.aspx"); } }
//public string CampusNumber //{ // get // { // if (campus.SelectedItem.Text == "Louisville") // return "01"; // else if (campus.SelectedItem.Text == "Lexington") // return "21"; // else if (campus.SelectedItem.Text == "Fort Knox") // return "11"; // else if (campus.SelectedItem.Text == "Online" || campus.SelectedValue == "Louisa" || campus.SelectedItem.Text == "Northern Kentukcy" || campus.SelectedItem.Text == "CarlisleNicholas") // return "07"; // return "01"; // } //} protected void btnSubmit_Click(object sender, EventArgs e) { if (Page.IsValid) { List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); string emailBody; //To.Add("*****@*****.**"); if (campus.SelectedValue == "Louisville") { To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Lexington") { To.Add("[email protected] "); } else if (campus.SelectedValue == "Dupont Circle") { To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Atkinson Sq") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else { To.Add("*****@*****.**"); } To.Add(tbAOEmail.Text); foreach (Control currentControl in pnlMain.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } var uploadInfo = formInfo.Where(u => u.panelID == "pnlAttachment").ToList(); foreach (var upload in uploadInfo) { formInfo.Remove(upload); } emailBody = email.CreateEmailBody(formInfo); if (ViewState["Attatchment"] != null) { attachments = (List <string>)ViewState["Attatchment"]; Session["AllAttachments"] = attachments; } email.SendHTMLEmail("Unofficial Transcript Evaluation Request - " + tBoxLastName.Text + ", " + tBoxFirstName.Text, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); Tiffer(); Response.Redirect("Confirmation.aspx"); } }
protected void Submit_Click(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; AdditionalDocs additionalDocs = new AdditionalDocs(); IEnumerable <FieldInfo> transcriptFields; To.Add("*****@*****.**"); foreach (Control control in MainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } emailBody = email.CreateEmailBody(formInfo); //Build ROI panelsNeeded.Add("PersonalInfoPanel"); panelsNeeded.Add("AcademicHistoryPanel"); panelsNeeded.Add("pnlFirstGenCollegeStudent"); panelsNeeded.Add("highSchoolPanel"); for (int i = 1; i <= 9; i++) { if (i <= Convert.ToInt16(SchoolInfoForm.collegeNumber)) { panelsNeeded.Add("CollegePanel" + i); panelsNeeded.Add("creditPanel" + i); panelsNeeded.Add("degreePanel" + i); } } panelsNeeded.Add("TranscriptPanel"); panelsNeeded.Add("pnlESig"); transcriptFields = formInfo.Where(f => panelsNeeded.Contains(f.panelID)); transcriptAttatchments.Add(additionalDocs.BuildTranscripts(transcriptFields, (string)Session["ESig"], "ROI", "Louisville")); panelsNeeded.Clear(); foreach (string item in transcriptAttatchments) { attachments.Add(item); allAttachments.Add(item); } foreach (string file in attachments) { allAttachments.Add(file); } foreach (string item in SchoolInfoForm.GetTranscriptAttachments()) { attachments.Add(item); transcriptAttatchments.Add(item); allAttachments.Add(item); } email.SendHTMLEmail("ROI - " + PersonalInfoForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //Create and send tiffs. Do not move below removing the SSN. Tiffer(); Session["AllAttachments"] = allAttachments; Response.Redirect("Confirmation.aspx"); }
protected void submit_Click(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; foreach (Control currentControl in IPEDs.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } emailBody = email.CreateEmailBody(formInfo); if (ViewState["Campus"] == null) { ViewState["Campus"] = IPEDs.CampusAttending; } if ((string)ViewState["Campus"] == "Louisville") { if ((string)ViewState["Form"] != "PA") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if ((string)ViewState["Form"] == "PA") { To.Add("*****@*****.**"); } } else if ((string)ViewState["Campus"] == "Online" || (string)ViewState["Campus"] == "Louisa" || (string)ViewState["Campus"] == "Northern Kentucky" || (string)ViewState["Campus"] == "CarlisleNicholas") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if ((string)ViewState["Campus"] == "Lexington") { To.Add("*****@*****.**"); } else if ((string)ViewState["Campus"] == "Fort Knox") { To.Add("*****@*****.**"); } //mail.To.Add("*****@*****.**"); email.SendHTMLEmail("IPED Info - " + (string)ViewState["StudentName"], emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //Send and create tiffs Tiffer(); Session["AllAttachments"] = allAttachments; Session["Campus"] = ViewState["Campus"]; Session["StudentName"] = ViewState["StudentName"]; Session["CampusNumber"] = ViewState["CampusNumber"]; Session["Phone"] = ViewState["Phone"]; Session["Email"] = ViewState["Email"]; Session["enrollmentFee"] = ViewState["enrollmentFee"]; Session["Transcript"] = ViewState["Transcript"]; Session["ZipCode"] = ViewState["ZipCode"]; Session["Military"] = ViewState["Military"]; if (ViewState["Form"] != null) { if (Session["Tuition"] == null) { Response.Redirect("PADeposit.aspx"); } else { Response.Redirect("Confirmation.aspx"); } } else { Response.Redirect("EnrollmentPayment.aspx"); } }
protected void Submit_Click(object sender, EventArgs e) { if (Page.IsValid) { List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); string emailBody; AcademicWaiverdbmlDataContext waiverInfo = new AcademicWaiverdbmlDataContext(); if (Request.QueryString["formID"] != null) { int formID = Convert.ToInt16(Request.QueryString["formID"]); var info = waiverInfo.AcademicWaivers.FirstOrDefault(a => a.formID == formID); info.firstName = tbFName.Text; info.lastName = tbLName.Text; info.studentID = tbStudentID.Text; info.email = tbEmail.Text; info.courseWaived = tbCourse.Text; info.courseSubstitued = tbSubstitute.Text; info.reason = tbReason.Text; info.requstedBy = tbRequestedBy.Text; info.date = tbDate.Text; if (rblRegistrarDecision.SelectedIndex > -1) { info.registrarDecision = rblRegistrarDecision.SelectedItem.Text; } info.registrarComments = tbRegistarComments.Text; info.registrarDate = tbRegistrarDate.Text; info.registrarInitials = tbRegistrarInitials.Text; if (rblEntryDecision.SelectedIndex > -1) { info.registrarDecision = rblEntryDecision.SelectedItem.Text; } info.entryComments = tbEntryComments.Text; info.entryDate = tbEntryDate.Text; info.entryInitials = tbEntryInitials.Text; waiverInfo.SubmitChanges(); } Models.AcademicWaiver newWaiver = new Models.AcademicWaiver(); newWaiver.firstName = tbFName.Text; newWaiver.lastName = tbLName.Text; newWaiver.studentID = tbStudentID.Text; newWaiver.email = tbEmail.Text; newWaiver.courseWaived = tbCourse.Text; newWaiver.courseSubstitued = tbSubstitute.Text; newWaiver.reason = tbReason.Text; newWaiver.requstedBy = tbRequestedBy.Text; newWaiver.date = tbDate.Text; if (rblRegistrarDecision.SelectedIndex > -1) { newWaiver.registrarDecision = rblRegistrarDecision.SelectedItem.Text; } newWaiver.registrarComments = tbRegistarComments.Text; newWaiver.registrarDate = tbRegistrarDate.Text; newWaiver.registrarInitials = tbRegistrarInitials.Text; if (rblEntryDecision.SelectedIndex > -1) { newWaiver.registrarDecision = rblEntryDecision.SelectedItem.Text; } newWaiver.entryComments = tbEntryComments.Text; newWaiver.entryDate = tbEntryDate.Text; newWaiver.entryInitials = tbEntryInitials.Text; waiverInfo.AcademicWaivers.InsertOnSubmit(newWaiver); waiverInfo.SubmitChanges(); formInfo = fieldInfo.CreateFormInfo((Panel)pnlStudentInfo); emailBody = email.CreateEmailBody(formInfo); emailBody += "<html><p><a href='https://secure.sullivan.edu/admissions/AcademicWaiver?formID=" + newWaiver.formID + "'</a>Click Here To Approve or Deny</p></html>"; if (rblRegistrarDecision.SelectedIndex == -1) { To.Add("*****@*****.**"); } else if (rblRegistrarDecision.SelectedIndex == 0 && rblEntryDecision.SelectedIndex == -1) { To.Add("*****@*****.**"); } To.Add("*****@*****.**"); email.SendHTMLEmail("Academic Waiver - " + tbLName.Text + ", " + tbFName.Text, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); To.Clear(); try { To.Add(tbEmail.Text); email.SendHTMLEmail("Academic Waiver - " + tbLName.Text + ", " + tbFName.Text, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } Response.Redirect("Confirmation.aspx"); } }
protected void btnNext_Click(object sender, EventArgs e) { if (Page.IsValid) { List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); string campusAttending = campus.SelectedItem.Text; string emailBody; if (campusAttending == "Main Campus") { To.Add("*****@*****.**"); } else if (campusAttending == "Online" || campusAttending == "Louisa Learning Site" || campusAttending == "Northern Kentucky" || campusAttending == "CarlisleNicholas") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (campusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (campusAttending == "Fort Knox") { To.Add("*****@*****.**"); } else if (campusAttending == "Dupont Circle") { To.Add("[email protected] "); } else if (campusAttending == "Atkinson Sq") { To.Add("*****@*****.**"); } //Bcc.Add("*****@*****.**"); foreach (Control currentControl in pnlMain.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } emailBody = email.CreateEmailBody(formInfo); email.SendHTMLEmail("First Quarter Schedule Requestt - " + tBoxLastName.Text + ", " + tBoxFirstName.Text, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); ////Send AO Email. Sent sepperatly in case student enters invalid email //try //{ // To.Clear(); // To.Add(tBoxAOEmailAddress.Text); // email.SendHTMLEmail("First Quarter Schedule Requestt - " + tBoxLastName.Text + ", " + tBoxFirstName.Text, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //} //catch { } Tiffer(); Response.Redirect("Confirmation.aspx"); } }
protected void SubmitApplication(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); AdditionalDocs additionalDocs = new AdditionalDocs(); IEnumerable <FieldInfo> transcriptFields; Email email = new Email(); string emailBody; string[] fromAddress; if (Enroll.CampusAttending == "Online" || Enroll.CampusAttending == "Louisa" || Enroll.CampusAttending == "Northern Kentucky" || Enroll.CampusAttending == "CarlisleNicholas" || Enroll.CampusAttending == "Mayfield") { To.Add("*****@*****.**"); } else if (Enroll.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (Enroll.CampusAttending == "Fort Knox") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else { To.Add("*****@*****.**"); } if (Enroll.VABenefits == "Yes") { To.Add("*****@*****.**"); } fromAddress = PersonalInfo1.StudentName.Split(','); //mainPanel.ContentTemplateContainer.Controls if (Page.IsValid) { foreach (Control step in pnlMain.Controls) { if (step is Panel) { foreach (Control control in step.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } } else if (step is UserControl) { foreach (Control currentControl in step.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } }//end foreach loop for (int i = 0; i <= 9; i++) { if (i > SchoolInfo1.collegeValue) { collegePanels.Add("CollegePanel" + i); } } var colleges = formInfo.Where(c => collegePanels.Contains(c.panelID)).ToList(); foreach (var college in colleges) { formInfo.Remove(college); } if (Enroll.CompanyReimbursement != "Yes") { var companyReimbursement = formInfo.Where(c => c.panelID == "companyDeffermentPanel").ToList(); foreach (var company in companyReimbursement) { formInfo.Remove(company); } } if (Enroll.degreeType == "Graduate" || Enroll.degreeType == "POST GRADUATE") { var KY = formInfo.Where(f => f.panelID == "KYResidentContainer" || f.panelID == "panelStateResident").ToList(); foreach (var res in KY) { formInfo.Remove(res); } } else if (KYResidentInfo.KYRes == "No") { var KY = formInfo.Where(f => f.panelID == "panelStateResident").ToList(); foreach (var res in KY) { formInfo.Remove(res); } } if (PersonalInfo1.State != "California") { var state = formInfo.Where(f => f.panelID == "pnlCalifornia").ToList(); foreach (var statePanel in state) { formInfo.Remove(statePanel); } } if (Enroll.programInfo != null) { if (Enroll.programInfo.StartsWith("Baking and Pastry Arts") || Enroll.programInfo.StartsWith("Culinary Arts")) { var program = formInfo.Where(f => f.panelID == "pnlClassRepeat").ToList(); foreach (var prog in program) { formInfo.Remove(prog); } } } if (Enroll.degreeType == "POST GRADUATE") { var asf = formInfo.Where(f => f.panelID == "pnlASFContainer" || f.panelID == "pnlASF").ToList(); foreach (var asfPanel in asf) { formInfo.Remove(asfPanel); } } var testInfo = formInfo.Where(r => r.panelID == "TestScorePanel").ToList(); foreach (var test in testInfo) { formInfo.Remove(test); } if (EnrollAcknowledge.DisplayGradWork == "No") { var gradWork = formInfo.Where(r => r.panelID == "pnlGradWork").ToList(); foreach (var work in gradWork) { formInfo.Remove(work); } } if (Enroll.enrollStartDate == "Winter: January 2018") { var withdrawPanels = formInfo.Where(f => f.panelID == "pnlWithdraw" || f.panelID == "pnlWithdrawFortKnox").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } } else { var withdrawPanels = formInfo.Where(f => f.panelID == "pnlOldWithdraw").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } if (Enroll.CampusAttending != "Fort Knox") { withdrawPanels.Clear(); withdrawPanels = formInfo.Where(f => f.panelID == "pnlWithdrawFortKnox").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } } } emailBody = email.CreateEmailBody(formInfo); //if (ViewState["DisplayProgramDoc"] != null) //{ // if ((bool)ViewState["DisplayProgramDoc"] == true) // { // if (Enroll.CampusAttending == "Fort Knox") // { // if (Enroll.enrollStartDate == "Winter: January 2018") // { // Session["ProgramDoc"] = "FortKnoxRates"; // } // else // { // Session["ProgramDoc"] = "FortKnoxRates2018"; // } // } // if (ViewState["ESigParent"] == null) // tuitionAttatchments = tiff.SignTuitionSheet((string)Session["ESig"], null, PersonalInfo1.StudentName, TranscriptESign1.SigDate); // else // tuitionAttatchments = tiff.SignTuitionSheet((string)ViewState["ESig"], (string)Session["ESigParent"], PersonalInfo1.StudentName, TranscriptESign1.SigDate); // } //} disclosureAttachment = tiff.SignDisclosure((string)Session["ESig"], PersonalInfo1.StudentName, TranscriptESign1.SigDate); attachments.Add(disclosureAttachment); allAttachments.Add(disclosureAttachment); //Create transcripts // Build HS/ GED Transcript panelsNeeded.Add("PersonalInfoPanel"); panelsNeeded.Add("AcademicHistoryPanel"); panelsNeeded.Add("highSchoolPanel"); panelsNeeded.Add("TranscriptPanel"); transcriptFields = formInfo.Where(f => panelsNeeded.Contains(f.panelID)); HSGedAttatchments.Add(additionalDocs.BuildTranscripts(transcriptFields, (string)Session["ESig"], "HS-GED", Enroll.CampusAttending)); foreach (var item in HSGedAttatchments) { attachments.Add(item); allAttachments.Add(item); } panelsNeeded.Clear(); //Build College Transcipts for (int i = 1; i <= 9; i++) { if (i <= Convert.ToInt16(SchoolInfo1.collegeNumber)) { panelsNeeded.Add("PersonalInfoPanel"); panelsNeeded.Add("CollegePanel" + i); panelsNeeded.Add("creditPanel" + i); panelsNeeded.Add("degreePanel" + i); panelsNeeded.Add("TranscriptPanel"); panelsNeeded.Add("pnlESig"); transcriptFields = formInfo.Where(f => panelsNeeded.Contains(f.panelID)); CollegeAttatchments.Add(additionalDocs.BuildTranscripts(transcriptFields, (string)Session["ESig"], "College" + i, Enroll.CampusAttending)); } } foreach (var item in CollegeAttatchments) { attachments.Add(item); allAttachments.Add(item); } panelsNeeded.Clear(); //Build ROI panelsNeeded.Add("PersonalInfoPanel"); panelsNeeded.Add("AcademicHistoryPanel"); panelsNeeded.Add("highSchoolPanel"); for (int i = 1; i <= 9; i++) { if (i <= Convert.ToInt16(SchoolInfo1.collegeNumber)) { panelsNeeded.Add("CollegePanel" + i); panelsNeeded.Add("creditPanel" + i); panelsNeeded.Add("degreePanel" + i); } } panelsNeeded.Add("TranscriptPanel"); panelsNeeded.Add("pnlESig"); transcriptFields = formInfo.Where(f => panelsNeeded.Contains(f.panelID)); ROIAttatchments.Add(additionalDocs.BuildTranscripts(transcriptFields, (string)Session["ESig"], "ROI", Enroll.CampusAttending)); foreach (var item in ROIAttatchments) { attachments.Add(item); allAttachments.Add(item); } panelsNeeded.Clear(); //foreach (string item in tuitionAttatchments) //{ // attachments.Add(item); //} foreach (string item in SchoolInfo1.GetTranscriptAttachments()) { attachments.Add(item); ROIAttatchments.Add(item); allAttachments.Add(item); } email.SendHTMLEmail("Re-Entry Enrollment Application - " + PersonalInfo1.StudentName, emailBody, To, Bcc, Cc, fromAddress[0] + "@SullivanEnrollment.edu", attachments); if (Enroll.CampusAttending == "Louisville") { To.Clear(); To.Add("*****@*****.**"); try { email.SendHTMLEmail("Re-Entry Enrollment Application - " + PersonalInfo1.StudentName, emailBody, To, Bcc, Cc, fromAddress[0] + "@SullivanEnrollment.edu", attachments); } catch (Exception ex) { email.SendErrorEmail("Application Email Error", "Application Email Error", ex); } } //Session["CampusNumber"] = Enroll.CampusNumber; Session["StudentName"] = PersonalInfo1.StudentName; Session["Phone"] = PersonalInfo1.Phone; Session["Email"] = PersonalInfo1.Email; Session["ReEntry"] = "Yes"; Session["ZipCode"] = PersonalInfo1.ZipCode; //Send and create Tiffs Tiffer(); try { To.Clear(); To.Add(PersonalInfo1.Email); //Send the application to the student if their email address is in the proper format. var ssn = formInfo.FirstOrDefault(f => f.controlID == "tBoxSocialSecurityNumber"); formInfo.Remove(ssn); var dob = formInfo.FirstOrDefault(f => f.controlID == "tbDOB"); formInfo.Remove(dob); if (Enroll.AlumniIncentive == "Yes") { string alumniBody; attachments.Clear(); alumniBody = "<html><p>Hello " + PersonalInfo1.StudentName + "</p>" + "<p>IMPORTANT: In order to receive the Alumni Tuition Incentive, the Alumnus must be registered with the Alumni Association prior to completing an enrollment. " + "Visit <a href='http://alumni.sullivan.edu/register/' target='_blank'>http://alumni.sullivan.edu/register/</a> to register for the Alumni Association. If the alumnus is already a member of the Alumni Association, " + "visit <a href='http://alumni.sullivan.edu/register/' target='_blank'>http://alumni.sullivan.edu/register/</a> to verify enrollment. If you are not the alumnus, please note you are responsible for ensuring the " + "Alumnus registers prior to you completing the enrollment process.</p>"; //Bcc.Add("*****@*****.**"); email.SendHTMLEmail("Sullivan University Alumni Incentive - " + PersonalInfo1.StudentName, alumniBody, To, Bcc, Cc, "*****@*****.**", attachments); To.Clear(); To.Add("*****@*****.**"); attachments.Clear(); panelsNeeded.Clear(); panelsNeeded.Add("PersonalInfoPanel"); panelsNeeded.Add("PersonalInfoPanel2"); panelsNeeded.Add("EnrollPanel"); panelsNeeded.Add("programPanel"); panelsNeeded.Add("pnlAlumnusName"); IEnumerable <FieldInfo> alumniFields = formInfo.Where(f => panelsNeeded.Contains(f.panelID)); alumniBody = additionalDocs.BuildAlumniIncentive(alumniFields); email.SendHTMLEmail("Alumni Incentive - " + PersonalInfo1.StudentName, alumniBody, To, Bcc, Cc, "*****@*****.**", attachments); } } catch { } Session["AllAttachments"] = allAttachments; ScriptManager.RegisterClientScriptBlock(this, typeof(System.Web.UI.Page), "TrackSubmission", "TrackSubmission();", true); if (Enroll.additionalForms == "MBAAccounting") { Response.Redirect("MBAAccounting.aspx"); } else if (Enroll.Housing == "Yes") { Response.Redirect("housing.aspx"); } else { Response.Redirect("ReEntryConfirmation.aspx"); } } }
//protected void TuitionDoc(string tuitionDoc) //{ // if (tuitionDoc != null) // { // ViewState["DisplayProgramDoc"] = true; // } // else // { // ViewState["DisplayProgramDoc"] = false; // } // tuitionPDF1.LoadPDF(tuitionDoc); //} protected void SubmitApplication(object sender, EventArgs e) { if (Page.IsValid) { if (!TranscriptESign1.Signed) { ScriptManager.RegisterStartupScript(this, typeof(Page), Guid.NewGuid().ToString(), "alert('Please sign the form before submiting')", true); } else { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; string tuitionType = ""; if (Enroll.CampusAttending == "Louisville") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (Enroll.CampusAttending == "Online" || Enroll.CampusAttending == "Louisa" || Enroll.CampusAttending == "Northern Kentucky" || Enroll.CampusAttending == "CarlisleNicholas") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (Enroll.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (Enroll.CampusAttending == "Fort Knox") { To.Add("*****@*****.**"); Session["emailRecipients"] = ""; } foreach (Control control in mainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } if (Enroll.enrollStartDate == "Winter: January 2018") { var withdrawPanels = formInfo.Where(f => f.panelID == "pnlWithdraw" || f.panelID == "pnlWithdrawFortKnox").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } } else { var withdrawPanels = formInfo.Where(f => f.panelID == "pnlOldWithdraw").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } if (Enroll.CampusAttending != "Fort Knox") { withdrawPanels.Clear(); withdrawPanels = formInfo.Where(f => f.panelID == "pnlWithdrawFortKnox").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } } } if (PersonalInfo1.State != "California") { var state = formInfo.Where(f => f.panelID == "pnlCalifornia").ToList(); foreach (var statePanel in state) { formInfo.Remove(statePanel); } } emailBody = email.CreateEmailBody(formInfo); //if ((bool)ViewState["DisplayProgramDoc"] == true) //{ // if (Enroll.CampusAttending == "Fort Knox") // { // if (Enroll.enrollStartDate == "Winter: January 2018") // { // Session["ProgramDoc"] = "FortKnoxRates"; // } // else // { // Session["ProgramDoc"] = "FortKnoxRates2018"; // } // } // if (ViewState["ESigParent"] == null) // tuitionAttatchments = tiff.SignTuitionSheet((string)Session["ESig"], null, PersonalInfo1.StudentName, TranscriptESign1.SigDate); // else // tuitionAttatchments = tiff.SignTuitionSheet((string)ViewState["ESig"], (string)Session["ESigParent"], PersonalInfo1.StudentName, TranscriptESign1.SigDate); //} //foreach (string item in tuitionAttatchments) //{ // attachments.Add(item); // studentAttachments.Add(item); // allAttachments.Add(item); //} if (Enroll.degreeType == "POST GRADUATE") { var asf = formInfo.Where(f => f.panelID == "pnlASFContainer" || f.panelID == "pnlASF").ToList(); foreach (var asfPanel in asf) { formInfo.Remove(asfPanel); } } email.SendHTMLEmail("Enrollment Agreement - " + PersonalInfo1.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //Create Tiffs. Do not move below removing the SSN. Tiffer(); //In case the student enters their email in wrong try { To.Clear(); To.Add(PersonalInfo1.Email); var ssn = formInfo.FirstOrDefault(f => f.controlID == "tBoxSocialSecurityNumber"); formInfo.Remove(ssn); var dob = formInfo.FirstOrDefault(f => f.controlID == "tBoxDateOfBirth"); formInfo.Remove(dob); emailBody = email.CreateEmailBody(formInfo); //Make sure to not include transcript request, or anything with SSN email.SendHTMLEmail("Enrollment Agreement - " + PersonalInfo1.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", studentAttachments); } catch { } Session["AllAttachments"] = allAttachments; Response.Redirect("Confirmation.aspx"); } } }
protected void SubmitApplication(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; AdditionalDocs additionalDocs = new AdditionalDocs(); IEnumerable <FieldInfo> transcriptFields; //mainPanel.ContentTemplateContainer.Controls if (Page.IsValid) { //Start by looping through each control in the Wizard Step foreach (Control step in pnlMain.Controls) { if (step is Panel) { foreach (Control control in step.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } } else if (step is UserControl) { foreach (Control currentControl in step.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } }//end foreach loop for (int i = 0; i <= 9; i++) { if (i > SchoolInfo1.collegeValue) { collegePanels.Add("CollegePanel" + i); } } var colleges = formInfo.Where(c => collegePanels.Contains(c.panelID)).ToList(); foreach (var college in colleges) { formInfo.Remove(college); } if (PersonalInfo1.State != "California") { var state = formInfo.Where(f => f.panelID == "pnlCalifornia").ToList(); foreach (var statePanel in state) { formInfo.Remove(statePanel); } } emailBody = email.CreateEmailBody(formInfo); //Build ROI panelsNeeded.Add("PersonalInfoPanel"); panelsNeeded.Add("AcademicHistoryPanel"); panelsNeeded.Add("pnlFirstGenCollegeStudent"); panelsNeeded.Add("highSchoolPanel"); for (int i = 1; i <= 9; i++) { if (i <= Convert.ToInt16(SchoolInfo1.collegeNumber)) { panelsNeeded.Add("CollegePanel" + i); panelsNeeded.Add("creditPanel" + i); panelsNeeded.Add("degreePanel" + i); } } panelsNeeded.Add("pnlESig"); transcriptFields = formInfo.Where(f => panelsNeeded.Contains(f.panelID)); transcriptAttatchments.Add(additionalDocs.BuildTranscripts(transcriptFields, (string)Session["ESig"], "ROI", "Louisville")); panelsNeeded.Clear(); foreach (string item in transcriptAttatchments) { attachments.Add(item); allAttachments.Add(item); } foreach (string item in SchoolInfo1.GetTranscriptAttachments()) { attachments.Add(item); transcriptAttatchments.Add(item); allAttachments.Add(item); } To.Add("*****@*****.**"); email.SendHTMLEmail("College of Pharmacy Enrollment Application - " + PersonalInfo1.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //Create and send tiffs Tiffer(); Session["enrollmentFee"] = "100.00"; Session["emailRecipients"] = "*****@*****.**"; Session["Campus"] = "Louisville"; Session["AllAttachments"] = allAttachments; ScriptManager.RegisterClientScriptBlock(this, typeof(System.Web.UI.Page), "TrackSubmission", "TrackSubmission();", true); Response.Redirect("COPConfirmation.aspx"); } }
protected void Submit_Click(object sender, EventArgs e) { if (Page.IsValid) { List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); string emailBody; if (Re_Entry.SelectedValue == "Naw") { if (campus.SelectedItem.Text == "Sullivan Louisville") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (campus.SelectedItem.Text == "Online" || campus.SelectedItem.Text == "Louisa" || campus.SelectedItem.Text == "Northern Kentucky") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (campus.SelectedItem.Text == "Sullivan Lexington") { To.Add("*****@*****.**"); } else if (campus.SelectedItem.Text == "Fort Knox") { To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Spencerian Louisville") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Spencerian Lexington") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (campus.SelectedItem.Text == "SCTD") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); To.Add("*****@*****.**"); } } else { if (campus.SelectedItem.Text == "Sullivan Louisville") { To.Add("*****@*****.**"); } else if (campus.SelectedItem.Text == "Online" || campus.SelectedItem.Text == "Louisa" || campus.SelectedItem.Text == "Northern Kentucky") { To.Add("*****@*****.**"); } else if (campus.SelectedItem.Text == "Sullivan Lexington") { To.Add("*****@*****.**"); } else if (campus.SelectedItem.Text == "Fort Knox") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Spencerian Louisville") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Spencerian Lexington") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (campus.SelectedItem.Text == "SCTD") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); To.Add("*****@*****.**"); } } foreach (Control currentControl in pnlMain.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } emailBody = email.CreateEmailBody(formInfo); email.SendHTMLEmail("Enrollment Fee Waiver - " + tbLName.Text + ", " + tbFName.Text, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); Tiffer(); //Session["AllAttachments"] = allAttachments; Response.Redirect("Confirmation.aspx"); } }
protected void Submit_Click(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; string housing; if (personalInfo1.CampusAttending == "Louisville") { To.Add("*****@*****.**"); } else if (personalInfo1.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } foreach (Control control in MainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } //Send and create tiffs. Do not move below removing the SSN. Tiffer(); emailBody = email.CreateEmailBody(formInfo); attachments.Add(Server.MapPath("PDFs/CompFees.pdf")); attachments.Add(Server.MapPath("PDFs/TechStandards.pdf")); email.SendHTMLEmail("NCHS Admissions", emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //In case the student enters their email in wrong try { To.Clear(); To.Add(personalInfo1.Email); email.SendHTMLEmail("NCHS Admissions", emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } Session["AllAttachments"] = allAttachments; if (ViewState["Housing"] == null) { housing = "No"; } else { housing = (string)ViewState["Housing"]; } if (housing == "No" && ViewState["CampusNumber"] == null) { Response.Redirect("Confirmation.aspx"); } else if (housing == "Yes") { Session["Campus"] = ViewState["Campus"]; Session["StudentName"] = ViewState["StudentName"]; Session["CampusNumber"] = ViewState["CampusNumber"]; Session["Phone"] = ViewState["Phone"]; Session["Email"] = ViewState["Email"]; Session["enrollmentFee"] = ViewState["enrollmentFee"]; Session["Transcript"] = ViewState["Transcript"]; Session["Housing"] = ViewState["Housing"]; Response.Redirect("housing.aspx"); } else { Session["Campus"] = ViewState["Campus"]; Session["StudentName"] = ViewState["StudentName"]; Session["CampusNumber"] = ViewState["CampusNumber"]; Session["Phone"] = ViewState["Phone"]; Session["Email"] = ViewState["Email"]; Session["enrollmentFee"] = ViewState["enrollmentFee"]; Session["Transcript"] = ViewState["Transcript"]; Session["Housing"] = ViewState["Housing"]; Response.Redirect("IPED.aspx"); } }
protected void SubmitApplication(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; //mainPanel.ContentTemplateContainer.Controls if (Page.IsValid) { foreach (Control control in mainPanel.Controls) { //If the control is a User Control then loop through each control inside the panel in the current user control if (control.GetType().ToString().EndsWith("ascx")) { try { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } catch { Response.Redirect(control.ID.ToString()); } } } emailBody = email.CreateEmailBody(formInfo); //panelsNeeded.Add("PersonalInfoPanel"); //if (Colleges.collegeNumber != "00" && Colleges.collegeNumber != "0") //{ // for (int i = 1; i <= Convert.ToInt16(Colleges.collegeNumber); i++) // { // panelsNeeded.Add("PersonalInfoPanel"); // panelsNeeded.Add("CollegePanel" + i); // panelsNeeded.Add("TranscriptPanel"); // BuildTranscripts("College" + i + "_" + DateTime.Now.Millisecond + ".doc", panelsNeeded); // panelsNeeded.Clear(); // } //} if (PersonalInfo1.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } else { To.Add("*****@*****.**"); To.Add("*****@*****.**"); To.Add("*****@*****.**"); } email.SendHTMLEmail("Sullivan International Registration", emailBody, To, Bcc, Cc, "*****@*****.**", attachments); foreach (var file in attachments) { try { File.Delete(file); } catch { } } Session["AllAttachments"] = attachments; Response.Redirect("InternationalRegConfirm.aspx"); } }
protected void Submit_Click(object sender, EventArgs e) { if (!EsigForm.Signed) { ScriptManager.RegisterStartupScript(this, typeof(Page), Guid.NewGuid().ToString(), "alert('Please sign the form before submiting')", true); } else { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; if (PersonalInfoForm.CampusAttending == "Lexington") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } foreach (Control control in MainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } emailBody = email.CreateEmailBody(formInfo); attachments.Add("C:\\Websites\\secure.sullivan.edu\\Admissions\\PDFs\\ThingsStudentsMustKnow.pdf"); email.SendHTMLEmail("New Registration - " + PersonalInfoForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //In case the student enters their email in wrong try { To.Clear(); To.Add(PersonalInfoForm.Email); email.SendHTMLEmail("New Registration - " + PersonalInfoForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } //Send and create tiffs Tiffer(); Session["AllAttachments"] = allAttachments; Response.Redirect("Confirmation.aspx"); } }
protected void Submit_Click(object sender, EventArgs e) { if (Page.IsValid) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; if (PersonalInfoForm.CampusAttending == "Louisville") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Lexington") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } foreach (Control control in MainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } emailBody = email.CreateEmailBody(formInfo); email.SendHTMLEmail("Jump Start - " + PersonalInfoForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //In case the student enters their email in wrong try { To.Clear(); To.Add(PersonalInfoForm.Email); email.SendHTMLEmail("Jump Start - " + PersonalInfoForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } //Send and create Tiffs Tiffer(); Session["AllAttachments"] = allAttachments; Response.Redirect("Confirmation.aspx"); } }
protected void Submit_Click(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; string housing; To.Add("*****@*****.**"); foreach (Control control in MainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } //Send and create tiffs. Do not move below removing the SSN. Tiffer(); emailBody = email.CreateEmailBody(formInfo); attachments.Add(Server.MapPath("PDFs/PharmAdmissions.pdf")); foreach (string file in pharmBackground1.GetAttachments()) { attachments.Add(file); } email.SendHTMLEmail("Pharm Tech Application - " + personalInfo1.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); var ssn = formInfo.FirstOrDefault(f => f.controlID == "tBoxSocialSecurityNumber"); formInfo.Remove(ssn); emailBody = email.CreateEmailBody(formInfo); //In case the student enters their email in wrong try { To.Clear(); To.Add(personalInfo1.Email); email.SendHTMLEmail("Pharm Tech Application - " + personalInfo1.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } Session["AllAttachments"] = allAttachments; if (ViewState["Housing"] == null) { housing = "No"; } else { housing = (string)ViewState["Housing"]; } if (housing == "No" && ViewState["CampusNumber"] == null) { Response.Redirect("Confirmation.aspx"); } else if (housing == "Yes") { Session["Campus"] = ViewState["Campus"]; Session["StudentName"] = ViewState["StudentName"]; Session["CampusNumber"] = ViewState["CampusNumber"]; Session["Phone"] = ViewState["Phone"]; Session["Email"] = ViewState["Email"]; Session["enrollmentFee"] = ViewState["enrollmentFee"]; Session["Transcript"] = ViewState["Transcript"]; Session["Housing"] = ViewState["Housing"]; Response.Redirect("housing.aspx"); } else { Session["Campus"] = ViewState["Campus"]; Session["StudentName"] = ViewState["StudentName"]; Session["CampusNumber"] = ViewState["CampusNumber"]; Session["Phone"] = ViewState["Phone"]; Session["Email"] = ViewState["Email"]; Session["enrollmentFee"] = ViewState["enrollmentFee"]; Session["Transcript"] = ViewState["Transcript"]; Session["Housing"] = ViewState["Housing"]; Response.Redirect("IPED.aspx"); } }
protected void btnNext_Click(object sender, EventArgs e) { if (Page.IsValid) { List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); string campusAttending = campus.SelectedItem.Text; string emailBody; if (campusAttending == "Louisville") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (campusAttending == "Online" || campusAttending == "Louisa Learning Site" || campusAttending == "Northern Kentucky" || campusAttending == "CarlisleNicholas") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (campusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (campusAttending == "Fort Knox") { To.Add("*****@*****.**"); } //Bcc.Add("*****@*****.**"); foreach (Control currentControl in pnlMain.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } emailBody = email.CreateEmailBody(formInfo); email.SendHTMLEmail("Admissions Checklist - " + tBoxLastName.Text + ", " + tBoxFirstName.Text, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); To.Clear(); try { To.Add(tBoxEmailAddress.Text); email.SendHTMLEmail("Admissions Checklist - " + tBoxLastName.Text + ", " + tBoxFirstName.Text, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } Tiffer(); Response.Redirect("Confirmation.aspx"); } }
protected void Submit_Click(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; if (HousingForm.CampusAttending == "Louisville") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (HousingForm.CampusAttending == "Lexington") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } foreach (Control control in MainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } if (HousingForm.CampusAttending == "Lexington") { var removalPanels = formInfo.Where(p => p.panelID == "pnlHousingPreference" || p.panelID == "pnlQuietSex").ToList(); foreach (var record in removalPanels) { formInfo.Remove(record); } } emailBody = email.CreateEmailBody(formInfo); email.SendHTMLEmail("Sullivan Housing Application - " + HousingForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //email.SendHTMLEmail("Housing Application", emailBody, attachments, "*****@*****.**"); //In case the student enters their email in wrong try { To.Clear(); To.Add(HousingForm.aoEmail); email.SendHTMLEmail("Sullivan Housing Application - " + HousingForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } //Send and create Tiffs. Don't put below removing DOB Tiffer(); try { var dob = formInfo.FirstOrDefault(f => f.controlID == "tBoxDateOfBirth"); formInfo.Remove(dob); emailBody = email.CreateEmailBody(formInfo); To.Clear(); To.Add(HousingForm.Email); email.SendHTMLEmail("Sullivan Housing Application - " + HousingForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } Session["AllAttachments"] = allAttachments; if (ViewState["CampusNumber"] == null && ViewState["ReEntry"] == null) { Response.Redirect("Confirmation.aspx"); } else { Session["Campus"] = ViewState["Campus"]; Session["StudentName"] = ViewState["StudentName"]; Session["CampusNumber"] = ViewState["CampusNumber"]; Session["Phone"] = ViewState["Phone"]; Session["Email"] = ViewState["Email"]; Session["enrollmentFee"] = ViewState["enrollmentFee"]; Session["Transcript"] = ViewState["Transcript"]; Session["Housing"] = ViewState["Housing"]; if (ViewState["ReEntry"] == null) { Response.Redirect("IPED.aspx"); } else { Response.Redirect("ReEntryConfirmation.aspx"); } } }
protected void SubmitApplication(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; string[] fromAddress; fromAddress = PersonalInfo1.StudentName.Split(','); //mainPanel.ContentTemplateContainer.Controls if (Page.IsValid) { //TuitionInfo.displayTuitionRates(); foreach (Control control in mainPanel.Controls) { // //If the control is a User Control then loop through each control inside the panel in the current user control if (control.GetType().ToString().EndsWith("ascx")) { try { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } catch { Response.Redirect(control.ID.ToString()); } } } if (Enroll.enrollStartDate == "Winter: January 2018") { var withdrawPanels = formInfo.Where(f => f.panelID == "pnlWithdraw" || f.panelID == "pnlWithdrawFortKnox").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } } else { var withdrawPanels = formInfo.Where(f => f.panelID == "pnlOldWithdraw").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } if (Enroll.CampusAttending != "Fort Knox") { withdrawPanels.Clear(); withdrawPanels = formInfo.Where(f => f.panelID == "pnlWithdrawFortKnox").ToList(); foreach (var withdrawPanel in withdrawPanels) { formInfo.Remove(withdrawPanel); } } } if (PersonalInfo1.State != "California") { var state = formInfo.Where(f => f.panelID == "pnlCalifornia").ToList(); foreach (var statePanel in state) { formInfo.Remove(statePanel); } } emailBody = email.CreateEmailBody(formInfo); foreach (string file in attachments) { attachments.Add(file); } if (Enroll.degreeType == "POST GRADUATE") { var asf = formInfo.Where(f => f.panelID == "pnlASFContainer" || f.panelID == "pnlASF").ToList(); foreach (var asfPanel in asf) { formInfo.Remove(asfPanel); } } if (Enroll.CampusAttending == "Online" || Enroll.CampusAttending == "Louisa" || Enroll.CampusAttending == "Northern Kentucky" || Enroll.CampusAttending == "CarlisleNicholas" || Enroll.CampusAttending == "Mayfield") { To.Add("*****@*****.**"); } else if (Enroll.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (Enroll.CampusAttending == "Fort Knox") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else { To.Add("*****@*****.**"); } if (Enroll.VABenefits == "Yes") { To.Add("*****@*****.**"); } email.SendHTMLEmail("Re-Entry Enrollment Agreement - " + PersonalInfo1.StudentName, emailBody, To, Bcc, Cc, fromAddress[0] + "@SullivanEnrollment.edu", attachments); //Send and create tiffs. Do not move below removing the SSN. Tiffer(); var ssn = formInfo.FirstOrDefault(f => f.controlID == "tBoxSocialSecurityNumber"); formInfo.Remove(ssn); emailBody = ""; emailBody = email.CreateEmailBody(formInfo); try { To.Clear(); To.Add(PersonalInfo1.Email); email.SendHTMLEmail("Re-Entry Enrollment Agreement - " + PersonalInfo1.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); } catch { } Session["AllAttachments"] = allAttachments; Response.Redirect("Confirmation.aspx"); } }
//public string CampusNumber //{ // get // { // if (campus.SelectedItem.Text == "Louisville") // return "01"; // else if (campus.SelectedItem.Text == "Lexington") // return "21"; // else if (campus.SelectedItem.Text == "Fort Knox") // return "11"; // else if (campus.SelectedItem.Text == "Online" || campus.SelectedValue == "Louisa" || campus.SelectedItem.Text == "Northern Kentukcy" || campus.SelectedItem.Text == "CarlisleNicholas") // return "07"; // return "01"; // } //} protected void btnSubmit_Click(object sender, EventArgs e) { if (Page.IsValid) { List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); string emailBody; //To.Add("*****@*****.**"); if (campus.SelectedValue == "Sullivan Louisville") { To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Sullivan Lexington") { To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Online") { To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Fort Knox") { To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Spencerian Louisville") { To.Add("*****@*****.**"); } else if (campus.SelectedValue == "Spencerian Lexington") { To.Add("*****@*****.**"); } else if (campus.SelectedValue == "SCTD") { To.Add("[email protected] "); } //To.Add(tbAOEmail.Text); foreach (Control currentControl in pnlMain.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } var uploadInfo = formInfo.Where(u => u.panelID == "pnlAttachment").ToList(); foreach (var upload in uploadInfo) { formInfo.Remove(upload); } emailBody = email.CreateEmailBody(formInfo); if (ViewState["Attatchment"] != null) { attachments = (List <string>)ViewState["Attatchment"]; Session["AllAttachments"] = attachments; } email.SendHTMLEmail("Re-Entry Statement of Understanding - " + tBoxLastName.Text + ", " + tBoxFirstName.Text, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); Tiffer(); Response.Redirect("Confirmation.aspx"); } }
protected void Submit_Click(object sender, EventArgs e) { List <string> panelsNeeded = new List <string>(); List <string> To = new List <string>(); List <string> Bcc = new List <string>(); List <string> Cc = new List <string>(); List <string> collegePanels = new List <string>(); TiffCreator tiff = new TiffCreator(); Email email = new Email(); string emailBody; AdditionalDocs additionalDocs = new AdditionalDocs(); IEnumerable <FieldInfo> transcriptFields; if (PersonalInfoForm.ReEntry == "Naw") { if (PersonalInfoForm.CampusAttending == "Louisville") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Online" || PersonalInfoForm.CampusAttending == "Louisa" || PersonalInfoForm.CampusAttending == "CarlisleNicholas" || PersonalInfoForm.CampusAttending == "Northern Kentucky") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Fort Knox") { To.Add("*****@*****.**"); } } else { if (PersonalInfoForm.CampusAttending == "Online" || PersonalInfoForm.CampusAttending == "Louisa" || PersonalInfoForm.CampusAttending == "CarlisleNicholas" || PersonalInfoForm.CampusAttending == "Northern Kentucky") { To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Lexington") { To.Add("*****@*****.**"); } else if (PersonalInfoForm.CampusAttending == "Fort Knox") { To.Add("*****@*****.**"); To.Add("*****@*****.**"); } else { To.Add("*****@*****.**"); } } foreach (Control control in MainPanel.Controls) { if (control is UserControl) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { formInfo = fieldInfo.CreateFormInfo((Panel)currentControl); } } } } //Create transcripts // Build HS/ GED Transcript panelsNeeded.Add("PersonalInfoPanel"); panelsNeeded.Add("AcademicHistoryPanel"); panelsNeeded.Add("highSchoolPanel"); panelsNeeded.Add("TranscriptPanel"); transcriptFields = formInfo.Where(f => panelsNeeded.Contains(f.panelID)); attachments.Add(additionalDocs.BuildTranscripts(transcriptFields, (string)Session["ESig"], "HS-GED", PersonalInfoForm.CampusAttending)); panelsNeeded.Clear(); //Build College Transcipts for (int i = 1; i <= 9; i++) { if (i <= Convert.ToInt16(SchoolInfoForm.collegeNumber)) { panelsNeeded.Add("PersonalInfoPanel"); panelsNeeded.Add("CollegePanel" + i); panelsNeeded.Add("creditPanel" + i); panelsNeeded.Add("degreePanel" + i); panelsNeeded.Add("TranscriptPanel"); panelsNeeded.Add("pnlESig"); transcriptFields = formInfo.Where(f => panelsNeeded.Contains(f.panelID)); attachments.Add(additionalDocs.BuildTranscripts(transcriptFields, (string)Session["ESig"], "College" + i, PersonalInfoForm.CampusAttending)); } } panelsNeeded.Clear(); emailBody = email.CreateEmailBody(formInfo); //To.Add("*****@*****.**"); foreach (string item in attachments) { allAttachments.Add(item); } foreach (string item in SchoolInfoForm.GetTranscriptAttachments()) { attachments.Add(item); ROIAttatchments.Add(item); allAttachments.Add(item); } email.SendHTMLEmail("Transcript Request - " + PersonalInfoForm.StudentName, emailBody, To, Bcc, Cc, "*****@*****.**", attachments); //Send and create Tiffs Tiffer(); Session["AllAttachments"] = allAttachments; Response.Redirect("Confirmation.aspx"); }