public static int GeneratePDF(Upsilab.Data.Model.CustomerProspect pCustomer, Upsilab.Data.Model.FirmInstitution pFirmInstitution, string pathFileName, bool forceDownload = true) //Guid idCustomer paramétre à mettre en place ??? { float y = 100; int height = 20; int width = 500; int interligne = 20; int paddingLeft = 50; FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(); #region Page 1 pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_001"), y += 100, width, height); string[] rowContents = { string.Format(LanguageContentBL.Translate("PdfRapportMission_002"), DateTime.Now.ToShortDateString()), string.Format("{0} EC-{1}", LanguageContentBL.Translate("PdfFirm_082"),pCustomer.idCustomer) }; pdfGen.AddTableTitle(rowContents, 110, y += 80); #endregion #region Page 2 pdfGen.CreatePage(); y = 0; Dictionary<int, List<string>> data = new Dictionary<int, List<string>>(); for (int j = 0; j < 7; j++) { data.Add(j, new List<string>()); } data[0].Add(LanguageContentBL.Translate("PdfEngagement_002")); data[0].Add(pFirmInstitution.FirmInstitutionName); data[1].Add(LanguageContentBL.Translate("PdfEngagement_003")); data[1].Add(pFirmInstitution.ShareCapital); data[2].Add(LanguageContentBL.Translate("PdfEngagement_004")); data[2].Add(pFirmInstitution.RegisteredInRegister); data[3].Add(LanguageContentBL.Translate("PdfEngagement_005")); data[3].Add(pFirmInstitution.RCS); data[4].Add(LanguageContentBL.Translate("PdfEngagement_006")); data[4].Add(string.Format("{0}\n{1}\n{2}", pFirmInstitution.FirmStreet, pFirmInstitution.FirmPostCode, pFirmInstitution.FirmCity)); data[5].Add(LanguageContentBL.Translate("PdfEngagement_007")); data[5].Add(string.Format("{0} {1}", pFirmInstitution.LeaderFirstName, pFirmInstitution.LeaderName)); data[6].Add(LanguageContentBL.Translate("PdfEngagement_008")); data[6].Add(pFirmInstitution.LeaderFonction); pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_009"), y, width, height, paddingLeft); pdfGen.GeneratePinkTable(data, 0, y += interligne * 2, width, 240, 11, false); pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_010"), y += 260, width, height, paddingLeft); pdfGen.AddReceuil_SubTitle_Right_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_011"), y += interligne * 2, width, height); pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_012"), y += interligne * 2, width, height, paddingLeft); var lstRowHeight = new List<float>(); data = new Dictionary<int, List<string>>(); for (int j = 0; j < 5; j++) { data.Add(j, new List<string>()); } data[0].Add(LanguageContentBL.Translate("PdfEngagement_013")); data[0].Add(pCustomer.User.EntireName); lstRowHeight.Add(30); data[1].Add(LanguageContentBL.Translate("PdfEngagement_014")); data[1].Add(pCustomer.DateOfBirth.HasValue ? pCustomer.DateOfBirth.Value.ToShortDateString() : string.Empty); lstRowHeight.Add(30); data[2].Add(LanguageContentBL.Translate("PdfEngagement_015")); data[2].Add(pCustomer.PlaceOfBirth); lstRowHeight.Add(30); data[3].Add(LanguageContentBL.Translate("PdfEngagement_016")); data[3].Add(pCustomer.Nationality); lstRowHeight.Add(30); data[4].Add(LanguageContentBL.Translate("PdfEngagement_017")); // data[4].Add(pCustomer.Adress); // fix issue 9509 var str = string.Empty; var hg = 30; if (!string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) && !string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}\n{1}\n{2}", pCustomer.Adress, pCustomer.ZipCode, pCustomer.City); hg = 60; } else if(!string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) && string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}\n{1}", pCustomer.Adress, pCustomer.ZipCode); hg = 45; } else if (string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) && ! string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}\n{1}", pCustomer.ZipCode, pCustomer.City); hg = 45; } else if (!string.IsNullOrEmpty(pCustomer.Adress) && string.IsNullOrEmpty(pCustomer.ZipCode) && !string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}\n{1}", pCustomer.Adress, pCustomer.City); hg = 45; } else if (!string.IsNullOrEmpty(pCustomer.Adress) && string.IsNullOrEmpty(pCustomer.ZipCode) && string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}", pCustomer.Adress); hg = 30; } else if (string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) && string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}", pCustomer.ZipCode); hg = 30; } else if (string.IsNullOrEmpty(pCustomer.Adress) && string.IsNullOrEmpty(pCustomer.ZipCode) && !string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}", pCustomer.City); hg = 30; } data[4].Add(str); lstRowHeight.Add(hg); // pdfGen.GeneratePinkTable(data, 0, y += interligne * 2, width, 150, 11, false); pdfGen.GeneratePinkTableWithRowHeight(data, 0, y += interligne * 2, width, 150, 11, false, lstRowHeight); pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_018"), y += 200, width, height, paddingLeft); pdfGen.AddReceuil_SubTitle_Right_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_019"), y += interligne * 2, width, height); pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_020"), y += interligne * 2, width, height, paddingLeft); #endregion #region Page 3 pdfGen.CreatePage(); y = 0; pdfGen.GenerateStyledTitle(LanguageContentBL.Translate("PdfEngagement_021"), y, 100, 300, 40, 16); pdfGen.GenerateSommaireAnalytique(0, y = +interligne * 4, width, 400, 12, new List<string>() {LanguageContentBL.Translate("PdfEngagement_095"),LanguageContentBL.Translate("PdfEngagement_096"),LanguageContentBL.Translate("PdfEngagement_097"),LanguageContentBL.Translate("PdfEngagement_098") ,LanguageContentBL.Translate("PdfEngagement_099"),LanguageContentBL.Translate("PdfEngagement_100"),LanguageContentBL.Translate("PdfEngagement_101"),LanguageContentBL.Translate("PdfEngagement_102") ,LanguageContentBL.Translate("PdfEngagement_103"),LanguageContentBL.Translate("PdfEngagement_104"),LanguageContentBL.Translate("PdfEngagement_105"),LanguageContentBL.Translate("PdfEngagement_106") ,LanguageContentBL.Translate("PdfEngagement_107"),LanguageContentBL.Translate("PdfEngagement_108") ,LanguageContentBL.Translate("PdfEngagement_109"),LanguageContentBL.Translate("PdfEngagement_110") ,LanguageContentBL.Translate("PdfEngagement_111") ,LanguageContentBL.Translate("PdfEngagement_112") }); #endregion #region Page 4 pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_022"), y, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_023"), y += interligne, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_024"), y += interligne * 2, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_025"), y += interligne * 2, width - 50, height * 4, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_026"), y += interligne * 3, width - 50, height * 4, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_027"), y += interligne * 4, width - 50, height * 3, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_028"), y += interligne * 3, width - 50, height * 4, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_029"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_030"), y += interligne * 1.5f, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_031"), y += interligne, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_032"), y += (interligne * 2), width - 50, height * 5, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_033"), y += (interligne * 4), width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_034"), y += (interligne * 2), width - 50, height * 2, paddingLeft); #endregion #region Page 5 pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_035"), y, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_036"), y += interligne * 1.5f, width - 50, height * 5, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_037"), y += interligne * 3, width - 50, height * 3, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_038"), y += interligne * 3, width - 50, height * 4, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_039"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_040"), y += interligne * 1.5f, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_041"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_042"), y += interligne * 2, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_043"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_044"), y += interligne * 2, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_045"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_046"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_047"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_048"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_049"), y += interligne * 1.5f, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_050"), y += interligne, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_051"), y += interligne, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_052"), y += interligne * 1.5f, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_053"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); #endregion #region Page 6 pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_054"), y, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_055"), y += interligne, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_056"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_057"), y += interligne * 2.5f, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_058"), y += interligne, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_059"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_060"), y += interligne * 1.5f, width - 50, height * 4, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_061"), y += interligne * 3.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_062"), y += interligne * 2.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_063"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft + 15); pdfGen.AddPinkNotesRectangle(y += interligne * 1.5f, paddingLeft + 15, width - 65, 45); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pFirmInstitution.claimsName) ? pFirmInstitution.claimsName : "", y += 5, width - 65, 40, paddingLeft + 15); // string customerAdress = string.Format("{0}\n{1}\n{2}", pCustomer.Adress, pCustomer.ZipCode, pCustomer.City); string firmAdress = string.Format("{0}\n{1}\n{2}", pFirmInstitution.FirmStreet, pFirmInstitution.FirmPostCode, pFirmInstitution.FirmCity); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(firmAdress) ? firmAdress : "", y += 5, width - 65, 45, paddingLeft + 20); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_064"), y += (interligne * 2) + 5, width - 50, height * 2, paddingLeft + 15); pdfGen.AddPinkNotesRectangle(y += interligne * 1.5f, paddingLeft + 15, width - 65, 40); // pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pFirmInstitution.claimsMail) ? pFirmInstitution.claimsMail : "", y += 5, width - 65, 40, paddingLeft + 15); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pCustomer.User.UserEmail) ? pCustomer.User.UserEmail : "", y += 5, width - 65, 40, paddingLeft + 15); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pFirmInstitution.E_mail) ? pFirmInstitution.E_mail : "", y += 5, width - 65, 40, paddingLeft + 20); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_065"), y += interligne * 2.5f, width - 50, height * 3, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_066"), y += interligne * 2.5f, width - 50, height * 3, paddingLeft); // #endregion #region Page 7 // pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_067"), y, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_068"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_069"), y += interligne * 2, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_070"), y += interligne * 2, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_071"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_072"), y += interligne * 1.5f, width - 50, height * 3, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_073"), y += interligne * 2.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_074"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_075"), y += interligne * 1.5f, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_076"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_077"), y += interligne * 2.5f, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_078"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_079"), y += interligne * 2f, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_080"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_081"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_082"), y += interligne * 1.5f, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_083"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); #endregion #region Page 8 pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_084"), y += interligne, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_085"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_086"), y += interligne * 2, width, height); data = new Dictionary<int, List<string>>(); data.Add(0, new List<string>()); data[0].Add(LanguageContentBL.Translate("PdfEngagement_087")); // fait à data[0].Add(" "); pdfGen.GeneratePinkTable(data, 0, y += interligne * 2, width, 30, 11, false); data = new Dictionary<int, List<string>>(); data.Add(0, new List<string>()); data[0].Add(LanguageContentBL.Translate("PdfEngagement_088"));//en data[0].Add(" "); data[0].Add(LanguageContentBL.Translate("PdfEngagement_089")); pdfGen.GeneratePinkTable3cols(data, 0, y += interligne * 3, width, 30, 11, false); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_090"), y += interligne * 2.5f, width - 50, height * 2); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_091"), y, width - 50, height * 2, paddingLeft * 5); data = new Dictionary<int, List<string>>(); data.Add(0, new List<string>()); data[0].Add(LanguageContentBL.Translate("PdfEngagement_092")); data[0].Add((pCustomer.ConfidentialityAgreement != null && pCustomer.ConfidentialityAgreement.User != null) ? pCustomer.ConfidentialityAgreement.User.EntireName : pCustomer.User1.EntireName); data.Add(1, new List<string>()); data[1].Add(LanguageContentBL.Translate("PdfEngagement_093")); data[1].Add(" "); data.Add(2, new List<string>()); data[2].Add(LanguageContentBL.Translate("PdfEngagement_094")); data[2].Add(DateTime.Now.ToShortDateString()); pdfGen.GeneratePinkTable2(data, 0, y += interligne * 1.5f, 230, 100, 11, false); data = new Dictionary<int, List<string>>(); data.Add(0, new List<string>()); data[0].Add(LanguageContentBL.Translate("PdfEngagement_092")); data[0].Add(pCustomer.User.EntireName); data.Add(1, new List<string>()); data[1].Add(LanguageContentBL.Translate("PdfEngagement_093")); data[1].Add(""); data.Add(2, new List<string>()); data[2].Add(LanguageContentBL.Translate("PdfEngagement_094")); data[2].Add(DateTime.Now.ToShortDateString()); pdfGen.GeneratePinkTable2(data, paddingLeft * 5, y, 230, 100, 11, false); float x = 18; pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 6, x, 200, 120); if (forceDownload) { //Ces textes sont automatiques pour la signature en ligne // pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), y + 5, 200, 20, x + 5); pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), y + 20, 145, 20, x + 5); pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), y + 35, 145, 20, x + 5); } x = (paddingLeft * 5) + 13; pdfGen.AddRecueil_Notes_Rectangle(y, x, 200, 120); if (forceDownload) { //Ces textes sont automatiques pour la signature en ligne pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), y + 5, 200, 20, x + 5); pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), y + 20, 145, 20, x + 5); pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), y + 35, 145, 20, x + 5); } #endregion if (forceDownload) { pdfGen.GeneratePdfToWeb("EngagementConfidentialiteSignature.pdf"); } else { pdfGen.GeneratePdf(pathFileName); } return pdfGen.PageCount; }
public static void GeneratePM_LAB(IDictionary<LABStudy.SectionEnum, LABStudyModel> dicoLABStudyModel, string pathFileName, bool emptyLAB = false) { int y = 160; int height = 20; int width = 500; FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(); LABStudyModel labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Client]; FirmInstitution firmInstitution = labStudyModel.Customer.FirmInstitution; var languageData = PageLanguageHelper.GetLanguageContent("User", "LAB_PDF_PM_Report"); if (emptyLAB) { labStudyModel = new LABStudyModel(); firmInstitution = new FirmInstitution(); labStudyModel.LABStudy = new LABStudy(); labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect(); } #region Page 1 : Logo & Title //#Page 1 : Title //Logo string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo; pdfGen.AddLogoOnFirstPage(logoPathFileName); //Title pdfGen.AddReceuil_Title_Center_CalibriBold_Label(languageData.GetContent("Report_Title"), y, width, 100); pdfGen.AddReceuil_SubTitle_Center_CalibriBold_Label(languageData.GetContent("Report_Title2"), y += 100, width, height); if (emptyLAB) { string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), ""), string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), "") }; pdfGen.AddTableTitle(rowContents, 110, y += 80); } else { string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), labStudyModel.LABStudy.DateUpdated.HasValue ? labStudyModel.LABStudy.DateUpdated.Value.ToShortDateString() : labStudyModel.LABStudy.DateCreated.ToShortDateString()), string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), labStudyModel.LABStudy.idLABStudy) }; pdfGen.AddTableTitle(rowContents, 110, y += 80); } #endregion #region Page 2 : Client : I. identité du client //#Page 2 : Client : I. identité du client pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page2_Title"), y, width, 20); height = 15; y += 5; pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y + height, 0, Boolean.FalseString); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section1_Line1"), 15, y += height, width, 15); pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y + height, 0, Boolean.TrueString); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section1_Line2"), 15, y += height, width, 15); y += 5; pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page2_Section2_Title"), 0, y += height, width, 20); //Identité y += 5; pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line1"), labStudyModel.GetOptionAttributeValue(718, 516)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line2"), labStudyModel.GetOptionAttributeValue(718, 517)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line3"), labStudyModel.GetOptionAttributeValue(718, 518)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line4"), labStudyModel.GetOptionAttributeValue(718, 519)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line5"), labStudyModel.GetOptionAttributeValue(718, 520)), 0, y += height, width, height); var dateImatr = labStudyModel.GetOptionAttributeValue(718, 521); dateImatr = (!string.IsNullOrEmpty(dateImatr)) ? dateImatr.Substring(0, 10) : dateImatr; pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line6"), dateImatr), 0, y += height, width, height); //Adresse pdfGen.AddLabelArial(string.Format("{0} : ", languageData.GetContent("Page2_Section2_Line22")), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0}", labStudyModel.GetOptionAttributeValue(718, 525)), 10, y += height, width, 3 * height); //ZipCode pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("PDF_LAB_PM_Page2_ZipCode"), labStudyModel.GetOptionAttributeValue(718, 741)), 0, y += 3 * height, width, height); //City pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("PDF_LAB_PM_Page2_Country"), labStudyModel.GetOptionAttributeValue(718, 742)), 0, y += height, width, height); //Tel pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line23"), labStudyModel.GetOptionAttributeValue(718, 526)), 0, y += height, width, height); //Fax pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("PDF_LAB_PM_Fax"), labStudyModel.GetOptionAttributeValue(718, 751)), 0, y += height, width, height); //Mail pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line24"), labStudyModel.GetOptionAttributeValue(718, 527)), 0, y += height, width, height); //Domiciliation pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(736), y += 20, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line16_Item1"), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(737), y, 150, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line16_Item2"), 165, y, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line17"), labStudyModel.GetOptionAttributeValue(738, 524)), 0, y += height, width, height); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line18"), 0, y += height, width, height); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line19"), 0, y += height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(740), y += height, 25, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes_Caps"), 40, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(741), y, 75, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No_Caps"), 90, y, width, height); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line20"), 0, y += 20, width, height); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line21"), 0, y += height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(743), y += height, 25, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes_Caps"), 40, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(744), y, 75, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No_Caps"), 90, y, width, height); //Forme juridique pdfGen.AddLabelArial(String.Format(@"{0} :", languageData.GetContent("Page2_Section2_Line7")), 0, y += 30, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(721), y += height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line8"), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(722), y += height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line9"), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(723), y += height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line10"), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(724), y += height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line11"), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(725), y += height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line12"), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(726), y, 300, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IS"), 315, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(727), y, 340, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IR"), 355, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(728), y += height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line13"), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(729), y, 300, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IS"), 315, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(730), y, 340, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IR"), 355, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(731), y += height, 0, "1"); pdfGen.AddLabelArial(string.Format("{0} {1}", languageData.GetContent("Page2_Section2_Line14"), labStudyModel.GetOptionAttributeValue(731, 522)), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(732), y, 300, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IS"), 315, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(733), y, 340, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IR"), 355, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(734), y += height, 0, "1"); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line15"), labStudyModel.GetOptionAttributeValue(734, 523)), 15, y, width, height); //Societe cotée pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line25"), 0, y += 30, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(748), y += height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes_Caps"), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(749), y, 50, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No_Caps"), 65, y, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line26"), labStudyModel.GetOptionAttributeValue(746, 528)), 0, y += 20, width, height); //pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line27"), labStudyModel.GetOptionAttributeValue(746, 529)), 0, y += height, width, height); //pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line28"), labStudyModel.GetOptionAttributeValue(746, 530)), 0, y += height, width, height); //pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line29"), labStudyModel.GetOptionAttributeValue(746, 531)), 0, y += height, width, height); #endregion #region Page 3 : Secteur d'activités pdfGen.CreatePage(); y = 0; //Secteur d'activités pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line30"), labStudyModel.GetOptionAttributeValue(751, 532)), 0, y += 30, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line31"), labStudyModel.GetOptionAttributeValue(751, 533)), 0, y += 15, width, height); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line32"), 0, y += height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(753), y += height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes_Caps"), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(754), y, 50, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No_Caps"), 65, y, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line33"), labStudyModel.GetOptionAttributeValue(755, 534)), 0, y += 20, width, height * 2); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line34"), 0, y += 2 * height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(757), y += height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes_Caps"), 15, y, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(758), y, 50, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No_Caps"), 65, y, width, height); #endregion #region Page 4 : Client : II. Personne Morale //#Page 3 : Client : II. Personne Morale pdfGen.CreatePage(); y = 0; pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page3_Section1_Title"), 0, y += 2 * height, width, height); string[] tableRiskVigilanceYesNo_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No") }; string[] tableRiskVigilanceYesNoIDK_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No"), languageData.GetContent("TableRiskVigilanceYesNo_Item3") }; LABAnswer labAnswer = labStudyModel.GetAnswerByIdQuestion(9); string[] answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line8"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(10); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line9"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(2); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line1"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(3); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line2"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(4); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line3"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(5); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line4"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(6); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line5"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(7); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line6"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(16); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line7"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); #endregion #region Page 5 : Client : III. Facteurs de risque aggravé //#Page 4 : Client : III. Facteurs de risque aggravé pdfGen.CreatePage(); y = 0; pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page4_Section1_Title"), 0, y += 2 * height, width, height); labAnswer = labStudyModel.GetAnswerByIdQuestion(17); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line1"), 0, y += 2 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(18); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line2"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(19); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line3"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(20); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line4"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(21); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line5"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(24); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line8"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(22); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line6"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(23); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line7"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(51); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line9"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); #endregion #region Page 6 : Client : IV. Risques fiscaux //#Page 5 : Client : IV. Risques fiscaux pdfGen.CreatePage(); y = 0; pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page5_Section1_Title"), 0, y += 2 * height, width, height); labAnswer = labStudyModel.GetAnswerByIdQuestion(25); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line1"), 0, y += 2 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(26); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line2"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(27); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line3"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(28); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line4"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(29); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line5"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(30); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line6"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(32); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line8"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); #endregion #region Page 7 : Produit : V. L'environnement et les caractéristiques du produit //#Page 6 : Produit : V. L'environnement et les caractéristiques du produit pdfGen.CreatePage(); labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Product]; if (emptyLAB) { labStudyModel = new LABStudyModel(); } y = 0; pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page6_Section1_Title"), y, width, 20); pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page6_Section1_Title2"), 0, y += 2 * height, width, height); labAnswer = labStudyModel.GetAnswerByIdQuestion(34); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line1"), 0, y += 2 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(35); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line2"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(36); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line3"), 0, y += 3 * height, width, 3 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(38); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line5"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(39); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line6"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(40); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line7"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(41); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line8"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(42); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line9"), 0, y += 3 * height, width, 3 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text); #endregion #region Page 8 : Produit : V. L'environnement et les caractéristiques du produit //#Page 7 : Produit : V. L'environnement et les caractéristiques du produit pdfGen.CreatePage(); y = 0; labAnswer = labStudyModel.GetAnswerByIdQuestion(43); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line1"), 0, y, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(44); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line2"), 0, y += 3 * height, width, 3 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(45); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line3"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(46); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line4"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); #endregion #region Page 9 : Operation : VI. Risques généraux - Risques fiscaux //#Page 8 : Operation : VI. Risques généraux / fiscaux pdfGen.CreatePage(); labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Operation]; if (emptyLAB) { labStudyModel = new LABStudyModel(); firmInstitution = new FirmInstitution(); labStudyModel.LABStudy = new LABStudy(); labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect(); } y = 0; pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page8_Section1_Title"), y, width, 20); pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page8_Section1_Title2"), 0, y += 2 * height, width, height); labAnswer = labStudyModel.GetAnswerByIdQuestion(49); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line2"), 0, y += 2 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(50); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line3"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); //VII. Risques liés à la distribution des fonds gérés par les sociétés de gestion pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page9_Section1_Title"), 0, y += 5 * height, width, height); labAnswer = labStudyModel.GetAnswerByIdQuestion(57); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line3"), 0, y += 2 * height, width, 3 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(58); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line4"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); #endregion #region Page 10 : NIVEAU DE RISQUE GLOBAL DU CLIENT //#Page 9 : NIVEAU DE RISQUE GLOBAL DU CLIENT pdfGen.CreatePage(); y = 0; //NIVEAU DE RISQUE GLOBAL DU CLIENT pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page9_Section2_Title"), y, width, 20); string dateUpdated = (labStudyModel.LABStudy.DateUpdated.HasValue) ? labStudyModel.LABStudy.DateUpdated.Value.ToString("dd/MM/yyyy") : labStudyModel.LABStudy.DateCreated.ToString("dd/MM/yyyy"); string idGlobalRisk = labStudyModel.LABStudy.idRisk.ToString(); string idGlobalVigilance = labStudyModel.LABStudy.idVigilance.ToString(); pdfGen.AddLabelArial(string.Format("{0} {1}", languageData.GetContent("Page9_Section2_Line1"), dateUpdated), 0, y += 2 * height, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line2"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "2"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line3"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "3"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line4"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "4"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line5"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "5"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line6"), 20, y, width, height); //NIVEAU DE VIGILANCE GLOBAL DU CLIENT y += 60; pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page9_Section3_Title"), y, width, 20); pdfGen.AddLabelArial(string.Format("{0} {1}", languageData.GetContent("Page9_Section3_Line1"), dateUpdated), 0, y += 2 * height, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line2"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "2"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line3"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "3"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line4"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "4"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line5"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "5"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line6"), 20, y, width, height); #endregion //Force download if pathFileName is not set if (string.IsNullOrEmpty(pathFileName)) { pdfGen.GeneratePdfToWeb("LAB_PM.pdf"); } else { pdfGen.GeneratePdf(pathFileName); } }
public static byte[] GenerateVigilanceMeasure(Data.Model.VigilanceMeasure vigilanceMeasure) { //#Page 1 : Title float y = 250; int height = 20; int width = 500; FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(); //Get LAB LABStudy labStudy = LABStudyBL.GetLABStudyByIdLABStudy(vigilanceMeasure.idLABStudy); FirmInstitution firmInstitution = labStudy.CustomerProspect.FirmInstitution; var languageData = PageLanguageHelper.GetLanguageContent("User", "VigilanceMeasurePDF"); #region Page 1 : Logo & Title //Logo string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo; pdfGen.AddLogoOnFirstPage(logoPathFileName, firmInstitution.LogoAlign); //Title pdfGen.AddReceuil_Title_Center_CalibriBold_Label(languageData.GetContent("pdf_mesure_vigilance_title"), y, width, 100); string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("pdf_mesure_vigilance_on"), DateTime.Now.ToShortDateString()) , string.Format("{0} MV_{1}", languageData.GetContent("pdf_mesure_vigilance_ref"), vigilanceMeasure.idVigilanceMeasure) , string.Format("{0} : {1}", languageData.GetContent("pdf_mesure_vigilance_client"), (labStudy.CustomerProspect.IsCorporation.Value) ? labStudy.CustomerProspect.CompanyName : labStudy.CustomerProspect.Name + " " + labStudy.CustomerProspect.FirstName) , string.Format("{0} : {1}", languageData.GetContent("pdf_mesure_vigilance_date_lab"), labStudy.DateUpdated.Value.ToString("dd/MM/yyyy")) , string.Format("{0} LAB_{1}", languageData.GetContent("pdf_mesure_vigilance_ref_lab"), labStudy.idLABStudy) }; pdfGen.AddTableTitle(rowContents, 110, y += 80); #endregion #region Page 2 : Measure content //#Page 2 : Client : I. identité du client pdfGen.CreatePage(); y = 0; pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("pdf_mesure_vigilance_title2"), vigilanceMeasure.Title), 0, y += interline, width, height); pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("pdf_mesure_vigilance_date"), vigilanceMeasure.DateMeasure.ToString("dd/MM/yyyy")), 0, y += interline, width, height); pdfGen.AddDefaultText(string.Format("{0} : ", languageData.GetContent("pdf_mesure_vigilance_content")), 0, y += interline, width, height); pdfGen.AddDefaultText(string.Format("{0}", vigilanceMeasure.Content), 0, y += interline, width, height * 10); #endregion return pdfGen.GeneratePdf(); }
public static void GeneratePP_LAB(IDictionary<LABStudy.SectionEnum, LABStudyModel> dicoLABStudyModel, string pathFileName, bool emptyLAB = false) { //#Page 1 : Title int y = 160; int height = 20; int width = 500; FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(); CustomEnum = Upsilab.Business.Custom.CustomEnumBL.GetAllCustomEnums(); EnumLanguages = GetLanguageEnum(1); LABStudyModel labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Client]; FirmInstitution firmInstitution = labStudyModel.Customer.FirmInstitution; if (emptyLAB) { labStudyModel = new LABStudyModel(); firmInstitution = new FirmInstitution(); labStudyModel.LABStudy = new LABStudy(); labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect(); } var languageData = PageLanguageHelper.GetLanguageContent("User", "LAB_PDF_PP_Report"); #region Page 1 : Logo & Title //Logo string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo; pdfGen.AddLogoOnFirstPage(logoPathFileName); //Title pdfGen.AddReceuil_Title_Center_CalibriBold_Label(languageData.GetContent("Report_Title"), y, width, 100); pdfGen.AddReceuil_SubTitle_Center_CalibriBold_Label(languageData.GetContent("Report_Title2"), y += 100, width, height); if (emptyLAB) { string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), ""), string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), "") }; pdfGen.AddTableTitle(rowContents, 110, y += 80); } else { string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), labStudyModel.LABStudy.DateUpdated.HasValue ? labStudyModel.LABStudy.DateUpdated.Value.ToShortDateString() : labStudyModel.LABStudy.DateCreated.ToShortDateString()), string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), labStudyModel.LABStudy.idLABStudy) }; pdfGen.AddTableTitle(rowContents, 110, y += 80); } #endregion #region Page 2 : Client : I. Identité du client //#Page 2 : Client : I. identité du client pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page2_Title"), y, width, 20); height = 15; y += 35; pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y + height, 0, Boolean.FalseString); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section1_Line1"), 15, y += height, width, 15); pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y + height, 0, Boolean.TrueString); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section1_Line2"), 15, y += height, width, 15); y += height; pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page2_Section2_Title"), 0, y += height, width, 20); // civilité y += 2 * height; float tabCheck = 15; float x = 0; pdfGen.AddLabelArial(languageData.GetContent("LABPP_1227"), 0, y, width, height); x = 40; pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Title, y, x, languageData.GetContent("LABPP_1228")); pdfGen.AddLabelArial(languageData.GetContent("LABPP_1228"), x = x + tabCheck, y, width, 15); pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Title, y, x = x + tabCheck + 40, languageData.GetContent("LABPP_1229")); pdfGen.AddLabelArial(languageData.GetContent("LABPP_1229"), x = x + tabCheck, y, width, 15); pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Title, y, x = x + tabCheck + 40, languageData.GetContent("LABPP_1230")); pdfGen.AddLabelArial(languageData.GetContent("LABPP_1230"), x = x + tabCheck, y, width, 15); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line1"), labStudyModel.GetOptionAttributeValue(701, 501)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line2"), labStudyModel.GetOptionAttributeValue(701, 502)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line3"), labStudyModel.GetOptionAttributeValue(701, 503)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line4"), labStudyModel.GetOptionAttributeValue(701, 504)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line5"), labStudyModel.GetOptionAttributeValue(701, 505)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line6"), labStudyModel.GetOptionAttributeValue(701, 506)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line7"), labStudyModel.GetOptionAttributeValue(701, 507)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line8"), labStudyModel.GetOptionAttributeValue(701, 508)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line9"), labStudyModel.GetOptionAttributeValue(701, 509)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line10"), labStudyModel.GetOptionAttributeValue(701, 510)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line11"), labStudyModel.GetOptionAttributeValue(701, 511)), 0, y += height, width, 3 * height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line12"), labStudyModel.GetOptionAttributeValue(701, 512)), 0, y += 3 * height, width, 3 * height); y += 2 * height; pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line13"), 0, y += height, width, height); //Etes-vous pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(703), y + height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line14_Item1"), 15, y + height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(704), y + height, 200, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line14_Item2"), 215, y += height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(705), y + height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line15_Item1"), 15, y + height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(706), y + height, 200, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line15_Item2"), 215, y += height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(1127), y + height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line16_Item1"), 15, y + height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(1150), y + height, 200, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line16_Item2"), 215, y += height, width, height); //Représentant légal pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_LegalRepresentative"), labStudyModel.GetOptionAttributeValue(702, 740)), 0, y += height, width, height); y += height; pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line17"), labStudyModel.GetOptionAttributeValue(702, 513)), 0, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line18"), labStudyModel.GetOptionAttributeValue(702, 514)), 0, y += height, width, height); y += height; pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(708), y + height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line19_Item1"), 15, y + height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(709), y + height, 100, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line19_Item2"), 115, y += height, width, height); pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line20"), GetEnumValue(labStudyModel.GetOptionAttributeValue(710, 515), 12)), 0, y += height, width, height); y += height; pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line21"), 0, y += height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(712), y + height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes"), 15, y + height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(713), y + height, 50, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No"), 65, y += height, width, height); y += height; pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line22"), 0, y += height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(715), y + height, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes"), 15, y + height, width, height); pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(716), y + height, 50, "1"); pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No"), 65, y += height, width, height); #endregion #region Page 3 : Client : II. Personne physique //#Page 3 : Client : II. Personne physique pdfGen.CreatePage(); y = 0; pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page3_Section1_Title"), 0, y += 2 * height, width, height); //CLIENT MENU LABAnswer labAnswer = labStudyModel.GetAnswerByIdQuestion(11); string[] tableRiskVigilanceYesNo_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No") }; string[] tableRiskVigilanceYesNoIDK_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No"), languageData.GetContent("TableRiskVigilanceYesNo_Item3") }; string[] answer = { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line1"), 0, y += 2 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); //This question is for only client (not prospect) if (labStudyModel.Customer.IsCustomer) { labAnswer = labStudyModel.GetAnswerByIdQuestion(12); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line2"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); } labAnswer = labStudyModel.GetAnswerByIdQuestion(13); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line3"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); //labAnswer = labStudyModel.GetAnswerByIdQuestion(14); //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; //pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line4"), 0, y += 3 * height, width, height); //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); //labAnswer = labStudyModel.GetAnswerByIdQuestion(15); //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; //pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line5"), 0, y += 3 * height, width, height); //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(67); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line5_1"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(68); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line5_2"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); //labAnswer = labStudyModel.GetAnswerByIdQuestion(16); //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; //pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line6"), 0, y += 3 * height, width, height); //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); #endregion #region Page 4 : Client : III. Facteurs de risque aggravé //#Page 4 : Client : III. Facteurs de risque aggravé pdfGen.CreatePage(); y = 0; pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page4_Section1_Title"), 0, y += 2 * height, width, height); labAnswer = labStudyModel.GetAnswerByIdQuestion(17); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line1"), 0, y += 2 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(18); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line2"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(19); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line3"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(20); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line4"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(21); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line5"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(24); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line6"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(22); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line7"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(23); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line8"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(51); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line6"), 0, y += 3 * height, width, height); //Question from operation pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); #endregion #region Page 5 : Client : IV. Risques fiscaux //#Page 5 : Client : IV. Risques fiscaux pdfGen.CreatePage(); y = 0; pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page5_Section1_Title"), 0, y += 2 * height, width, height); labAnswer = labStudyModel.GetAnswerByIdQuestion(25); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line1"), 0, y += 2 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text); //The following three questions are for PM /*labAnswer = labStudyModel.GetAnswerByIdQuestion(26); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial("La société cliente a-t-elle connu des changements statutaires fréquents non justifiés par la situation économique de l’entreprise ?", 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30); labAnswer = labStudyModel.GetAnswerByIdQuestion(27); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial("La société cliente en sommeil ou peu active a-t-elle connu des changements statutaires récents ?", 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20); labAnswer = labStudyModel.GetAnswerByIdQuestion(28); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial("La société cliente a-t-elle recours à l’interposition de personnes physiques n’intervenant qu’en apparence pour le compte de clients de la PSI ou du CIF ?", 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30);*/ labAnswer = labStudyModel.GetAnswerByIdQuestion(29); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line2"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(30); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line3"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(31); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line4"), 0, y += 3 * height, width, 3 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(32); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line5"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); #endregion #region Page 6 : Produit : V. L'environnement et les caractéristiques du produit //#Page 6 : Produit : V. L'environnement et les caractéristiques du produit pdfGen.CreatePage(); labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Product]; if (emptyLAB) { labStudyModel = new LABStudyModel(); } y = 0; pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page6_Section1_Title"), y, width, 20); pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page6_Section1_Title2"), 0, y += 2 * height, width, height); labAnswer = labStudyModel.GetAnswerByIdQuestion(34); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line1"), 0, y += 2 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(35); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line2"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(36); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line3"), 0, y += 3 * height, width, 3 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text); //labAnswer = labStudyModel.GetAnswerByIdQuestion(37); //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; //pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line4"), 0, y += 3 * height, width, height); //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(38); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line5"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(39); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line6"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(40); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line7"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(41); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line8"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(42); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line9"), 0, y += 3 * height, width, 3 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text); #endregion #region Page 7 : Produit : V. L'environnement et les caractéristiques du produit //#Page 7 : Produit : V. L'environnement et les caractéristiques du produit pdfGen.CreatePage(); y = 0; labAnswer = labStudyModel.GetAnswerByIdQuestion(43); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line1"), 0, y, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(44); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line2"), 0, y += 3 * height, width, 3 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(45); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line3"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(46); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line4"), 0, y += 3 * height, width, 3 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text); #endregion #region Page 8 : Operation : VI. Risques généraux / fiscaux //#Page 8 : Operation : VI. Risques généraux pdfGen.CreatePage(); labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Operation]; if (emptyLAB) { labStudyModel = new LABStudyModel(); firmInstitution = new FirmInstitution(); labStudyModel.LABStudy = new LABStudy(); labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect(); } y = 0; pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page8_Section1_Title"), y, width, 20); pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page8_Section1_Title2"), 0, y += 2 * height, width, height); //labAnswer = labStudyModel.GetAnswerByIdQuestion(48); //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; //pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line1"), 0, y += 2 * height, width, 2 * height); //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(49); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line2"), 0, y += 3 * height, width, height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); labAnswer = labStudyModel.GetAnswerByIdQuestion(50); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line3"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); //labAnswer = labStudyModel.GetAnswerByIdQuestion(52); //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; //pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line4"), 0, y += 3 * height, width, 2 * height); //pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line5"), 0, y += 2 * height, width, 10 * height); //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 8 * height, tableRiskVigilanceYesNo_Text); //VII. Risques liés à la distribution des fonds gérés par les sociétés de gestion //pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page8_Section2_Title"), 0, y += 4 * height, width, height); //labAnswer = labStudyModel.GetAnswerByIdQuestion(53); //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; //pdfGen.AddLabelArial(languageData.GetContent("Page8_Section2_Line1"), 0, y += 2 * height, width, height); //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); //labAnswer = labStudyModel.GetAnswerByIdQuestion(54); //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; //pdfGen.AddLabelArial(languageData.GetContent("Page8_Section2_Line2"), 0, y += 3 * height, width, height); //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text); //VIII. Risques fiscaux pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page9_Section1_Title"), 0, y += 4 * height, width, height); //labAnswer = labStudyModel.GetAnswerByIdQuestion(55); //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; //pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line1"), 0, y += 2 * height, width, height); //pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text); //labAnswer = labStudyModel.GetAnswerByIdQuestion(56); //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; //pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line2"), 0, y += 3 * height, width, 2 * height); //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text); //This question is only for client (not prospect) if (labStudyModel.Customer.IsCustomer) { labAnswer = labStudyModel.GetAnswerByIdQuestion(57); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line3"), 0, y += 3 * height, width, 3 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text); } labAnswer = labStudyModel.GetAnswerByIdQuestion(58); answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel }; pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line4"), 0, y += 3 * height, width, 2 * height); pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNoIDK_Text); #endregion #region Page 9 : NIVEAU DE RISQUE GLOBAL DU CLIENT //#Page 9 : NIVEAU DE RISQUE GLOBAL DU CLIENT pdfGen.CreatePage(); y = 0; //NIVEAU DE RISQUE GLOBAL DU CLIENT pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page9_Section2_Title"), y, width, 20); string dateUpdated = (labStudyModel.LABStudy.DateUpdated.HasValue) ? labStudyModel.LABStudy.DateUpdated.Value.ToString("dd/MM/yyyy") : labStudyModel.LABStudy.DateCreated.ToString("dd/MM/yyyy"); string idGlobalRisk = labStudyModel.LABStudy.idRisk.ToString(); string idGlobalVigilance = labStudyModel.LABStudy.idVigilance.ToString(); pdfGen.AddLabelArial(string.Format("{0} {1}", languageData.GetContent("Page9_Section2_Line1"), dateUpdated), 0, y += 2 * height, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line2"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "2"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line3"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "3"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line4"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "4"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line5"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "5"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line6"), 20, y, width, height); //NIVEAU DE VIGILANCE GLOBAL DU CLIENT y += 60; pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page9_Section3_Title"), y, width, 20); pdfGen.AddLabelArial(string.Format("{0} {1}", languageData.GetContent("Page9_Section3_Line1"), dateUpdated), 0, y += 2 * height, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "1"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line2"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "2"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line3"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "3"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line4"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "4"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line5"), 20, y, width, height); y += 20; pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "5"); pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line6"), 20, y, width, height); #endregion //Force download if pathFileName is not set if (string.IsNullOrEmpty(pathFileName)) { pdfGen.GeneratePdfToWeb("LAB_PP.pdf"); } else { pdfGen.GeneratePdf(pathFileName); } }