public static IEnumerable <OpenXmlElement> GetSection(EALInfo EALInfo) { List <OpenXmlElement> sectionParts = new List <OpenXmlElement>(); if (EALInfo != null) { sectionParts.Add(ParagraphHelper.Paragraph("EAL", LSSDDocumentStyles.SectionTitle)); sectionParts.Add( TableHelper.StyledTable( TableHelper.StickyTableRow( TableHelper.LabelCell("Is EAL:"), TableHelper.ValueCell(EALInfo.IsEAL), TableHelper.LabelCell("First CDN School?:"), TableHelper.ValueCell(EALInfo.IsFirstCanadianSchool) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Entry date to Canada:"), TableHelper.ValueCell(EALInfo.EntryDateToCanada?.ToShortDateString()), TableHelper.LabelCell("Entry date to CDN school:"), TableHelper.ValueCell(EALInfo.EntryDateToCanadianSchool?.ToShortDateString()) ) ) ); sectionParts.Add(ParagraphHelper.WhiteSpace()); } return(sectionParts); }
private static Run phoneNumberBlob(string HomePhone, string WorkPhone, string CellPhone, string AltContactInfo) { StringBuilder blob = new StringBuilder(); if (!string.IsNullOrEmpty(HomePhone)) { blob.Append($"{HomePhone} (Home)\n"); } if (!string.IsNullOrEmpty(CellPhone)) { blob.Append($"{CellPhone} (Cell)\n"); } if (!string.IsNullOrEmpty(WorkPhone)) { blob.Append($"{WorkPhone} (Work)\n"); } if (!string.IsNullOrEmpty(AltContactInfo)) { blob.Append($"{AltContactInfo}"); } return(ParagraphHelper.ConvertMultiLineString(blob.ToString())); }
public static IEnumerable <OpenXmlElement> GetSection(CitizenshipInfo CitizenshipInfo) { List <OpenXmlElement> sectionParts = new List <OpenXmlElement>(); if (CitizenshipInfo != null) { sectionParts.Add(ParagraphHelper.Paragraph("Citizenship", LSSDDocumentStyles.SectionTitle)); sectionParts.Add( TableHelper.StyledTable( TableHelper.StickyTableRow( TableHelper.LabelCell("Birth Country:"), TableHelper.ValueCell(CitizenshipInfo.CountryOfBirth), TableHelper.LabelCell("Citizenship:"), TableHelper.ValueCell(CitizenshipInfo.Citizenship), TableHelper.LabelCell("Residency Type:"), TableHelper.ValueCell(CitizenshipInfo.ResidencyType) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Lang. at home:").WithWidth(16.6), TableHelper.ValueCell(CitizenshipInfo.LanguageSpokenAtHome).WithColspan(2).WithWidth(33.3), TableHelper.LabelCell("Previous Country:").WithWidth(16.6), TableHelper.ValueCell(CitizenshipInfo.PreviousCountry).WithColspan(2).WithWidth(33.3) ) ) ); sectionParts.Add(ParagraphHelper.WhiteSpace()); } return(sectionParts); }
public static IEnumerable <OpenXmlElement> GetSection(SiblingInfo Siblings) { List <OpenXmlElement> sectionParts = new List <OpenXmlElement>(); if (Siblings?.Siblings.Count > 0) { Table siblingTable = TableHelper.StyledTable( new TableRow( TableHelper.LabelCell("Sibling Name"), TableHelper.LabelCell("Date of Birth"), TableHelper.LabelCell("School Attending") ) ); foreach (Sibling sibling in Siblings.Siblings) { siblingTable.AppendChild( new TableRow( TableHelper.ValueCell($"{sibling.LastName}, {sibling.FirstName}"), TableHelper.ValueCell(sibling.DateOfBirth != null ? sibling.DateOfBirth.GetValueOrDefault().ToLongDateString() : "(not submitted)"), TableHelper.ValueCell(sibling.SchoolAttending) ) ); } sectionParts.Add(siblingTable); } sectionParts.Add(ParagraphHelper.WhiteSpace()); return(sectionParts); }
private static IEnumerable <OpenXmlElement> GetSection(BaseSubmittedForm Form, TimeZoneInfo timezone, string Title, string FormId) { return(new List <OpenXmlElement>() { ParagraphHelper.Paragraph(Title, LSSDDocumentStyles.PageTitle, JustificationValues.Center), ParagraphHelper.Paragraph($"Form id: {FormId}, submitted {TimeZoneInfo.ConvertTimeFromUtc(Form.DateReceivedUTC,timezone).ToShortDateString()}", LSSDDocumentStyles.Dim, JustificationValues.Center), ParagraphHelper.WhiteSpace() }); }
public static IEnumerable <OpenXmlElement> GetSection(FirstNationsInfo FNInfo) { List <OpenXmlElement> sectionParts = new List <OpenXmlElement>(); sectionParts.Add(ParagraphHelper.Paragraph("Students of First Nations Ancestry", LSSDDocumentStyles.SectionTitle)); if (FNInfo != null) { if (FNInfo.IsDeclaringFirstNationsInfo) { sectionParts.Add( TableHelper.StyledTable( TableHelper.StickyTableRow( TableHelper.LabelCell("Aboriginal group:"), TableHelper.ValueCell(FNInfo.AboriginalStatus), TableHelper.LabelCell("Status Number:"), TableHelper.ValueCell(FNInfo.StatusNumber) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Resides On Reserve:"), TableHelper.ValueCell(FNInfo.ResidesOnReserve), TableHelper.LabelCell("Reserve of Residence:"), TableHelper.ValueCell(FNInfo.ReserveName) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Band Name:"), TableHelper.ValueCell(FNInfo.BandName), TableHelper.LabelCell("Reserve House:"), TableHelper.ValueCell(FNInfo.ReserveHouse) ) ) ); } else { sectionParts.Add(ParagraphHelper.Paragraph("No First Nations information was declared.", LSSDDocumentStyles.NormalParagraph)); } } else { sectionParts.Add(ParagraphHelper.Paragraph("No First Nations data was collected.", LSSDDocumentStyles.NormalParagraph)); } sectionParts.Add(ParagraphHelper.WhiteSpace()); return(sectionParts); }
public static IEnumerable <OpenXmlElement> GetSection(FormSubmitter submittedBy) { return(new List <OpenXmlElement>() { TableHelper.StyledTable( new TableRow( TableHelper.LabelCell("Form Submitted By", JustificationValues.Left).WithWidth(47.5), TableHelper.LabelCell("Contact Details", JustificationValues.Left).WithWidth(47.5) ), new TableRow( TableHelper.ValueCell($"{submittedBy.FirstName} {submittedBy.LastName}", JustificationValues.Left), TableHelper.ValueCell(submittedBy.ContactDetails) ) ), ParagraphHelper.WhiteSpace() }); }
public static IEnumerable <OpenXmlElement> GetSection(EnrolmentInfo EnrolmentInfo) { List <OpenXmlElement> sectionParts = new List <OpenXmlElement>(); if (EnrolmentInfo != null) { sectionParts.Add( TableHelper.StyledTable( TableHelper.StickyTableRow( TableHelper.LabelCell("No Previous Schooling:").WithWidth(40), TableHelper.ValueCell(EnrolmentInfo.NoPreviousSchooling).WithWidth(5), TableHelper.LabelCell("Transfer from Home-Based:"), TableHelper.ValueCell(EnrolmentInfo.TransferFromHomeBased) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Transfer from another SASK school:"), TableHelper.ValueCell(EnrolmentInfo.TransferFromAnotherSaskSchool), TableHelper.ValueCell(EnrolmentInfo.SchoolTransferredFrom).WithColspan(2) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Transfer from another country:"), TableHelper.ValueCell(EnrolmentInfo.TransferFromAnotherCountry), TableHelper.ValueCell(EnrolmentInfo.CountryTransferredFrom).WithColspan(2) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Exchange Student:").WithWidth(40), TableHelper.ValueCell(EnrolmentInfo.ExchangeStudent).WithWidth(5), TableHelper.ValueCell(EnrolmentInfo.ExchangeStudentFrom).WithColspan(2) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Transfer from another province:"), TableHelper.ValueCell(EnrolmentInfo.TransferFromAnotherProvince), TableHelper.ValueCell(EnrolmentInfo.ProvinceTransferredFrom).WithColspan(2) ) ) ); sectionParts.Add(ParagraphHelper.WhiteSpace()); } return(sectionParts); }
public static IEnumerable <OpenXmlElement> GetSection(SelectedSchool School, GradeInfo Grade) { if (School == null) { throw new System.Exception("School cannot be null"); } return(new List <OpenXmlElement>() { TableHelper.StyledTable( new TableRow( TableHelper.LabelCell("School:", JustificationValues.Center).WithWidth(66.6), TableHelper.LabelCell("Grade:", JustificationValues.Center).WithWidth(33.3) ), new TableRow( TableHelper.ValueCell($"{School?.Name} ({School?.DAN})", JustificationValues.Center), TableHelper.ValueCell(Grade?.Grade, JustificationValues.Center) ) ), ParagraphHelper.WhiteSpace() }); }
public static IEnumerable <OpenXmlElement> GetSection(StVitalExtraRequirements stVitalExtraRequirements) { List <OpenXmlElement> sectionParts = new List <OpenXmlElement>(); if (stVitalExtraRequirements != null) { sectionParts.Add(ParagraphHelper.Paragraph("St. Vital Catholic School Admission Policy :", LSSDDocumentStyles.SectionTitle)); sectionParts.Add( TableHelper.StyledTable( TableHelper.StickyTableRow( TableHelper.LabelCell("Form submitter acknowledges that they understand policy:"), TableHelper.ValueCell(stVitalExtraRequirements.AcknowledgesPolicy) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Child is already baptized in Catholic faith:"), TableHelper.ValueCell(stVitalExtraRequirements.ChildIsCatholic) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Will commit to baptising within 1 year:"), TableHelper.ValueCell(stVitalExtraRequirements.ChildIsCatholic ? "N/A" : (stVitalExtraRequirements.CommitToBaptize ? "Yes" : "No")) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Acknowledges failure to baptize means discontinuing enrolment at St Vital:"), TableHelper.ValueCell(stVitalExtraRequirements.ChildIsCatholic ? "N/A" : (stVitalExtraRequirements.AcknowledgeFailureState ? "Yes" : "No")) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Understands that contact info will be shared with St. Vital Parish:"), TableHelper.ValueCell(stVitalExtraRequirements.ShareInfoWithParish) ) ) ); sectionParts.Add(ParagraphHelper.WhiteSpace()); } return(sectionParts); }
public static IEnumerable <OpenXmlElement> GetSection(SchoolPreferenceList SchoolPreferences) { if (SchoolPreferences == null) { throw new System.Exception("School preferences cannot be null"); } return(new List <OpenXmlElement>() { TableHelper.StyledTable( new TableRow( TableHelper.LabelCell("First school choice", JustificationValues.Center).WithWidth(33.3), TableHelper.LabelCell("Second school choice", JustificationValues.Center).WithWidth(33.3), TableHelper.LabelCell("Third school choice", JustificationValues.Center).WithWidth(33.3) ), new TableRow( TableHelper.ValueCell(SchoolPreferences?.FirstChoice?.Name, JustificationValues.Center), TableHelper.ValueCell(SchoolPreferences?.SecondChoice?.Name, JustificationValues.Center), TableHelper.ValueCell(SchoolPreferences?.ThirdChoice?.Name, JustificationValues.Center) ) ), ParagraphHelper.WhiteSpace() }); }
public static IEnumerable <OpenXmlElement> GetSection(ContactsInfo Contacts) { List <OpenXmlElement> sectionParts = new List <OpenXmlElement>(); if (Contacts?.Contacts.Count > 0) { sectionParts.Add(ParagraphHelper.Paragraph("Contacts", LSSDDocumentStyles.SectionTitle)); foreach (Contact contact in Contacts.Contacts) { sectionParts.Add( TableHelper.StyledTableBordered( TableHelper.StickyTableRow( TableHelper.LabelCell("Name:"), TableHelper.ValueCell(contact.GetDisplayName(), JustificationValues.Left).WithColspan(5) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Relation:", JustificationValues.Left).WithWidth(15), TableHelper.ValueCell(contact.RelationshipToStudent), TableHelper.LabelCell("Email:"), TableHelper.ValueCell(contact.EmailAddress), TableHelper.LabelCell("Lives With:"), TableHelper.ValueCell(contact.LivesWithStudent) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Priority:"), TableHelper.ValueCell(contact.ContactPriority.ToString()), TableHelper.LabelCell("Employer:"), TableHelper.ValueCell(contact.Employer), TableHelper.LabelCell("Rcv. Mail:"), TableHelper.ValueCell(contact.ShouldRecieveMailAboutStudent) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Notes:"), TableHelper.ValueCell(contact.Note, JustificationValues.Left).WithColspan(5) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Contact:", JustificationValues.Left).WithColspan(2).WithWidth(33.3), TableHelper.LabelCell("Primary Addr:", JustificationValues.Left).WithColspan(2).WithWidth(33.3), TableHelper.LabelCell("Mailing Addr:", JustificationValues.Left).WithColspan(2).WithWidth(33.3) ), TableHelper.StickyTableRow( TableHelper.ValueCell(phoneNumberBlob(contact.HomePhone, contact.WorkPhone, contact.CellPhone, contact.AlternateContactInfo)).WithColspan(2), TableHelper.ValueCell(ParagraphHelper.ConvertMultiLineString(contact.PrimaryAddress.ToFormattedAddress()), JustificationValues.Left).WithColspan(2), TableHelper.ValueCell(ParagraphHelper.ConvertMultiLineString(contact.MailingAddress.ToFormattedAddress()), JustificationValues.Left).WithColspan(2) ) ) ); sectionParts.Add( ParagraphHelper.WhiteSpace() ); } } else { sectionParts.Add( ParagraphHelper.Paragraph("No contact information entered", LSSDDocumentStyles.FieldValue) ); } sectionParts.Add(ParagraphHelper.WhiteSpace()); return(sectionParts); }
public static IEnumerable <OpenXmlElement> GetSection(Student Student, TimeZoneInfo TimeZone, bool IsPreKForm = false) { List <OpenXmlElement> sectionParts = new List <OpenXmlElement>(); if (IsPreKForm) { Student.HealthServicesNumber = "(Not collected for PreK applications)"; } sectionParts.Add( TableHelper.StyledTable( TableHelper.FieldTableRow("Legal Name:", Student.GetLegalName()), TableHelper.FieldTableRow("Preferred Name:", Student.GetPreferredName()), TableHelper.FieldTableRow("Gender:", Student.Gender), TableHelper.FieldTableRow("Date of Birth:", Student.GetDateOfBirthWithAge()), TableHelper.FieldTableRow("Health Services #:", Student.HealthServicesNumber), TableHelper.FieldTableRow("Medical Notes:", Student.MedicalNotes), TableHelper.FieldTableRow("Land Description:", Student.LandDescription), TableHelper.FieldTableRow("Student Cell #:", Student.CellPhone) ) ); sectionParts.Add(ParagraphHelper.WhiteSpace()); // The code below will crash if the addresses are null, so check // and make them empty if they are null if (Student.PrimaryAddress == null) { Student.PrimaryAddress = new Address(); } if (Student.MailingAddress == null) { Student.MailingAddress = new Address(); } sectionParts.Add( TableHelper.StyledTable( TableHelper.StickyTableRow( TableHelper.LabelCell("Primary Address"), TableHelper.LabelCell("Mailing Address") ), TableHelper.StickyTableRow( TableHelper.ValueCell(ParagraphHelper.ConvertMultiLineString(Student.PrimaryAddress.ToFormattedAddress())), TableHelper.ValueCell(ParagraphHelper.ConvertMultiLineString(Student.MailingAddress.ToFormattedAddress())) ) ) ); // Previous schools if (!string.IsNullOrEmpty(Student.PreviousSchools)) { sectionParts.Add(ParagraphHelper.WhiteSpace()); sectionParts.Add( TableHelper.StyledTable( TableHelper.StickyTableRow( TableHelper.LabelCell("Previous Schools") ), TableHelper.StickyTableRow( TableHelper.ValueCell(string.IsNullOrEmpty(Student.PreviousSchools) ? "None" : Student.PreviousSchools) ) ) ); } sectionParts.Add(ParagraphHelper.WhiteSpace()); return(sectionParts); }
public static IEnumerable <OpenXmlElement> GetSection(PreKInfo PreKInfo) { List <OpenXmlElement> sectionParts = new List <OpenXmlElement>(); sectionParts.Add( TableHelper.StyledTable( TableHelper.StickyTableRow( TableHelper.LabelCell("Little opportunity to interact with other same age:").WithWidth(40), TableHelper.ValueCell(PreKInfo.LittleOpportunityToInteractWithSameAge).WithWidth(5), TableHelper.LabelCell("Low income family in financial need:").WithWidth(40), TableHelper.ValueCell(PreKInfo.LowIncomeFamily).WithWidth(5) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Single parent or frequent parent absence:"), TableHelper.ValueCell(PreKInfo.OnlyOneParentInHome), TableHelper.LabelCell("Lack of family support system:"), TableHelper.ValueCell(PreKInfo.NoFamilySupportSystem) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Primary caregiver less than high school education:"), TableHelper.ValueCell(PreKInfo.PrimaryCaregiverLessThanHighSchoolEducation), TableHelper.LabelCell("Speech difficulties:"), TableHelper.ValueCell(PreKInfo.SpeechDifficulties) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Child in foster care:"), TableHelper.ValueCell(PreKInfo.InFosterCare), TableHelper.LabelCell("Language difficulties:"), TableHelper.ValueCell(PreKInfo.LanguageDifficulties) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Can use bathroom by self:"), TableHelper.ValueCell(PreKInfo.CanUseBathroomAlone), TableHelper.LabelCell("Fine Motor difficulties:"), TableHelper.ValueCell(PreKInfo.FineMotorDifficulties) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Bathroom training in progress:"), TableHelper.ValueCell(PreKInfo.PottyTrainingInProgress), TableHelper.LabelCell("Gross Motor difficulties:"), TableHelper.ValueCell(PreKInfo.GrossMotorDifficulties) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Child lives with teen parent:"), TableHelper.ValueCell(PreKInfo.TeenParent), TableHelper.LabelCell(""), TableHelper.ValueCell("") ), TableHelper.StickyTableRow( TableHelper.LabelCell("Other difficulties:").WithColspan(4) ), TableHelper.StickyTableRow( TableHelper.ValueCell(PreKInfo.OtherDifficulties).WithColspan(4) ) ) ); sectionParts.Add(ParagraphHelper.WhiteSpace()); sectionParts.Add(ParagraphHelper.Paragraph("Child receives supports from the following:", LSSDDocumentStyles.SectionTitle)); sectionParts.Add( TableHelper.StyledTable( TableHelper.StickyTableRow( TableHelper.LabelCell("KidsFirst").WithWidth(40), TableHelper.ValueCell(PreKInfo.AssistanceFromKidsFirst).WithWidth(5), TableHelper.LabelCell("Early Childhood Intervention Program:").WithWidth(40), TableHelper.ValueCell(PreKInfo.AssistanceFromEarlyChildhoodIntervention).WithWidth(5) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Occupational/Physical Therapist:"), TableHelper.ValueCell(PreKInfo.AssistanceFromOccupationOrPhysicalTherapist), TableHelper.LabelCell("Early Childhood Psychologist:"), TableHelper.ValueCell(PreKInfo.AssistanceFromChildhoodPsychologist) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Pre-School/Daycare/Family Day Home:"), TableHelper.ValueCell(PreKInfo.AssistanceFromPreSchoolOrDaycare), TableHelper.LabelCell("Licensed Child Care:"), TableHelper.ValueCell(PreKInfo.AssistanceFromLicensedChildCare) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Autism Consultant or Resource Center:"), TableHelper.ValueCell(PreKInfo.AssistanceFromAutismConsultant), TableHelper.LabelCell("Speech/Language Pathologist:"), TableHelper.ValueCell(PreKInfo.AssistanceFromSpeechLangagePathologist) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Social Services:"), TableHelper.ValueCell(PreKInfo.AssistanceFromSocialServices), TableHelper.LabelCell("Kinsmen Child Development Center:"), TableHelper.ValueCell(PreKInfo.AssistanceFromKinsmenChildDevCenter) ), TableHelper.StickyTableRow( TableHelper.LabelCell("Aboriginal HeadStart:"), TableHelper.ValueCell(PreKInfo.AssistanceFromAboriginalHeadstart), TableHelper.LabelCell("Consent to share information with these agencies:"), TableHelper.ValueCell(PreKInfo.ConsentToShareFromAgencies) ) ) ); sectionParts.Add(ParagraphHelper.PageBreak()); sectionParts.Add( TableHelper.StyledTable( TableHelper.FieldTableRow("Social, emotional, or behavior issues:", PreKInfo.SocialEmotionalOrBehaviourIssues, JustificationValues.Left, 33), TableHelper.FieldTableRow("Traumatic experience within or impacting the family/child:", PreKInfo.TraumaticExperiences, JustificationValues.Left, 33), TableHelper.FieldTableRow("Health care crisis impacting child or family:", PreKInfo.HealthcareCrisis, JustificationValues.Left, 33), TableHelper.FieldTableRow("Referred by agency or agencies:", PreKInfo.ReferredByOtherAgency, JustificationValues.Left, 33), TableHelper.FieldTableRow("Custody concerns:", PreKInfo.CustodyConcerns, JustificationValues.Left, 33), TableHelper.FieldTableRow("Medical concerns:", PreKInfo.MedicalConcerns, JustificationValues.Left, 33), TableHelper.FieldTableRow("Other concerns:", PreKInfo.OtherConcerns, JustificationValues.Left, 33) ) ); sectionParts.Add(ParagraphHelper.WhiteSpace()); return(sectionParts); }