public static void SetYearRecord(this AcroFields fields, CardOrder order, YearRecord yearRecord) { if (yearRecord.Gender.HasValue) { fields.SetField("Check Box1", yearRecord.Gender == Genders.Male ? "Yes" : "0"); fields.SetField("Check Box2", yearRecord.Gender == Genders.Female ? "Yes" : "0"); } //fields.SetFieldProperty("Text" + (initIndex + 3), "textsize", 8f, null); fields.SetField("Name", yearRecord.Name + (!string.IsNullOrEmpty(yearRecord.Number) ? $"(#{yearRecord.Number})" : string.Empty)); //fields.SetFieldProperty("Text" + (initIndex + 4), "textsize", 8f, null); //fields.SetField("Text" + (initIndex + 4), yearRecord.HomeAddress); //fields.SetFieldProperty("Text" + (initIndex + 5), "textsize", 8f, null); //fields.SetField("Text" + (initIndex + 5), yearRecord.HomeTelephone); //fields.SetFieldProperty("Text" + (initIndex + 6), "textsize", 8f, null); //fields.SetField("Text" + (initIndex + 6), yearRecord.MobileTelephone); //fields.SetFieldProperty("Text" + (initIndex + 7), "textsize", 8f, null); fields.SetField("Date of birth", yearRecord.DateOfBirth?.ToString("yyyy -MM-dd")); //fields.SetFieldProperty("Text" + (initIndex + 8), "textsize", 8f, null); fields.SetField("Date immersed", yearRecord.ImmersedDate?.ToString("yyyy -MM-dd")); fields.SetField("Check Box3", !yearRecord.Anointed ? "Yes" : "0"); fields.SetField("Check Box4", yearRecord.Anointed ? "Yes" : "0"); fields.SetField("Check Box5", yearRecord.E ? "Yes" : "0"); fields.SetField("Check Box6", yearRecord.MS ? "Yes" : "0"); fields.SetField("Check Box7", yearRecord.RP ? "Yes" : "0"); //fields.SetFieldProperty("Text" + (initIndex + 12) + ".01", "textsize", 8f, null); fields.SetField(order == CardOrder.First ? "Service Year" : "Service Year_2", yearRecord.Year.ToString()); foreach (var report in yearRecord.Reports.OrderBy(r => r.Month)) { fields.SetMonthReport(order, report); } fields.SetTotalReport(formNumber, yearRecord.Totals); }