private static void GeneratePPProfilEtObjectif(FoxitPDFGenerator pdfGen, Data.Model.Report report) { var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP"); pdfGen.CreatePage(); float y = 0; //PROFIL ET OBJECTIFS D’INVESTISSEMENTS pdfGen.AddTitle(languageDataPP.GetContent("PdfReportPP_226"), y, max_width, 20); //Questionnaire autre UPSIDE0 float yCheckbox = y + interline + 10; ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1196, report), yCheckbox); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_756"), yCheckbox, 500, 2 * height, 20); y += yCheckbox; pdfGen.AddDefaultText(string.Format("{0} {1}", languageDataPP.GetContent("PdfReportPP_1196"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 752))), y += interline, 500, 2 * height); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_752"), y += paddingAfterParagraph + 5, max_width, 2 * height); //Questionnaire UPSIDEO // y += 20; yCheckbox = y += paddingAfterParagraph; ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1197, report), yCheckbox); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_757"), yCheckbox, 500, 20, 20); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_1197"), y += interline); #region I- Niveau de connaissance //I- Niveau de connaissance pdfGen.AddOrangeTitle(languageDataPP.GetContent("PdfReportPP_227"), y += interline + 10, max_width, height, ChapiterPaddingLeft); Dictionary<int, string[]> rowData = new Dictionary<int, string[]>(); pdfGen.AddRecueil_Table_PROFILETOBJECTIFSDINVESTISSEMENTS_Columns(50, y + paddingAfterParagraph, 450, new List<string>() { languageDataPP.GetContent("PdfReportPP_417"), languageDataPP.GetContent("PdfReportPP_418"), languageDataPP.GetContent("PdfReportPP_Yes"), languageDataPP.GetContent("PdfReportPP_No"), languageDataPP.GetContent("PdfReportPP_419"), languageDataPP.GetContent("PdfReportPP_420"), languageDataPP.GetContent("PdfReportPP_421"), languageDataPP.GetContent("PdfReportPP_422"), languageDataPP.GetContent("PdfReportPP_423"), languageDataPP.GetContent("PdfReportPP_424"), languageDataPP.GetContent("PdfReportPP_425"), languageDataPP.GetContent("PdfReportPP_426"), languageDataPP.GetContent("PdfReportPP_427"), languageDataPP.GetContent("PdfReportPP_428") }); List<List<String>> list = new List<List<string>>(); list.Add(new List<string>() { languageDataPP.GetContent("PdfReportPP_228"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(244, report),"3", "TransactionVolume").ToString() }); list.Add(new List<string>() { languageDataPP.GetContent("PdfReportPP_229"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(245, report),"3", "TransactionVolume").ToString() }); list.Add(new List<string>() { languageDataPP.GetContent("PdfReportPP_230"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(246, report),"3", "TransactionVolume").ToString() }); list.Add(new List<string>() { languageDataPP.GetContent("PdfReportPP_231"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(247, report),"3", "TransactionVolume").ToString() }); list.Add(new List<string>() { languageDataPP.GetContent("PdfReportPP_232"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(248, report),"3", "TransactionVolume").ToString() }); list.Add(new List<string>() { languageDataPP.GetContent("PdfReportPP_233"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(249, report),"3", "TransactionVolume").ToString() }); if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString()) { list.Add(new List<string>() { languageDataPP.GetContent("ClientPP_Profile_Produits_structures"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(775, report),"3", "TransactionVolume").ToString() }); list.Add(new List<string>() { languageDataPP.GetContent("ClientPP_Profile_Produits_derives"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(776, report),"3", "TransactionVolume").ToString() }); } pdfGen.AddRecueil_Table_PROFILETOBJECTIFSDINVESTISSEMENTS_Body(0, y + paddingAfterParagraph + 120 /*195*/, 500, languageDataPP.GetContent("PdfReportPP_237"), list); list = new List<List<string>>(); list.Add(new List<string>() { languageDataPP.GetContent("PdfReportPP_234"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(250, report),"3", "TransactionVolume").ToString() }); list.Add(new List<string>() { languageDataPP.GetContent("PdfReportPP_235"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(251, report),"3", "TransactionVolume").ToString() }); list.Add(new List<string>() { languageDataPP.GetContent("PdfReportPP_236"), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report), "1", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report), "2", "HasKnowledge").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report), "1", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report), "2", "HasTransaction").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report),"1", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report),"2", "TransactionFrequency").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report),"1", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report),"2", "TransactionPeriod").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report),"1", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report),"2", "TransactionVolume").ToString(), ReportBL.GetBooleanValue(GetReportOptionAttributeByIdOptionAttribute(252, report),"3", "TransactionVolume").ToString() }); var tbgt = pdfGen.AddRecueil_Table_PROFILETOBJECTIFSDINVESTISSEMENTS_Body(0, y + paddingAfterParagraph + 270 /*368*/, 500, languageDataPP.GetContent("PdfReportPP_238"), list); list = null; //Quels sont les marchés sur lesquels le mandant est intervenu ? //pdfGen.CreatePage(); //y = 0; y = 510; float ytmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y,40); if (y > 0) y = ytmp; //y += (paddingAfterParagraph + 422); pdfGen.AddBlueBorder(y, 0, 500, 40); pdfGen.AddCenterText(languageDataPP.GetContent("PdfReportPP_239"), y += 5); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(372, report), y += interline, 60); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_240"), y, 500, 20, 80); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(373, report), y, 135); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_241"), y, 500, 20, 155); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(374, report), y, 250); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_242"), y, 500, 20, 270); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(375, report), y, 340); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_243"), y, 500, 20, 360); //Note y += 40; //pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 50); //if (y > 0) y = ytmp; /*pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y); pdfGen.AddBlueBorder(y += interline); pdfGen.AddDefaultText(ReportBL.GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(272, report)), y += interline, 500, 65, 55);*/ float oHeightNivConn = 0; string noteNivConnValue = GetReportOptionAttributeValueByIdOptionAttribute(272, report); pdfGen.DynamicBlueBorderZoneSize(noteNivConnValue, y, out oHeightNivConn); y = y + interline; ytmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, oHeightNivConn); if (y > 0) y = ytmp; pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y += interline, 500, 20); y += interline; pdfGen.AddDynamicBlueBorderWithText(noteNivConnValue, ref y, 0, max_width, 50); //TODO_TONNY #endregion #region II. Expérience en matière de services d'investissements //II. Expérience en matière de services d'investissements bool showFooter = false; pdfGen.CreatePage(showFooter); float yTmp = 0; float oHeight = 0; y = 0; pdfGen.AddOrangeTitle(@languageDataPP.GetContent("PdfReportPP_373"), y, max_width, height); pdfGen.AddBlueBorder(20, 0, 500, 20); pdfGen.AddDefaultText(@languageDataPP.GetContent("PdfReportPP_374"), 23); //Bottom Section : Oui pdfGen.AddRecueil_Table_PROFILETOBJECTIFSDINVESTISSEMENTS_2_BottomSection(0, 278, 500, new List<string>() { GetBooleanString(GetReportOptionValueByIdOption(342, report)), languageDataPP.GetContent("PdfReportPP_Yes"), languageDataPP.GetContent("PdfReportPP_375"), GetBooleanString(GetReportOptionValueByIdOption(762, report)), languageDataPP.GetContent("PdfReportPP_376"), GetBooleanString(GetReportOptionValueByIdOption(763, report)), languageDataPP.GetContent("PdfReportPP_377"), GetBooleanString(GetReportOptionValueByIdOption(764, report)), languageDataPP.GetContent("PdfReportPP_378"), GetBooleanString(GetReportOptionValueByIdOption(765, report)), languageDataPP.GetContent("PdfReportPP_379"), languageDataPP.GetContent("PdfReportPP_380") + ReportBL.GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(535, report)), languageDataPP.GetContent("PdfReportPP_381"), GetBooleanString(GetReportOptionValueByIdOption(998, report)), languageDataPP.GetContent("PdfReportPP_388"), GetBooleanString(GetReportOptionValueByIdOption(999, report)), languageDataPP.GetContent("PdfReportPP_383"), GetBooleanString(GetReportOptionValueByIdOption(1000, report)), languageDataPP.GetContent("PdfReportPP_389"), string.Format(languageDataPP.GetContent("PdfReportPP_385"),GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(537, report))), languageDataPP.GetContent("PdfReportPP_386"), GetBooleanString(GetReportOptionValueByIdOption(768, report)), languageDataPP.GetContent("PdfReportPP_382"), GetBooleanString(GetReportOptionValueByIdOption(769, report)), languageDataPP.GetContent("PdfReportPP_383"), GetBooleanString(GetReportOptionValueByIdOption(770, report)), languageDataPP.GetContent("PdfReportPP_384"), languageDataPP.GetContent("PdfReportPP_387"), GetBooleanString(GetReportOptionValueByIdOption(772, report)), languageDataPP.GetContent("PdfReportPP_382"), GetBooleanString(GetReportOptionValueByIdOption(773, report)), languageDataPP.GetContent("PdfReportPP_383"), GetBooleanString(GetReportOptionValueByIdOption(774, report)), languageDataPP.GetContent("PdfReportPP_384_1"), languageDataPP.GetContent("PdfReportPP_390"), GetBooleanString(GetReportOptionValueByIdOption(777, report)), languageDataPP.GetContent("PdfReportPP_391"), GetBooleanString(GetReportOptionValueByIdOption(778, report)), languageDataPP.GetContent("PdfReportPP_392"), GetBooleanString(GetReportOptionValueByIdOption(779, report)), languageDataPP.GetContent("PdfReportPP_393"), GetBooleanString(GetReportOptionValueByIdOption(780, report)), languageDataPP.GetContent("PdfReportPP_394"), languageDataPP.GetContent("PdfReportPP_395"), GetBooleanString(GetReportOptionValueByIdOption(789, report)), languageDataPP.GetContent("PdfReportPP_396"), GetBooleanString(GetReportOptionValueByIdOption(790, report)), languageDataPP.GetContent("PdfReportPP_397"), GetBooleanString(GetReportOptionValueByIdOption(791, report)), languageDataPP.GetContent("PdfReportPP_398"), GetBooleanString(GetReportOptionValueByIdOption(792, report)), languageDataPP.GetContent("PdfReportPP_399"), languageDataPP.GetContent("PdfReportPP_1202"), GetBooleanString(GetReportOptionValueByIdOption(1203, report)), languageDataPP.GetContent("PdfReportPP_1203"), GetBooleanString(GetReportOptionValueByIdOption(1204, report)), languageDataPP.GetContent("PdfReportPP_1204"), GetBooleanString(GetReportOptionValueByIdOption(1205, report)), languageDataPP.GetContent("PdfReportPP_1205"), }); //Top Section : Non pdfGen.AddRecueil_Table_PROFILETOBJECTIFSDINVESTISSEMENTS_2_TopSection(0, 40, 600, new List<string>() { GetBooleanString(GetReportOptionValueByIdOption(343, report)), languageDataPP.GetContent("PdfReportPP_No"), languageDataPP.GetContent("PdfReportPP_401"), GetBooleanString(GetReportOptionValueByIdOption(795, report)), languageDataPP.GetContent("PdfReportPP_Yes"), languageDataPP.GetContent("PdfReportPP_402"), GetBooleanString(GetReportOptionValueByIdOption(799, report)), languageDataPP.GetContent("PdfReportPP_391"), GetBooleanString(GetReportOptionValueByIdOption(800, report)), languageDataPP.GetContent("PdfReportPP_392"), GetBooleanString(GetReportOptionValueByIdOption(801, report)), languageDataPP.GetContent("PdfReportPP_393"), GetBooleanString(GetReportOptionValueByIdOption(802, report)), languageDataPP.GetContent("PdfReportPP_394"), languageDataPP.GetContent("PdfReportPP_403"), GetBooleanString(GetReportOptionValueByIdOption(804, report)), languageDataPP.GetContent("PdfReportPP_396"), GetBooleanString(GetReportOptionValueByIdOption(805, report)), languageDataPP.GetContent("PdfReportPP_397"), GetBooleanString(GetReportOptionValueByIdOption(806, report)), languageDataPP.GetContent("PdfReportPP_398"), GetBooleanString(GetReportOptionValueByIdOption(807, report)), languageDataPP.GetContent("PdfReportPP_399"), GetBooleanString(GetReportOptionValueByIdOption(796, report)), languageDataPP.GetContent("PdfReportPP_No"), string.Format(languageDataPP.GetContent("PdfReportPP_404"), GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(538, report))), languageDataPP.GetContent("PdfReportPP_1198"), GetBooleanString(GetReportOptionValueByIdOption(1199, report)), languageDataPP.GetContent("PdfReportPP_1199"), GetBooleanString(GetReportOptionValueByIdOption(1200, report)), languageDataPP.GetContent("PdfReportPP_1200"), GetBooleanString(GetReportOptionValueByIdOption(1201, report)), languageDataPP.GetContent("PdfReportPP_1201") }); y = 0; pdfGen.CreatePage(); /*pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(languageDataPP.GetContent("PdfReportPP_Notes"), 0); pdfGen.AddRecueil_Notes_Rectangle(15); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(ReportBL.GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(0, report)), 20, 500, 65, 55);*/ pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_405"), y += 0, max_width, height * 2, 0, 8); pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_406"), y += paddingAfterParagraph * 1.5f, max_width, height * 3, 0, 8); pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_407"), y += paddingAfterParagraph * 2, max_width, height * 3, 0, 8); pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_408"), y += paddingAfterParagraph * 2, max_width, height * 4, 0, 8); pdfGen.AddImage(FileManager.AssemblyDirectory + string.Format("\\PDF\\{0}.gif", languageDataPP.GetContent("Pdf_Nom_image")), 65, y += 50, 350, 200); pdfGen.AddDefaultText(String.Format(languageDataPP.GetContent("PdfReportPP_409"), ReportBL.GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(253, report))), y += 225, max_width, height); pdfGen.AddDefaultText(String.Format(languageDataPP.GetContent("PdfReportPP_410"), ReportBL.GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(254, report))), y += paddingAfterParagraph, max_width, height); /*pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y += interline * 2, 500, 20); pdfGen.AddBlueBorder(y += interline, 0, max_width); pdfGen.AddDefaultText(ReportBL.GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(273, report)), y += textInterline, 480, 65, 10);*/ string noteExpValue = GetReportOptionAttributeValueByIdOptionAttribute(273, report); pdfGen.DynamicBlueBorderZoneSize(noteExpValue, y, out oHeight); y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, oHeight); if (y > 0) y = yTmp; pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y += interline, 500, 20); y += interline; pdfGen.AddDynamicBlueBorderWithText(noteExpValue, ref y, 0, max_width, 50); //TODO_TONNY #endregion }
private static void GeneratePPChargesDiverses(FoxitPDFGenerator pdfGen, Data.Model.Report report, ref float y, bool pIsEmptyReport) { const string key = "charge"; var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP"); var languageDataCredit = PageLanguageHelper.GetLanguageContent("User", "ClientPP_Credit"); float x = 0; Func<float, float, int, int, string, bool> BlockQuestion = (yp, x1, yes, no, t) => { var reportAnyyes = GetReportOptionValueByIdOption(yes, report); pdfGen.AddDefaultText(languageDataCredit.GetContent(t), yp, 200, height, x1 += padding_left); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), yp, max_width, height, x1 += 250); ReportBL.PlotBooleanValue(pdfGen, reportAnyyes, yp, x1 = x1 + tabCheck + 5); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), yp, max_width, height, x1 = x1 + tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(no, report), yp, x1 = x1 + tabCheck + 5); return reportAnyyes != null; }; Func<float, float, int, string, string> BlockMontant = (yp, xt, idx, t) => { /*pdfGen.AddDefaultText(languageDataCredit.GetContent(t).Replace("€", "€"), yp, 200, height, x1 += padding_left); string liquidity = GetReportOptionAttributeValueByIdOptionAttribute(idx, report); liquidity = !string.IsNullOrEmpty(liquidity) ? liquidity : "0"; pdfGen.AddAnswer(liquidity, yp, 75, 20, x1 += 250); return string.Empty;*/ string montant = GetReportOptionAttributeValueByIdOptionAttribute(idx, report); if (!pIsEmptyReport) { if (!string.IsNullOrEmpty(montant) && !montant.Equals("0")) { pdfGen.AddDefaultText(languageDataCredit.GetContent(t).Replace("€", "€"), yp, max_width, height, xt += padding_left); pdfGen.AddAnswer(montant, yp, 75, 20, xt += 270); } } else { pdfGen.AddDefaultText(languageDataCredit.GetContent(t).Replace("€", "€"), yp, max_width, height, xt += padding_left); pdfGen.AddAnswer(string.Empty, yp, 75, 20, xt += 270); } return string.Empty; }; var yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 60); if (y > 0) y = yTmp; //CHARGES DIVERSES pdfGen.AddTitle(languageDataPP.GetContent("PdfReportPP_132"), y, max_width, 20); // chargges estimés //string chargeV = GetReportOptionAttributeValueByIdOptionAttribute(730, report); //pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_charges"), string.Empty), y += paddingAfterParagraph, max_width, 20, 30); //x = 250; //pdfGen.AddAnswer(chargeV, y, 75, 20, x); //x = 0; //ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(365, report), y += paddingAfterParagraph, x); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_Equals0"), y, max_width, height, x += tabCheck); //ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(366, report), y, x += 30); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_Inf100"), y, max_width, height, x += tabCheck); //ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(367, report), y, x += 50); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_Entre100Et250"), y, max_width, height, x += tabCheck); //ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(368, report), y, x += 80); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_Entre100Et250"), y, max_width, height, x += tabCheck); //ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(369, report), y, x += 80); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_Sup500"), y, max_width, height, x += tabCheck); #region "I-Impôts et taxes" x = 0; //I. Impôts et taxes (impôt sur ...) pdfGen.AddSubtitle(languageDataPP.GetContent("PdfReportPP_133"), y += (1f*interline), max_width, height,ChapiterPaddingLeft); var hasClientImposable = GetReportOptionValueByIdOption(1311, report) != null; var hasDetailClientImposable = GetReportOptionValueByIdOption(1313, report) != null; if (!pIsEmptyReport) { if (hasClientImposable) { if (!hasDetailClientImposable) { y += interline; BlockQuestion(y, x, 1311, 1312, "ClientPP_Credit_025"); x = 0; //Impôts et taxes (en K€) y += interline; BlockMontant(y, x, 730, "ClientPP_Credit_026"); } else { y += paddingAfterParagraph; BuilImpotsEtTaxesTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); } } else { //Impôts et taxes (en K€) y += interline; BlockMontant(y, x, 730, "ClientPP_Credit_026"); } } else { // EMPTY REPORT IMPOTS ET TAXES y += interline; BlockQuestion(y, x, 1311, 1312, "ClientPP_Credit_025"); x = 0; //Impôts et taxes (en K€): y += interline; BlockMontant(y, x, 730, "ClientPP_Credit_026"); y += paddingAfterParagraph; BuilImpotsEtTaxesTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); } /*if ((hasClientImposable && hasDetailClientImposable) || pIsEmptyReport) { y += paddingAfterParagraph; BuilImpotsEtTaxesTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); }*/ #endregion #region "II-Autres engagements financiers" y += interline+10; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 50); if (y > 0) y = yTmp; pdfGen.AddSubtitleWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_134"), ref y, max_width, height, ChapiterPaddingLeft); //II. Autres engagements financiers var hasEngamentFinancier = GetReportOptionValueByIdOption(1315, report) != null; var hasDetailEngamentFinancier = GetReportOptionValueByIdOption(1317, report) != null; if (!pIsEmptyReport) { if (hasEngamentFinancier) { if (!hasDetailEngamentFinancier) { y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; BlockQuestion(y, x, 1315, 1316, "ClientPP_Credit_028"); x = 0; //Patrimoine financier (en €): y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; BlockMontant(y, x, 905, "ClientPP_Credit_029"); } else { #region "a) Engagements en cours" y += interline + 5; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, (2 * height) + 2 * 25); if (y > 0) y = yTmp; // y += interline; pdfGen.AddTextBoldSubtitle(languageDataPP.GetContent("PdfReportPP_135"), y, max_width, height, padding_left); y += paddingAfterParagraph; GenerateEngagementsEncoursTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); #endregion #region "b) Projets d’investissement" y += interline + 5; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height + (2 * 25)); if (y > 0) y = yTmp; pdfGen.AddTextBoldSubtitle(languageDataPP.GetContent("PdfReportPP_136"), y, max_width, height, padding_left); y += paddingAfterParagraph; GenerateProjetInvestissementTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); #endregion } } else { x = 0; //Patrimoine financier (en €): y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; BlockMontant(y, x, 905, "ClientPP_Credit_029"); } } else { // EMPTY REPORT ENGAGEMENT FINANCIER y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; BlockQuestion(y, x, 1315, 1316, "ClientPP_Credit_028"); x = 0; //Patrimoine financier (en €): y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; BlockMontant(y, x, 905, "ClientPP_Credit_029"); #region "a) Engagements en cours" y += interline + 5; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, (2 * height) + 2 * 25); if (y > 0) y = yTmp; // y += interline; pdfGen.AddTextBoldSubtitle(languageDataPP.GetContent("PdfReportPP_135"), y, max_width, height, padding_left); y += paddingAfterParagraph; GenerateEngagementsEncoursTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); #endregion #region "b) Projets d’investissement" y += interline + 5; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height + (2 * 25)); if (y > 0) y = yTmp; pdfGen.AddTextBoldSubtitle(languageDataPP.GetContent("PdfReportPP_136"), y, max_width, height, padding_left); y += paddingAfterParagraph; GenerateProjetInvestissementTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); #endregion } /*if ((hasEngamentFinancier && hasDetailEngamentFinancier) || pIsEmptyReport) { #region "a) Engagements en cours" y += interline + 5; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, (2*height) + 2*25); if (y > 0) y = yTmp; // y += interline; pdfGen.AddTextBoldSubtitle(languageDataPP.GetContent("PdfReportPP_135"), y, max_width, height, padding_left); y += paddingAfterParagraph; GenerateEngagementsEncoursTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); #endregion #region "b) Projets d’investissement" y += interline + 5; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height + (2*25)); if (y > 0) y = yTmp; pdfGen.AddTextBoldSubtitle(languageDataPP.GetContent("PdfReportPP_136"), y, max_width, height, padding_left); y += paddingAfterParagraph; GenerateProjetInvestissementTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); #endregion }*/ #endregion //pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(languageDataPP.GetContent("PdfReportPP_Notes"), y += 100, max_width, height); //pdfGen.AddRecueil_Notes_Rectangle(y += interline, 0, max_width, 35); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(ReportBL.GetStringValue(GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(271, report)), y + 5, 480, 65, 10); y += interline; yTmp = y + interline; string noteValue = ReportBL.GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(271, report)); float oHeight = 0; pdfGen.DynamicBlueBorderZoneSize(noteValue,y,out oHeight); pdfGen.CalculeZoneWithAutomaticNewPage(ref y, oHeight+height); if (y > 0) y = yTmp; pdfGen.AddLabelNoteWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_Notes"), ref y); y += interline; pdfGen.AddDynamicBlueBorderWithText(noteValue,ref y,0, 500, 50); }
private static void GeneratePPOrientationPatrimoniales(FoxitPDFGenerator pdfGen, Data.Model.Report report,ref float y,bool pIsEmptyReport) { var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP"); if(y > 0) y += interline + 10; #region Hierarchisation des priorités var yTmp1 = y; var hGth1 = 3f*paddingAfterParagraph + height + 2*20; pdfGen.CalculeZoneWithAutomaticNewPage(ref y,hGth1); pdfGen.AddTitle(languageDataPP.GetContent("PdfReportPP_149"), y, max_width, height);//V0S ORIENTATIONS PATRIMONIALES pdfGen.AddDefaultBoldText(languageDataPP.GetContent("PdfReportPP_150"), y += (1f * paddingAfterParagraph), max_width, 20);//Hiérarchisation des priorités pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_151"), y += interline, max_width, 20); y += interline; var listIdOptionAttributes = BuildOrientationTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); //Note y += 10; pdfGen.AddLabelNoteWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_Notes"), ref y, 500, 20); y += interline; pdfGen.AddDynamicBlueBorderWithText(GetReportOptionAttributeValueByIdOptionAttribute(229, report),ref y, 0, max_width,50); #endregion float x = 0; float oHeight = 0; float yTmp = 0; var indexation = new List<string> { "a)", "b)", "c)", "d)", "e)", "f)", "g)" }; var usedIndexation = new List<string>(); Func<string> NextIndexation = () => { string nxt = string.Empty; foreach (string idx in indexation) { if (!usedIndexation.Any(q => q == idx)) { usedIndexation.Add(idx); nxt = idx; break; } } return nxt; }; Func<string, int, int, string, int, int, float, bool, string> GenerateDoubleColonneOrientationPatrimoine = (colonneALbl, idAYes, idANo, colonneBLbl, idBYes, idBNo, y1, isWithSecondCol) => { x = 0; const float maxColWidth = 240; float lnpxAA = 150, lnpxBB = 162; float wdthAA = lnpxAA * 31 / 50; float wdthAAnswer = maxColWidth - (10 + wdthAA); float wdthBB = lnpxBB * 31 / 50; pdfGen.AddDefaultText(colonneALbl, y1, 180, height, x); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y1, max_width, height, x += 180); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(idAYes, report), y1, x = x + 15); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y1, max_width, height, x = x + tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(idANo, report), y1, x = x + 15); if (isWithSecondCol) { x = 250; pdfGen.AddDefaultText(colonneBLbl, y1, label_width, height, x); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y1, max_width, height, x += 180); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(idBYes, report), y1, x = x + 15); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y1, max_width, height, x = x + tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(idBNo, report), y1, x = x + 15); } return string.Empty; }; #region a) Aquerir un bien immobilier if (listIdOptionAttributes.Any(ioa => ioa == 237) || pIsEmptyReport) { yTmp = y + interline; pdfGen.CalculeZoneWithAutomaticNewPage(ref y,3*height); if (y > 0) y = yTmp; pdfGen.AddOrangeTitleWithAutomaticNewPage(string.Format("{0} {1}",NextIndexation(),LanguageContentBL.Translate("PdfReportPP_152").Replace("a)",string.Empty)), ref y, 500, 20, 15);//a) Acquérir un bien immobilier y += interline+5; var montantAInvestir = GetReportOptionAttributeValueByIdOptionAttribute(547, report); pdfGen.AddDefaultTextWithAutomaticNewPage(String.Format(LanguageContentBL.Translate("PdfReportPP_153").Replace("€",string.Empty), string.Empty), ref y, max_width, height); pdfGen.AddAnswer(pIsEmptyReport?string.Empty: montantAInvestir, y, 100, 20, 250); pdfGen.AddDefaultTextWithAutomaticNewPage("€", ref y, 100, height,345); y += interline; pdfGen.AddDefaultTextWithAutomaticNewPage(String.Format(LanguageContentBL.Translate("PdfReportPP_154")), ref y, max_width, height); y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 6 * height); if (y > 0) { y = yTmp; } #region "zone 1 " yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; #region "Row 1" string lblColA = languageDataPP.GetContent("PdfReportPP_155"); string lblColB = languageDataPP.GetContent("PdfReportPP_156"); GenerateDoubleColonneOrientationPatrimoine(lblColA,813,814, lblColB,816,817,y,true); #endregion #region "Row 2" y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; lblColA = languageDataPP.GetContent("PdfReportPP_157"); lblColB = languageDataPP.GetContent("PdfReportPP_158"); GenerateDoubleColonneOrientationPatrimoine(lblColA, 819, 820, lblColB, 822, 823, y,true); #endregion #region "Row 3" y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; lblColA = languageDataPP.GetContent("PdfReportPP_159"); lblColB = languageDataPP.GetContent("PdfReportPP_160"); GenerateDoubleColonneOrientationPatrimoine(lblColA, 825, 826, lblColB, 828, 829, y,true); #endregion #endregion y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 6 * height); #region "Zone 2" if (y > 0) { y = yTmp; // y += interline + 15; } pdfGen.AddDefaultTextWithAutomaticNewPage(string.Format(languageDataPP.GetContent("PdfReportPP_161"), GetReportOptionAttributeValueByIdOptionAttribute(548, report)), ref y, max_width, height); pdfGen.AddDefaultText(String.Format(languageDataPP.GetContent("PdfReportPP_162")), y += interline, max_width, height);//L’immobilier pour vous est synonyme de : #region "Row 1" y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; lblColA = languageDataPP.GetContent("PdfReportPP_163"); lblColB = languageDataPP.GetContent("PdfReportPP_164"); GenerateDoubleColonneOrientationPatrimoine(lblColA, 832, 833, lblColB, 835, 836, y,true); #endregion #region "Row 2" y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; lblColA = languageDataPP.GetContent("PdfReportPP_165"); lblColB = languageDataPP.GetContent("PdfReportPP_166"); GenerateDoubleColonneOrientationPatrimoine(lblColA, 838, 839, lblColB, 841, 842, y,true); #endregion #region "Row 3" y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; lblColA = languageDataPP.GetContent("PdfReportPP_167"); lblColB = languageDataPP.GetContent("PdfReportPP_168"); GenerateDoubleColonneOrientationPatrimoine(lblColA, 844, 845, lblColB, 847, 848, y,true); #endregion #region "Row 4" y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; lblColA = languageDataPP.GetContent("PdfReportPP_169"); lblColB = string.Empty; GenerateDoubleColonneOrientationPatrimoine(lblColA, 850, 851, lblColB, 0, 0, y, false); #endregion #endregion string noteValue = GetReportOptionAttributeValueByIdOptionAttribute(549, report); pdfGen.DynamicBlueBorderZoneSize(noteValue, y, out oHeight); y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, oHeight); if(y > 0) y = yTmp; pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y += interline, 500, 20); y += interline; pdfGen.AddDynamicBlueBorderWithText(noteValue,ref y, 0, max_width ,50); //TODO_TONNY } #endregion #region b) Constituer une épargne, accroître la rentabilité if (listIdOptionAttributes.Any(ioa => ioa == 235 || ioa == 236) || pIsEmptyReport) { y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2 * height); if (y > 0) y = yTmp; pdfGen.AddOrangeTitleWithAutomaticNewPage(string.Format("{0} {1}", NextIndexation(), languageDataPP.GetContent("PdfReportPP_170").Replace("b)", string.Empty)), ref y, 500, 20, 15);//b) Constituer une épargne, accroître la rentabilité x = 0; y += interline + 5; pdfGen.AddDefaultTextWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_171"), ref y, max_width, height); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += 100); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(855, report), y, x = x + tabCheck + 5); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x = x + tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(856, report), y, x = x + tabCheck + 5); pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_172"), GetReportOptionAttributeValueByIdOptionAttribute(550, report)), y += interline, max_width, height); yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 6 * height); if (y > 0) { y = yTmp; } x = 0; pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_173"), y += interline, max_width, height); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += 325); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(858, report), y, x = x + tabCheck + 5); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x = x + tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(859, report), y, x = x + tabCheck + 5); string value722 = GetReportOptionAttributeValueByIdOptionAttribute(722, report); value722 = string.Format("{0}", !string.IsNullOrEmpty(value722) ? value722 : string.Empty); pdfGen.AddAnswer(value722, y, 50, height, x += tabCheck + 5); pdfGen.AddDefaultText("€", y, 75, height, x += 50); x = 0; pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_174"), y += interline, max_width, height); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += 325); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(861, report), y, x = x + tabCheck + 5); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x = x + tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(862, report), y, x = x + tabCheck + 5); string value723 = GetReportOptionAttributeValueByIdOptionAttribute(723, report); value723 = string.Format("{0}", !string.IsNullOrEmpty(value723) ? value723 : string.Empty); pdfGen.AddAnswer(value723, y, 50, height, x += tabCheck + 5); pdfGen.AddDefaultText("€", y, 75, height, x += 50); x = 0; pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_175"), y += interline, max_width, height); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += 325); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(864, report), y, x = x + tabCheck + 5); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x = x + tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(865, report), y, x = x + tabCheck + 5); string value724 = GetReportOptionAttributeValueByIdOptionAttribute(724, report); value724 = string.Format("{0}", !string.IsNullOrEmpty(value724) ? value724 : string.Empty); pdfGen.AddAnswer(value724, y, 50, height, x += tabCheck + 5); pdfGen.AddDefaultText("€", y, 75, height, x += 50); y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; var lblColA = languageDataPP.GetContent("PdfReportPP_176"); var lblColB = languageDataPP.GetContent("PdfReportPP_177"); GenerateDoubleColonneOrientationPatrimoine(lblColA, 867, 868, lblColB, 0, 0, y, false); y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; lblColA = languageDataPP.GetContent("PdfReportPP_177"); lblColB = string.Empty; GenerateDoubleColonneOrientationPatrimoine(lblColA, 870, 871, lblColB, 0, 0, y, false); y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; lblColA = languageDataPP.GetContent("PdfReportPP_178"); lblColB = string.Empty; GenerateDoubleColonneOrientationPatrimoine(lblColA, 873, 874, lblColB, 0, 0, y, false); string noteValue = GetReportOptionAttributeValueByIdOptionAttribute(551, report); pdfGen.DynamicBlueBorderZoneSize(noteValue, y, out oHeight); yTmp = y + interline; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, oHeight); if(y > 0) y = yTmp; pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y, 500, 20); y += interline; pdfGen.AddDynamicBlueBorderWithText(noteValue ,ref y, 0, max_width,50); } #endregion #region c) Protection de la Famille Func<string, int, int, string, int, float, string> GenerateDoubleColonneOrientationPatrimoineWithAnswer = (colonneALbl, idAYes, idANo, colonneBLbl, idAnswer, y1) => { x = 0; const float maxColWidth = 240; float lnpxAA = 150, lnpxBB = 162; float wdthAA = lnpxAA * 31 / 50; float wdthAAnswer = maxColWidth - (10 + wdthAA); float wdthBB = lnpxBB * 31 / 50; pdfGen.AddDefaultText(colonneALbl, y1, label_width, height, x); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y1, max_width, height, x += 180); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(idAYes, report), y1, x = x + 15); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y1, max_width, height, x = x + tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(idANo, report), y1, x = x + 15); x = 250; pdfGen.AddDefaultText(string.Format(colonneBLbl,string.Empty), y1, label_width, height, x); pdfGen.AddAnswer(GetReportOptionAttributeValueByIdOptionAttribute(idAnswer, report), y1, 75, height, x += 160); return string.Empty; }; if (listIdOptionAttributes.Any(ioa => ioa == 230) || pIsEmptyReport) { yTmp = y + interline; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2 * height); if (y > 0) y = yTmp; pdfGen.AddOrangeTitle(string.Format("{0} {1}", NextIndexation(), languageDataPP.GetContent("PdfReportPP_179").Replace("c)", string.Empty)), y, 500, 20, 15);//c) Protection de la Famille pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_180"), y += interline + 5, max_width, height); y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; var lblColA = languageDataPP.GetContent("PdfReportPP_181"); var lblColB = languageDataPP.GetContent("PdfReportPP_184"); GenerateDoubleColonneOrientationPatrimoineWithAnswer(lblColA, 879, 880, lblColB, 552, y); y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; lblColA = languageDataPP.GetContent("PdfReportPP_182"); lblColB = languageDataPP.GetContent("PdfReportPP_184"); GenerateDoubleColonneOrientationPatrimoineWithAnswer(lblColA, 883, 884, lblColB, 553, y); y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height); if (y > 0) y = yTmp; lblColA = languageDataPP.GetContent("PdfReportPP_183"); lblColB = languageDataPP.GetContent("PdfReportPP_184"); GenerateDoubleColonneOrientationPatrimoineWithAnswer(lblColA, 887, 888, lblColB, 554, y); string noteValue = GetReportOptionAttributeValueByIdOptionAttribute(555, report); pdfGen.DynamicBlueBorderZoneSize(noteValue, y, out oHeight); yTmp = y + interline; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, oHeight); if(y > 0) y = yTmp; pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y += paddingAfterParagraph, 500, 20); y += interline; pdfGen.AddDynamicBlueBorderWithText(noteValue, ref y, 0, max_width,50); } #endregion #region d) Préparer le budget étude des enfants if (listIdOptionAttributes.Any(ioa => ioa == 234) || pIsEmptyReport) { yTmp = y + interline; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 4 * height); if (y > 0) y = yTmp; pdfGen.AddOrangeTitle(string.Format("{0} {1}", NextIndexation(), LanguageContentBL.Translate("PdfReportPP_185").Replace("d)", string.Empty)), y, 500, 20, 15);//d) Préparer le budget étude des enfants pdfGen.AddDefaultText(String.Format(LanguageContentBL.Translate("PdfReportPP_186").Replace("€",string.Empty),string.Empty), y += interline); x = 250; var value556 = GetReportOptionAttributeValueByIdOptionAttribute(556, report); pdfGen.AddAnswer(value556, y, 75, 20, x); pdfGen.AddDefaultText("€", y, 75, 20, x += 75); x = 250; pdfGen.AddDefaultText(String.Format(LanguageContentBL.Translate("PdfReportPP_187"), string.Empty), y += interline); pdfGen.AddAnswer(GetReportOptionAttributeValueByIdOptionAttribute(557, report),y,75,20,x); pdfGen.AddDefaultText(String.Format(LanguageContentBL.Translate("PdfReportPP_188")), y += interline); yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 4 * height); if (y > 0) { y = yTmp; y += interline + 5; } x = 0; ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(895, report), y , x); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_189"), y, max_width, height * 2, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(896, report), y, x += 110); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_190"), y, max_width, height * 2, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(897, report), y, x += 90); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_191"), y, max_width, height * 2, x += tabYesNo); x = 0; ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(898, report), y += interline, x); pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_192"), string.Empty), y, label_width, height, x += tabYesNo); float lnpxA2 = pdfGen.GetWidthOfString(string.Format(languageDataPP.GetContent("PdfReportPP_192"), string.Empty)); float wdthA2 = lnpxA2 * 31 / 50; float wdthA2nswer = 500 - (10 + wdthA2); float additiveA2 = lnpxA2 >= 150 ? (lnpxA2 / 10) : 10; pdfGen.AddAnswer(GetReportOptionAttributeValueByIdOptionAttribute(558, report), y, wdthA2nswer, 20, x += wdthA2 + additiveA2); string noteValue = GetReportOptionAttributeValueByIdOptionAttribute(559, report); pdfGen.DynamicBlueBorderZoneSize(noteValue, y, out oHeight); yTmp = y + interline; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, oHeight+20); if(y > 0) y = yTmp; pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y , 500, 20); y += interline; pdfGen.AddDynamicBlueBorderWithText(noteValue,ref y , 0, max_width,50); } #endregion #region e) Réduire vos impôts if (listIdOptionAttributes.Any(ioa => ioa == 233) || pIsEmptyReport) { y = y + interline + 5; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2 * height); if (y > 0) y = yTmp; pdfGen.AddOrangeTitle(string.Format("{0} {1}", NextIndexation(), languageDataPP.GetContent("PdfReportPP_193").Replace("e)", string.Empty)), y, 500, 20, 15);//e) Réduire vos impôts yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, (20 + 4 * height)); if (y > 0) { y = yTmp; } pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_194"), y += interline, 500, 20, 15); x = 0; ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(902, report), y += interline, x); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_195"), y, max_width, height * 2, x += tabYesNo); x = 0; ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(903, report), y += interline, x); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_196"), y, max_width, height * 2, x += tabYesNo); pdfGen.CalculeZoneWithAutomaticNewPage(ref y, (20 + 2 * height)); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_197"), y += interline + 5, 500, 20, 15); x = 0; ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(905, report), y += interline, x); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_198"), y, max_width, height * 2, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(906, report), y, x += 80); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_199"), y, max_width, height * 2, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(907, report), y, x += 80); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_190"), y, max_width, height * 2, x += tabYesNo);//l’Immobilier ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(908, report), y, x += 80); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_200"), y, max_width, height * 2, x += tabYesNo); yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, (20 + 2 * height)); if (y > 0) y = yTmp; pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_201"), y += interline + 5, 500, 20, 15); x = 0; ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(910, report), y += interline, x); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_202"), y, max_width, height, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(911, report), y, x += 185); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_203"), y, max_width, height, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(912, report), y, x += 80); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_204"), y, max_width, height, x += tabYesNo); pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfReportPP_205"), y += interline, max_width, height); pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfReportPP_206"), report.IsEmptyReport ? " " : GetReportOptionAttributeValueByIdOptionAttribute(560, report), report.IsEmptyReport ? " " : GetReportOptionAttributeValueByIdOptionAttribute(561, report)), y, max_width, height, 160); string noteValue = GetReportOptionAttributeValueByIdOptionAttribute(562, report); pdfGen.DynamicBlueBorderZoneSize(noteValue, y, out oHeight); yTmp = y + interline; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, oHeight); if(y > 0) y = yTmp; pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y, 500, 20); y += interline; pdfGen.AddDynamicBlueBorderWithText(noteValue,ref y,0,max_width,50); } #endregion #region f) Retraite if (listIdOptionAttributes.Any(ioa => ioa == 232) || pIsEmptyReport) { y = y + interline + 10; yTmp = y; string hostCode = Upsilab.Business.Utility.SessionManager.GetHostCodeSession(); float hGth = 3 * height + 10; hGth += 2*height; hGth += 4 * height + 40 + 4 * interline; hGth += 2 * height + 40 + 20; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, hGth); pdfGen.AddOrangeTitle(string.Format("{0} {1}", NextIndexation(), languageDataPP.GetContent("PdfReportPP_207").Replace("f)", string.Empty)), y, 500, 20, 15); //f) Retraite : y += 15; #region "create table retraite" #endregion var yLast = y; //var currentPageNumber = pdfGen.GetCurrentPageNumber; yTmp = y; AddRetraitePPTable(pdfGen, ref y); y = yTmp; #region "First row" //float hGth = 3 * height + 10; //pdfGen.CalculeZoneWithAutomaticNewPage(ref y, hGth); //Disposez-vous d’un bilan de retraite ? string BilanVousOuiNon = ""; string BilanVousDate = ""; string BilanConjointOuiNon = ""; string BilanConjointDate = ""; var Vous = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 564).FirstOrDefault(); if (Vous != null) { BilanVousOuiNon = Convert.ToString(Vous.CustomObjectValue.HasAssessmentPlan); BilanVousDate = Convert.ToString(Vous.CustomObjectValue.AssessmentPlanDate); } var Conjoint = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 565).FirstOrDefault(); if (Conjoint != null) { BilanConjointOuiNon = Convert.ToString(Conjoint.CustomObjectValue.HasAssessmentPlan); BilanConjointDate = Convert.ToString(Conjoint.CustomObjectValue.AssessmentPlanDate); } x = 0; y = yLast; ReportBL.PlotBooleanValue(pdfGen, BilanVousOuiNon, y = y + interline, x += 190, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += tabCheck); pdfGen.AddDefaultText(string.Format("Date : {0} ", BilanVousDate), y, max_width, height, x += 20); ReportBL.PlotBooleanValue(pdfGen, BilanConjointOuiNon, y, x += 125, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += tabCheck); pdfGen.AddDefaultText(string.Format("Date : {0} ", BilanConjointDate), y, max_width, height, x += 20); x = 0; ReportBL.PlotBooleanValue(pdfGen, BilanVousOuiNon, y = y + interline, x += 190, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x += tabCheck); ReportBL.PlotBooleanValue(pdfGen, BilanConjointOuiNon, y, x += 145, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x += tabCheck); #endregion #region "Second row" //isnewpage = false; //yLast = y; //hGth = 4 * height + 40 + 4 * interline; //pdfGen.CalculeZoneWithAutomaticNewPage(ref y, hGth); // Avez-vous mis en place des solutions de retraite complémentaire ? string SolutionVousOuiNon = ""; string SolutionVousDemarche = ""; string SolutionConjointOuiNon = ""; string SolutionConjointDemarche = ""; string ReversionVousOuiNon = ""; string ReversionConjointOuiNon = ""; Vous = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 566).FirstOrDefault(); if (Vous != null) { SolutionVousOuiNon = Convert.ToString(Vous.CustomObjectValue.HasPensionPlan); SolutionVousDemarche = Convert.ToString(Vous.CustomObjectValue.Reason); ReversionVousOuiNon = Convert.ToString(Vous.CustomObjectValue.HasOptForRevision); } Conjoint = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 567).FirstOrDefault(); if (Conjoint != null) { SolutionConjointOuiNon = Convert.ToString(Conjoint.CustomObjectValue.HasPensionPlan); SolutionConjointDemarche = Convert.ToString(Conjoint.CustomObjectValue.Reason); ReversionConjointOuiNon = Convert.ToString(Conjoint.CustomObjectValue.HasOptForRevision); } x = 0; y -= 25; ReportBL.PlotBooleanValue(pdfGen, SolutionVousOuiNon, y = y + 43, x += 190, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += tabCheck); ReportBL.PlotBooleanValue(pdfGen, SolutionVousOuiNon, y, x += tabYesNo, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x += tabCheck); ReportBL.PlotBooleanValue(pdfGen, SolutionConjointOuiNon, y, x += 110, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += tabCheck); ReportBL.PlotBooleanValue(pdfGen, SolutionConjointOuiNon, y, x += tabYesNo, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x += tabCheck); x = 0; pdfGen.AddDefaultText( string.Format(languageDataPP.GetContent("PdfReportPP_210"), SolutionVousDemarche), y = y + interline, max_width, height * 2, x += 190); pdfGen.AddDefaultText( string.Format(languageDataPP.GetContent("PdfReportPP_210"), SolutionConjointDemarche), y, max_width, height * 2, x += 155); x = 0; pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_211"), y += interline, max_width, height * 2, x += 185); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_211"), y, max_width, height, x += 160); x = 0; ReportBL.PlotBooleanValue(pdfGen, ReversionVousOuiNon, y = y + interline, x += 190, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += tabCheck); ReportBL.PlotBooleanValue(pdfGen, ReversionVousOuiNon, y, x += tabYesNo, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x += tabCheck); ReportBL.PlotBooleanValue(pdfGen, ReversionConjointOuiNon, y, x += 110, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += tabCheck); ReportBL.PlotBooleanValue(pdfGen, ReversionConjointOuiNon, y, x += tabYesNo, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x += tabCheck); #endregion //Assurance individuelle ? if (!string.IsNullOrEmpty(hostCode) && hostCode == "BE") { //hGth = 2*height + 40 + 20; //pdfGen.CalculeZoneWithAutomaticNewPage(ref y, hGth); string AssIndivVousOuiNon = ""; string AssIndivVousDate = ""; string AssIndivConjointOuiNon = ""; string AssIndivConjointDate = ""; var AssVous = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 770).FirstOrDefault(); if (AssVous != null) { AssIndivVousOuiNon = Convert.ToString(AssVous.CustomObjectValue.HasInsuranceIndividualLife); AssIndivVousDate = Convert.ToString(AssVous.CustomObjectValue.InsuranceIndividualLifeDate); } var AssConjoint = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 771).FirstOrDefault(); if (AssConjoint != null) { AssIndivConjointOuiNon = Convert.ToString(AssConjoint.CustomObjectValue.HasInsuranceIndividualLife); AssIndivConjointDate = Convert.ToString(AssConjoint.CustomObjectValue.InsuranceIndividualLifeDate); } x = 0; ReportBL.PlotBooleanValue(pdfGen, AssIndivVousOuiNon, y = y + 40, x += 190, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += tabCheck); pdfGen.AddDefaultText(string.Format("Date : {0} ", AssIndivVousDate), y, max_width, height, x += 20); ReportBL.PlotBooleanValue(pdfGen, AssIndivConjointOuiNon, y, x += 120, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += tabCheck); pdfGen.AddDefaultText(string.Format("Date : {0} ", AssIndivConjointDate), y, max_width, height, x += 20); x = 0; ReportBL.PlotBooleanValue(pdfGen, AssIndivVousOuiNon, y = y + 20, x += 190, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x += tabCheck); ReportBL.PlotBooleanValue(pdfGen, AssIndivConjointOuiNon, y, x += 140, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x += tabCheck); } //---------------> changer ce y //y = yLast; // pdfGen.CurrentPage = currentPageNumber-1; //AddRetraitePPTable(pdfGen, ref y, 0); y += 30; //pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(languageDataPP.GetContent("PdfReportPP_Notes"), y, 500, 20); //pdfGen.AddRecueil_Notes_Rectangle(y += interline, 0, max_width); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(GetReportOptionAttributeValueByIdOptionAttribute(563, report), y += 5, 480, 65, 5); var montantFrequence = ""; var freq = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 569).FirstOrDefault(); if (freq != null) { montantFrequence = GetEnumValue(Convert.ToString(freq.CustomObjectValue.Frequency), 3); } else // mensuel par défaut { montantFrequence = report.IsEmptyReport ? string.Empty : LanguageContentBL.Translate("Frequency2_Enum_001"); } pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_212"), report.IsEmptyReport ? " " : GetReportOptionAttributeValueByIdOptionAttribute(568, report) , montantFrequence) , y, max_width, height); var revenuFrequence = ""; freq = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 572).FirstOrDefault(); if (freq != null) { revenuFrequence = GetEnumValue(Convert.ToString(freq.CustomObjectValue.Frequency), 15); } else // mensuel par défaut { revenuFrequence = report.IsEmptyReport ? string.Empty : LanguageContentBL.Translate("Frequency2_Enum_001"); } pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_213"), report.IsEmptyReport ? " " : GetReportOptionAttributeValueByIdOptionAttribute(570, report) , report.IsEmptyReport ? " " : GetReportOptionAttributeValueByIdOptionAttribute(571, report) , revenuFrequence) , y += interline, max_width, height); var revenuFuturFrequence = ""; freq = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 574).FirstOrDefault(); if (freq != null) { revenuFuturFrequence = GetEnumValue(Convert.ToString(freq.CustomObjectValue.Frequency), 3); } else // mensuel par défaut { revenuFuturFrequence = report.IsEmptyReport ? string.Empty : LanguageContentBL.Translate("Frequency2_Enum_001"); } pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_214"), report.IsEmptyReport ? " " : GetReportOptionAttributeValueByIdOptionAttribute(573, report) , revenuFuturFrequence) , y += interline, max_width, height); x = 0; pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_215"), y += interline, max_width, height); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(926, report), y, x += 235); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += tabCheck); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(927, report), y, x += tabYesNo); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x += tabCheck); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_216"), y += interline, max_width, height); x = 0; ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(929, report), y, x += 235); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y, max_width, height, x += tabCheck); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(930, report), y, x += tabYesNo); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y, max_width, height, x += tabCheck); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_217"), y += interline, max_width, height); x = 0; ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(932, report), y += interline, x); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_189"), y, max_width, height * 2, x += tabYesNo); //dES SUPPORTS ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(933, report), y, x += 120); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_190"), y, max_width, height * 2, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(934, report), y, x += 100); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_191"), y, max_width, height * 2, x += tabYesNo); //Contrat epargne //pdfGen.CreatePage(); //y = 0; y += interline + 10; pdfGen.AddDefaultTextWithAutomaticNewPage(string.Format(languageDataPP.GetContent("PdfReportPP_218")), ref y, max_width, height); y += interline + 5; GenerateContratsEpargneTable1(pdfGen, report, ref y, pIsEmptyReport); // NOT FOUND IN UI //pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(languageDataPP.GetContent("PdfReportPP_Notes"), y += 160, 500, 20); //pdfGen.AddRecueil_Notes_Rectangle(y += interline, 0, max_width); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(GetReportOptionAttributeValueByIdOptionAttribute(0, report), y += 5, 480, 65, 10); y += interline; //float yPlus = 135; //if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == // Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString()) // yPlus = 115; //y += yPlus; GenerateContratsEpargneTable2(pdfGen, report, ref y); y += interline + 10; string noteValue = GetReportOptionAttributeValueByIdOptionAttribute(563, report); pdfGen.DynamicBlueBorderZoneSize(noteValue, y, out oHeight); y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, oHeight); if(y > 0) y = yTmp; pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y, 500, 20); y += interline; pdfGen.AddDynamicBlueBorderWithText(noteValue, ref y, 0, max_width,50); //bool beakExist = noteValue.Contains(((char)13)); } #endregion #region "g) Prévoyance" if (listIdOptionAttributes.Any(ioa => ioa == 241) || pIsEmptyReport) { //y = 0; //pdfGen.CreatePage(); y = y + interline; yTmp = y; float hGht = (10f* height); pdfGen.CalculeZoneWithAutomaticNewPage(ref y, hGht); if (y > 0) y = yTmp; pdfGen.AddOrangeTitleWithAutomaticNewPage(string.Format("{0} {1}", NextIndexation(), languageDataPP.GetContent("PdfReportPP_219").Replace("g)", string.Empty)), ref y, 500, 20, 15);//g) Prévoyance (rentes conjoints, indemnités journalières, capital-décès, etc) string VousComplementaireSante = ""; string VousComplementaireSanteNiveau = ""; string VousPrevoyance = ""; string VousForfait = ""; string VousPendant = ""; string VousSalaireBrut = ""; string VousFranchises = ""; string VousCotiAnnuel1 = ""; string VousCotiAnnuel2 = ""; string VousCompany1 = ""; string VousCompany2 = ""; string VousDateEcheance1 = ""; string VousDateEcheance2 = ""; var Vous = report.ReportOptionAttributeValue.FirstOrDefault(roav => roav.idOptionAttribute == 588); if (Vous != null) { VousComplementaireSante = Convert.ToString(Vous.CustomObjectValue.ComplementaryHealthContractType); VousComplementaireSanteNiveau = Convert.ToString(Vous.CustomObjectValue.ComplementaryHealthGuaranteeType); VousPrevoyance = Convert.ToString(Vous.CustomObjectValue.InsuranceContractType); VousForfait = report.IsEmptyReport ? " " : Convert.ToString(Vous.CustomObjectValue.InsurancePlan); VousPendant = report.IsEmptyReport ? " " : Convert.ToString(Vous.CustomObjectValue.InsuranceDuration); VousSalaireBrut = Convert.ToString(Vous.CustomObjectValue.InsuranceGrossPercentage); VousFranchises = Convert.ToString(Vous.CustomObjectValue.InsuranceFranchise); VousCotiAnnuel1 = Convert.ToString(Vous.CustomObjectValue.ComplementaryHealthCurrentContribution); ; VousCotiAnnuel2 = Convert.ToString(Vous.CustomObjectValue.InsuranceCurrentContribution); VousCompany1 = Convert.ToString(Vous.CustomObjectValue.ComplementaryHealthCompany); VousCompany2 = Convert.ToString(Vous.CustomObjectValue.InsuranceCompany); VousDateEcheance1 = Convert.ToString(Vous.CustomObjectValue.ComplementaryHealthMaturityDate); VousDateEcheance2 = Convert.ToString(Vous.CustomObjectValue.InsuranceMaturityDate); } AddPrevoyanceTable1(pdfGen, y += interline + 5); x = 230; ReportBL.PlotBooleanValue(pdfGen, VousComplementaireSante, y += interline, x, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_220"), y, max_width, height, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, VousComplementaireSanteNiveau, y, x += 120, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_221"), y, max_width, height, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, VousComplementaireSanteNiveau, y, x += 50, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_222"), y, max_width, height, x += tabYesNo); x = 230; ReportBL.PlotBooleanValue(pdfGen, VousComplementaireSante, y += interline, x, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_223"), y, max_width, height, x + tabYesNo); ReportBL.PlotBooleanValue(pdfGen, VousComplementaireSanteNiveau, y, x += 140, "3"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_224"), y, max_width, height, x += tabYesNo); x = 230; ReportBL.PlotBooleanValue(pdfGen, VousPrevoyance, y += 30, x, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_220"), y, max_width, height, x += tabYesNo); pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_225"), VousForfait), y - 15, max_width, height, x += 110); pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_483"), VousPendant), y - 15 + interline, max_width, height, x); pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_484"), VousSalaireBrut), y - 15 + (interline * 2), max_width, height, x); pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_485"), VousFranchises), y - 15 + (interline * 3), max_width, height, x); x = 230; ReportBL.PlotBooleanValue(pdfGen, VousPrevoyance, y += interline, x, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_223"), y, max_width, height, x + tabYesNo); x = 230; pdfGen.AddDefaultText(string.Format("{0}", VousCotiAnnuel1) , y += 35, max_width, height, x); pdfGen.AddDefaultText(string.Format("{0}", VousCotiAnnuel2) , y, max_width, height, x += 140); x = 230; pdfGen.AddDefaultText(string.Format("{0}", VousCompany1) , y += 20, max_width, height, x); pdfGen.AddDefaultText(string.Format("{0}", VousCompany2) , y, max_width, height, x += 140); x = 230; pdfGen.AddDefaultText(string.Format("{0}", VousDateEcheance1) , y += 20, max_width, height, x); pdfGen.AddDefaultText(string.Format("{0}", VousDateEcheance2) , y, max_width, height, x += 140); //:**************** PREVOYANCE VOTRE CONJOINT **********//////////: string ConjointComplementaireSante = ""; string ConjointComplementaireSanteNiveau = ""; string ConjointPrevoyance = ""; string ConjointForfait = ""; string ConjointPendant = ""; string ConjointSalaireBrut = ""; string ConjointFranchises = ""; string ConjointCotiAnnuel1 = ""; string ConjointCotiAnnuel2 = ""; string ConjointCompany1 = ""; string ConjointCompany2 = ""; string ConjointDateEcheance1 = ""; string ConjointDateEcheance2 = ""; var Conjoint = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 589).FirstOrDefault(); if (Conjoint != null) { ConjointComplementaireSante = Convert.ToString(Conjoint.CustomObjectValue.ComplementaryHealthContractType); ConjointComplementaireSanteNiveau = Convert.ToString(Conjoint.CustomObjectValue.ComplementaryHealthGuaranteeType); ConjointPrevoyance = Convert.ToString(Conjoint.CustomObjectValue.InsuranceContractType); ConjointForfait = report.IsEmptyReport ? " " : Convert.ToString(Conjoint.CustomObjectValue.InsurancePlan); ConjointPendant = report.IsEmptyReport ? " " : Convert.ToString(Conjoint.CustomObjectValue.InsuranceDuration); ConjointSalaireBrut = Convert.ToString(Conjoint.CustomObjectValue.InsuranceGrossPercentage); ConjointFranchises = Convert.ToString(Conjoint.CustomObjectValue.InsuranceFranchise); ConjointCotiAnnuel1 = Convert.ToString(Conjoint.CustomObjectValue.ComplementaryHealthCurrentContribution); ; ConjointCotiAnnuel2 = Convert.ToString(Conjoint.CustomObjectValue.InsuranceCurrentContribution); ConjointCompany1 = Convert.ToString(Conjoint.CustomObjectValue.ComplementaryHealthCompany); ConjointCompany2 = Convert.ToString(Conjoint.CustomObjectValue.InsuranceCompany); ConjointDateEcheance1 = Convert.ToString(Conjoint.CustomObjectValue.ComplementaryHealthMaturityDate); ConjointDateEcheance2 = Convert.ToString(Conjoint.CustomObjectValue.InsuranceMaturityDate); } y = y + interline+10; yTmp = y; hGht = (10f * height); pdfGen.CalculeZoneWithAutomaticNewPage(ref y, hGht); if (y > 0) y = yTmp; AddPrevoyanceTable2(pdfGen, y); x = 230; ReportBL.PlotBooleanValue(pdfGen, ConjointComplementaireSante, y += interline, x, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_220"), y, max_width, height, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, ConjointComplementaireSanteNiveau, y, x += 120, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_221"), y, max_width, height, x += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, ConjointComplementaireSanteNiveau, y, x += 50, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_222"), y, max_width, height, x += tabYesNo); x = 230; ReportBL.PlotBooleanValue(pdfGen, ConjointComplementaireSante, y += interline, x, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_223"), y, max_width, height, x + tabYesNo); ReportBL.PlotBooleanValue(pdfGen, ConjointComplementaireSanteNiveau, y, x += 140, "3"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_224"), y, max_width, height, x += tabYesNo); x = 230; ReportBL.PlotBooleanValue(pdfGen, ConjointPrevoyance, y += 30, x, "1"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_220"), y, max_width, height, x += tabYesNo); pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_225"), ConjointForfait), y - 15, max_width, height, x += 110); pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_483"), ConjointPendant), y - 15 + interline, max_width, height, x); pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_484"), ConjointSalaireBrut), y - 15 + (interline * 2), max_width, height, x); pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_485"), ConjointFranchises), y - 15 + (interline * 3), max_width, height, x); x = 230; ReportBL.PlotBooleanValue(pdfGen, ConjointPrevoyance, y += interline, x, "2"); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_223"), y, max_width, height, x + tabYesNo); x = 230; pdfGen.AddDefaultText(string.Format("{0}", ConjointCotiAnnuel1) , y += 35, max_width, height, x); pdfGen.AddDefaultText(string.Format("{0}", ConjointCotiAnnuel2) , y, max_width, height, x += 140); x = 230; pdfGen.AddDefaultText(string.Format("{0}", ConjointCompany1) , y += 20, max_width, height, x); pdfGen.AddDefaultText(string.Format("{0}", ConjointCompany2) , y, max_width, height, x += 140); x = 230; pdfGen.AddDefaultText(string.Format("{0}", ConjointDateEcheance1) , y += 20, max_width, height, x); pdfGen.AddDefaultText(string.Format("{0}", ConjointDateEcheance2) , y, max_width, height, x += 140); pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 20 + 65 + 10); if (y > 0) { y += 10; } string noteValue = GetReportOptionAttributeValueByIdOptionAttribute(587, report); pdfGen.DynamicBlueBorderZoneSize(noteValue, y, out oHeight); yTmp = y + interline; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, oHeight); if (y > 0) y = yTmp; pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y, 500, 20); y += interline; pdfGen.AddDynamicBlueBorderWithText(noteValue, ref y, 0, max_width,50); } #endregion }
private static void GeneratePPRevenuEtPatrimoine(FoxitPDFGenerator pdfGen, Data.Model.Report report, ref float y, bool pIsEmptyReport) { const string key = "pprevenupatrimoine"; #region "DEBUG Begin" if (IS_DEBUG) { Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace,"debut revenu et patrimoine",DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } #endregion var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP"); var languageDataPatFin = PageLanguageHelper.GetLanguageContent("User", "ClientPP_ParimoineFinancier"); //REVENUS ET PATRIMOINE float x = 0; y += (interline*2f); var yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 4 * height); if (y > 0) y = yTmp; pdfGen.AddTitle(languageDataPP.GetContent("PdfReportPP_042"), y, max_width, height); pdfGen.AddJustifyText(languageDataPP.GetContent("PdfReportPP_043"), y += paddingAfterParagraph + 10, max_width, height * 3);//Cpnformement ..... /******************* I - REVENUS **********************/ #region "I - Revenus" if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "I - REVENUS", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); //I. Revenus pdfGen.AddSubtitle(languageDataPP.GetContent("PdfReportPP_044"), y += (interline * 2) , max_width, height); // "revenuebreakdown" List<int> lstIdOption = new List<int>() { 194, 195, 774, 196, 197, 198, 199 }; bool isAnydata = false; var hasDetailRevenu = GetReportOptionValueByIdOption(1259, report) != null; if (hasDetailRevenu)// si details checked { var dataRevenusDetails = report.ReportOptionAttributeValue.Where(roav => roav.OptionAttribute.idOption == 314).OrderBy(roav => roav.idReportOptionAttributeValue).ToList(); foreach (var dt in dataRevenusDetails) { isAnydata = IsAnyDataAnd(dt, new string[] {/*"Amount", */"SourceDestination" }); // old criteria if (!isAnydata) { isAnydata = IsAnyDataAnd(dt, new string[] {/*"Amount", */"Designation" }); if (!isAnydata && dt.CustomObjectValue != null) { // var amt = dt.CustomObjectValue.Amount ?? string.Empty; var dgt = dt.CustomObjectValue.Designation ?? string.Empty; //isAnydata = !string.IsNullOrEmpty(amt) && !string.IsNullOrEmpty(dgt); isAnydata = !string.IsNullOrEmpty(dgt); } } if (isAnydata) break; } } /*------------------------------------------------------- a) Revenus annuels nets (en K euros) ---------------------------------------------------------*/ if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "a) Revenus annuels nets (en K euros)", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); // if (!hasDetailRevenu) { y += interline; pdfGen.AddTextBoldSubtitle(string.Format("{0}", languageDataPP.GetContent("PdfReportPP_045")), y, max_width, height, ChapiterPaddingLeft); string revenuV = GetReportOptionAttributeValueByIdOptionAttribute(727, report); pdfGen.AddAnswer(revenuV, y, 100, 20, 250); } /*------------------------------------------------------- b) Détail des revenus ---------------------------------------------------------*/ if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "b) Détail des revenus", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); #region "DELEGATE" Func<float, float, int, int, string, bool> BlockQuestion = (yp, xs, yesIdOption, noIdOption, questionNamekey) => { var reportAnyyes = GetReportOptionValueByIdOption(yesIdOption, report); pdfGen.AddDefaultText(languageDataPatFin.GetContent(questionNamekey), yp, max_width, height, xs += padding_left); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), yp, max_width, height, xs += 270); ReportBL.PlotBooleanValue(pdfGen, reportAnyyes, yp, xs += tabCheck + 5); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), yp, max_width, height, xs += tabYesNo); ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(noIdOption, report), yp, xs += tabCheck + 5); return reportAnyyes != null; }; /*Func<float, float, int, string, string> BlockMontant = (yp, xt, idx, t) => { pdfGen.AddDefaultText(languageDataPatFin.GetContent(t).Replace("€", "€"), yp, max_width, height, xt += padding_left); string liquidity = GetReportOptionAttributeValueByIdOptionAttribute(idx, report); liquidity = !pIsEmptyReport ? (!string.IsNullOrEmpty(liquidity) ? liquidity : "0") : string.Empty; //pdfGen.AddDefaultText(liquidity, yp, max_width, 20, x += 250); pdfGen.AddAnswer(liquidity, yp, 100, 20, xt += 270); return string.Empty; };*/ //[09-02-2016:Tonny] Ne pas afficher la ligne si montant non renseinger ou égale à 0 Func<float, float, int, string, string> BlockMontant = (yp, xt, idx, t) => { string liquidity = GetReportOptionAttributeValueByIdOptionAttribute(idx, report); //liquidity = !pIsEmptyReport ? (!string.IsNullOrEmpty(liquidity) ? liquidity : "0") : string.Empty; if (!pIsEmptyReport) { if (!string.IsNullOrEmpty(liquidity) && !liquidity.Equals("0")) { pdfGen.AddDefaultText(languageDataPatFin.GetContent(t).Replace("€", "€"), yp, max_width, height, xt += padding_left); //pdfGen.AddDefaultText(liquidity, yp, max_width, 20, x += 250); pdfGen.AddAnswer(liquidity, yp, 100, 20, xt += 270); } } else { pdfGen.AddDefaultText(languageDataPatFin.GetContent(t).Replace("€", "€"), yp, max_width, height, xt += padding_left); //pdfGen.AddDefaultText(liquidity, yp, max_width, 20, x += 250); pdfGen.AddAnswer(string.Empty, yp, 100, 20, xt += 270); } return string.Empty; }; #endregion int nbLine = 0; if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "begin test any data", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); if ((/*hasDetailRevenu && */isAnydata) || pIsEmptyReport) { if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "debut tableau des revenus", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); y += interline; pdfGen.AddTextBoldSubtitle(string.Format("{0}", languageDataPP.GetContent("PdfReportPP_046").Replace(":", string.Empty)), y, max_width, height, ChapiterPaddingLeft); y += interline; GenerateDetailRevenuTableFixIssue9985(pdfGen, report, ref nbLine, ref y, pIsEmptyReport); if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "fin tableau des revenus", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "debut note revenus", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, (20 + 80 + 10)); if (y > 0) yTmp = y; pdfGen.AddLabelNote(languageDataPP.GetContent("PdfReportPP_Notes"), y, 500, 20); string noteValue = ReportBL.GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(270, report)); float heightCalcul = 0; // y += interline; y += 5; pdfGen.DynamicBlueBorderZoneSize(noteValue, y, out heightCalcul, 80); yTmp = y + interline; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, heightCalcul); if (y > 0) { y = yTmp; } pdfGen.AddDynamicBlueBorderWithText(noteValue, ref y, 0, max_width, 50); if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "fin note revenus", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); #endregion /******************* II - PATRIMOINE **********************/ if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "II - PATRIMOINE", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); #region "II. Patrimoine" y += interline + 10; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2 * height); pdfGen.AddSubtitle(languageDataPP.GetContent("PdfReportPP_059"), y, max_width, height); #region "Actif global" //Actif global estimé (en K€) : if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "Actif global", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_060"), y += interline + 5, max_width, height, ChapiterPaddingLeft); string actif = GetReportOptionAttributeValueByIdOptionAttribute(728, report); pdfGen.AddAnswer(actif, y, 100, 20, 250); #endregion #region "a) Patrimoine financier" if (IS_DEBUG && _listDebug.Any(px => px == key)) Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "a) Patrimoine financier", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); yTmp = y + interline+5; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3f * height); if (y > 0) y = yTmp; pdfGen.AddTextBoldSubtitle(string.Format("{0}", languageDataPP.GetContent("PdfReportPP_061")), y, max_width, height, ChapiterPaddingLeft); int nbLigneAAfficher1 = 0, nbLigneAAfficher2 = 0, nbLigneAAfficher3 = 0, nbLigneAAfficher4 = 0, nbLigneAAfficher5 = 0, nbLigneAAfficher6 = 0, nbLigneAAfficher7 = 0; bool GotoNextPage = true; int nbLinesTmp = 0; float TabHeight = 0; int nbligne = 0; const float patrimoinRowheight = 25; x = 0; y += interline; //Le client a-t-il un patrimoine financier ? var hasPatrimoineFinancier = BlockQuestion(y, x, 1260, 1261, "ClientPP_ParimoineFinancier_004"); if (hasPatrimoineFinancier || pIsEmptyReport) { /*------------------------------------------------ 1 - LIQUIDITE /*------------------------------------------------*/ #region "1 - Liquidité" if (IS_DEBUG && _listDebug.Any(px => px == key)) { Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "1 - Liquidité", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } x = 0; //Patrimoine financier (en €): y += interline; BlockMontant(y, x, 779, "ClientPP_ParimoineFinancier_003"); y += interline+10; //1. Liquidités (compte chèque, CODEVI, CEL, LEP, livrets, etc.) x = padding_left + 10; pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_062"), y, max_width, height, x); var hasLiquidite = GetReportOptionValueByIdOption(1262, report) != null; var hasDetailLiquidite = GetReportOptionValueByIdOption(1264, report) != null; // -------------- test existence data bool isAnyLiquiditeData = false; var optAttrs = GetOptionAttributesByDataType("patrimoinefinancier"); List<int> IdOptions = new HashSet<int>(optAttrs.Select(t => t.idOptionAttribute)).ToList(); for (int k = 0; k < IdOptions.Count; k++) { int idOptAttrVal = IdOptions[k]; List<ReportOptionAttributeValue> dataLiquidites = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == idOptAttrVal) .OrderBy(roav => roav.idReportOptionAttributeValue) .ToList(); foreach (ReportOptionAttributeValue reportOptonAttrValue in dataLiquidites) { if (IsAnyDataAnd(reportOptonAttrValue, new string[] {"Description"/*, "CurrentValue"*/})) { isAnyLiquiditeData = true; break; } } } //---------------------------------- x += 5; if (!pIsEmptyReport) { if (hasLiquidite) { if (!isAnyLiquiditeData) { y += interline; //Le client a-t-il des liquidités ? BlockQuestion(y, x, 1262, 1263, "ClientPP_ParimoineFinancier_008"); //Liquidités (en €) y += interline; BlockMontant(y, x, 780, "ClientPP_ParimoineFinancier_007"); } else { y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * 25); if (y > 0) y = yTmp; GenerateLiquiditesTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport, patrimoinRowheight); } } else { y += interline; //Le client a-t-il des liquidités ? BlockQuestion(y, x, 1262, 1263, "ClientPP_ParimoineFinancier_008"); } } else { //LIQUIDITES EMPTY REPORT y += interline; //Le client a-t-il des liquidités ? BlockQuestion(y, x, 1262, 1263, "ClientPP_ParimoineFinancier_008"); //Liquidités (en €) y += interline; BlockMontant(y, x, 780, "ClientPP_ParimoineFinancier_007"); y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * 25); if (y > 0) y = yTmp; GenerateLiquiditesTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport, patrimoinRowheight); } #endregion /*------------------------------------------------ 2 - Term investissment /*------------------------------------------------*/ #region "2 - Term investissment" if (IS_DEBUG && _listDebug.Any(px => px == key)) { Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "2 - Term investissment", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } const float rowPlacementHeight = 25; y += interline + 10; //TO_POSITION yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height); if (y > 0) y = yTmp; x = padding_left + 10; pdfGen.AddDefaultTextWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_063"), ref y, max_width - padding_left, 40, x); x += 5; var hasPlacementAterme = GetReportOptionValueByIdOption(1269, report) != null; var hasDetailPlacementAterme = GetReportOptionValueByIdOption(1267, report) != null; // -------------- test existence data bool isAnyTermInvData = false; optAttrs = GetOptionAttributesByDataType("terminvestments"); IdOptions = new HashSet<int>(optAttrs.Select(t => t.idOptionAttribute)).ToList(); for (int k = 0; k < IdOptions.Count; k++) { int idOptAttrVal = IdOptions[k]; List<ReportOptionAttributeValue> dataLiquidites = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == idOptAttrVal) .OrderBy(roav => roav.idReportOptionAttributeValue) .ToList(); foreach (ReportOptionAttributeValue reportOptonAttrValue in dataLiquidites) { if (IsAnyDataAnd(reportOptonAttrValue, new string[] { "Description"/*, "CurrentValue"*/ })) { isAnyTermInvData = true; break; } } } //---------------------------------- // if ((!hasPlacementAterme || !hasDetailPlacementAterme) && !pIsEmptyReport) //if ((!hasPlacementAterme || !isAnyTermInvData) && !pIsEmptyReport) if (!pIsEmptyReport) { if (hasPlacementAterme) { if (!isAnyTermInvData) { y += interline + 5; BlockQuestion(y, x, 1269, 1270, "ClientPP_ParimoineFinancier_012"); //Patrimoine financier (en €) y += interline; BlockMontant(y, x, 787, "ClientPP_ParimoineFinancier_011"); } else { y = y + interline + 10; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height); if (y > 0) y = yTmp; GeneratePlacementATermesTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); } } else { //Patrimoine financier (en €) y += interline + 5; BlockQuestion(y, x, 1269, 1270, "ClientPP_ParimoineFinancier_012"); } } else { //EMPTY REPORT y += interline + 5; BlockQuestion(y, x, 1269, 1270, "ClientPP_ParimoineFinancier_012"); //Patrimoine financier (en €) y += interline; BlockMontant(y, x, 787, "ClientPP_ParimoineFinancier_011"); y = y + interline + 10; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height); if (y > 0) y = yTmp; GeneratePlacementATermesTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); } #endregion /*------------------------------------------------ 3 -Life insurance /*------------------------------------------------*/ if (IS_DEBUG && _listDebug.Any(px => px == key)) { Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "3 -Life insurance", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } #region "3 -Life insurance" y = y + interline + 10; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height); if (y > 0) y = yTmp; x = padding_left + 10; pdfGen.AddDefaultTextWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_064"), ref y, max_width, 40, x); x += 5; var hasAssuranceVie = GetReportOptionValueByIdOption(1273, report) != null; var hasDetailAssuranceVie = GetReportOptionValueByIdOption(1271, report) != null; // -------------- test existence data bool isAnyLifeInsData = false; optAttrs = GetOptionAttributesByDataType("lifeinsurance"); IdOptions = new HashSet<int>(optAttrs.Select(t => t.idOptionAttribute)).ToList(); for (int k = 0; k < IdOptions.Count; k++) { int idOptAttrVal = IdOptions[k]; List<ReportOptionAttributeValue> dataLiquidites = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == idOptAttrVal) .OrderBy(roav => roav.idReportOptionAttributeValue) .ToList(); foreach (ReportOptionAttributeValue reportOptonAttrValue in dataLiquidites) { if (IsAnyDataAnd(reportOptonAttrValue, new string[] { "Description"/*, "CurrentValue"*/ })) { isAnyLifeInsData = true; break; } } } //---------------------------------- //if ((!hasAssuranceVie || !hasDetailAssuranceVie) && !pIsEmptyReport) //if ((!hasAssuranceVie || !isAnyLifeInsData) && !pIsEmptyReport) if(!pIsEmptyReport) { if (hasAssuranceVie) { if (!isAnyLifeInsData) { y += interline; //Le client a-t-il des assurances-vie ? BlockQuestion(y, x, 1273, 1274, "ClientPP_ParimoineFinancier_016"); //Assurance-vie (en €) y += interline; BlockMontant(y, x, 788, "ClientPP_ParimoineFinancier_015"); } else { y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height); if (y > 0) y = yTmp; GenerateAssurancesVieTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); } } else { y += interline; //Le client a-t-il des assurances-vie ? BlockQuestion(y, x, 1273, 1274, "ClientPP_ParimoineFinancier_016"); } }else { // EMPTY REPORT y += interline; //Le client a-t-il des assurances-vie ? BlockQuestion(y, x, 1273, 1274, "ClientPP_ParimoineFinancier_016"); //Assurance-vie (en €) y += interline; BlockMontant(y, x, 788, "ClientPP_ParimoineFinancier_015"); y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height); if (y > 0) y = yTmp; GenerateAssurancesVieTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); } #endregion /*------------------------------------------------ 4 -Securities /*------------------------------------------------*/ #region "4 -Securities" if (IS_DEBUG && _listDebug.Any(px => px == key)) { Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "4 -Securities", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } y = y + interline + 10; //y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height); if (y > 0) y = yTmp; x = padding_left + 10; const float rowValMobHeight = 25; pdfGen.AddDefaultTextWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_065"), ref y, max_width - padding_left, 40, x); x += 5; var hasValeurImmobiliere = GetReportOptionValueByIdOption(1277, report) != null; var hasDetailValeurImmobiliere = GetReportOptionValueByIdOption(1275, report) != null; // -------------- test existence data bool isAnySecuritiesData = false; optAttrs = GetOptionAttributesByDataType("securities"); IdOptions = new HashSet<int>(optAttrs.Select(t => t.idOptionAttribute)).ToList(); for (int k = 0; k < IdOptions.Count; k++) { int idOptAttrVal = IdOptions[k]; List<ReportOptionAttributeValue> dataLiquidites = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == idOptAttrVal) .OrderBy(roav => roav.idReportOptionAttributeValue) .ToList(); foreach (ReportOptionAttributeValue reportOptonAttrValue in dataLiquidites) { if (IsAnyDataAnd(reportOptonAttrValue, new string[] { "Description"/*, "CurrentValue"*/ })) { isAnySecuritiesData = true; break; } } } //---------------------------------- //if ((!hasValeurImmobiliere || !hasDetailValeurImmobiliere) && !pIsEmptyReport) //if ((!hasValeurImmobiliere || !isAnySecuritiesData) && !pIsEmptyReport) if(!pIsEmptyReport) { if (hasValeurImmobiliere) { if (!isAnySecuritiesData) { y += interline; BlockQuestion(y, x, 1277, 1278, "ClientPP_ParimoineFinancier_019"); //Patrimoine financier (en €) y += interline + 5; BlockMontant(y, x, 789, "ClientPP_ParimoineFinancier_018"); } else { y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height); if (y > 0) y = yTmp; GenerateValeursImmobilieresTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); } } else { y += interline; BlockQuestion(y, x, 1277, 1278, "ClientPP_ParimoineFinancier_019"); } }else { //EMPY REPORT y += interline; BlockQuestion(y, x, 1277, 1278, "ClientPP_ParimoineFinancier_019"); //Patrimoine financier (en €) y += interline + 5; BlockMontant(y, x, 789, "ClientPP_ParimoineFinancier_018"); y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height); if (y > 0) y = yTmp; GenerateValeursImmobilieresTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); } #endregion } #endregion //"a) Patrimoine financier" #region "b ) Patrimoine immobilier" if (IS_DEBUG && _listDebug.Any(px => px == key)) { Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "b ) Patrimoine immobilier", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } y = y + interline + 15; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3f * height); if (y > 0) y = yTmp; pdfGen.AddTextBoldSubtitle(string.Format("{0}", languageDataPP.GetContent("PdfReportPP_361")), y, max_width, height, ChapiterPaddingLeft); y += interline; x = 0; //Le client a-t-il un patrimoine immobilier ? var hasPatrimoineImmobilier = BlockQuestion(y, x, 1280, 1281, "ClientPP_ParimoineFinancier_0021"); const float rowPatImHeight = 25; if (hasPatrimoineImmobilier || pIsEmptyReport) { //Patrimoine financier (en €) y += interline; BlockMontant(y, x, 790, "ClientPP_ParimoineFinancier_020"); y = y + interline + 5; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3f * height); if (y > 0) y = yTmp; x = padding_left; /*---------------------------------------------------- 1 - Immobilier de joissance ----------------------------------------------------*/ #region "1 - Immobilier de joissance" if (IS_DEBUG && _listDebug.Any(px => px == key)) { Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "1 - Immobilier de joissance", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } //1. Immobilier de jouissance (résidence principale, résidence secondaire, etc.) pdfGen.AddDefaultTextWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_362"), ref y, max_width, 40, x); x += 10; var hasImmoJouissance = GetReportOptionValueByIdOption(1283, report) != null; var hasDetailJouissance = GetReportOptionValueByIdOption(1285, report) != null; //Details immobilier de joissance "oui" // -------------- test existence data bool isAnyImmobJouissanceData = false; var IdOptions = new List<int>() { 204, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873 }; for (int k = 0; k < IdOptions.Count; k++) { int idOptAttrVal = IdOptions[k]; List<ReportOptionAttributeValue> dataLiquidites = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == idOptAttrVal) .OrderBy(roav => roav.idReportOptionAttributeValue) .ToList(); foreach (ReportOptionAttributeValue reportOptonAttrValue in dataLiquidites) { if (IsAnyDataAnd(reportOptonAttrValue, new string[] { "Description"/*, "CurrentValue"*/ })) { isAnyImmobJouissanceData = true; break; } } } //---------------------------------- //if ((!hasImmoJouissance || !hasDetailJouissance) && !pIsEmptyReport) //if ((!hasImmoJouissance || !isAnyImmobJouissanceData) && !pIsEmptyReport) if(!pIsEmptyReport) { if (hasImmoJouissance) { if (!isAnyImmobJouissanceData) { y += interline; //Le client a-t-il de l'immobilier de joissance ? BlockQuestion(y, x, 1283, 1284, "ClientPP_ParimoineFinancier_025"); y += interline + 5; //Immobiler de joissance (en €) BlockMontant(y, x, 791, "ClientPP_ParimoineFinancier_022"); } else { y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3f * height); if (y > 0) y = yTmp; GenerateImmobilierDeJouissanceTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport, rowPatImHeight); } } else { y += interline; //Le client a-t-il de l'immobilier de joissance ? BlockQuestion(y, x, 1283, 1284, "ClientPP_ParimoineFinancier_025"); } }else { //EMPY REPORT y += interline; //Le client a-t-il de l'immobilier de joissance ? BlockQuestion(y, x, 1283, 1284, "ClientPP_ParimoineFinancier_025"); y += interline + 5; //Immobiler de joissance (en €) BlockMontant(y, x, 791, "ClientPP_ParimoineFinancier_022"); y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3f * height); if (y > 0) y = yTmp; GenerateImmobilierDeJouissanceTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport, rowPatImHeight); } #endregion /*---------------------------------------------------- 2 - Immobilier de rapport ----------------------------------------------------*/ #region "2 - Immobilier de rapport" if (IS_DEBUG && _listDebug.Any(px => px == key)) { Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "2 - Immobilier de rapport", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } const float rowImRapHeight = 25; y += interline + 10; x = padding_left; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, (3 * height)+40); if (y > 0) y = yTmp; pdfGen.AddDefaultTextWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_363"), ref y, max_width, 40, x); x += 5; var hasImmoRapport = GetReportOptionValueByIdOption(1287, report) != null; var hasDetailRapport = GetReportOptionValueByIdOption(1289, report) != null; //Details immobilier de rapport "oui" // -------------- test existence data bool isAnyImmobRapportData = false; IdOptions = new List<int>() { 205, 874, 875, 876 }; for (int k = 0; k < IdOptions.Count; k++) { int idOptAttrVal = IdOptions[k]; List<ReportOptionAttributeValue> dataLiquidites = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == idOptAttrVal) .OrderBy(roav => roav.idReportOptionAttributeValue) .ToList(); foreach (ReportOptionAttributeValue reportOptonAttrValue in dataLiquidites) { if (IsAnyDataAnd(reportOptonAttrValue, new string[] { "Description"/*, "CurrentValue"*/ })) { isAnyImmobRapportData = true; break; } } } //---------------------------------- //if ((!hasImmoRapport || !hasDetailRapport) && !pIsEmptyReport) //if ((!hasImmoRapport || !isAnyImmobRapportData) && !pIsEmptyReport) if (!pIsEmptyReport) { if (hasImmoRapport) { if (!isAnyImmobRapportData) { y += interline; //Le client a-t-il de l'immobilier de joissance ? BlockQuestion(y, x, 1287, 1288, "ClientPP_ParimoineFinancier_027"); //Immobiler de rapport (en €) y += interline; BlockMontant(y, x, 792, "ClientPP_ParimoineFinancier_026"); y += interline; } else { y += interline; GenerateImmobilierDeRapportTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport, rowImRapHeight, 0, 670); } } else { y += interline; //Le client a-t-il de l'immobilier de joissance ? BlockQuestion(y, x, 1287, 1288, "ClientPP_ParimoineFinancier_027"); } } else { // EMPTY REPORT y += interline; //Le client a-t-il de l'immobilier de joissance ? BlockQuestion(y, x, 1287, 1288, "ClientPP_ParimoineFinancier_027"); //Immobiler de rapport (en €) y += interline; BlockMontant(y, x, 792, "ClientPP_ParimoineFinancier_026"); y += interline; GenerateImmobilierDeRapportTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport, rowImRapHeight, 0, 670); } #endregion } #endregion //"b ) Patrimoine immobilier" #region "c - Patrimoine professionnel" if (IS_DEBUG && _listDebug.Any(px => px == key)) { Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "c - Patrimoine professionnel", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } const float rowPatFinHeight = 25; y = y + interline + 13; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, (40 + (2f * height)), y > 0 ? 670 : 0); if (y > 0) y = yTmp; pdfGen.AddTextBoldSubtitle(languageDataPP.GetContent("PdfReportPP_367"), y, max_width, 40, ChapiterPaddingLeft); x = 0; var hasImmoProfessionnel = GetReportOptionValueByIdOption(1291, report) != null; var hasDetailProfessionnel = GetReportOptionValueByIdOption(1293, report) != null; //Details immobilier professionnel "oui" // -------------- test existence data bool isAnyPatriProfData = false; var optAttrs1 = GetOptionAttributesByDataType("patrimoineprofessionnel"); var IdOptions1 = new HashSet<int>(optAttrs1.Select(t => t.idOptionAttribute)).ToList(); for (int k = 0; k < IdOptions1.Count; k++) { int idOptAttrVal = IdOptions1[k]; List<ReportOptionAttributeValue> dataLiquidites = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == idOptAttrVal) .OrderBy(roav => roav.idReportOptionAttributeValue) .ToList(); foreach (ReportOptionAttributeValue reportOptonAttrValue in dataLiquidites) { if (IsAnyDataAnd(reportOptonAttrValue, new string[] { "Description"/*, "OwnedCapital"*/ })) { isAnyPatriProfData = true; break; } } } //---------------------------------- //if ((!hasImmoProfessionnel || !hasDetailProfessionnel) && !pIsEmptyReport) //if ((!hasImmoProfessionnel || !isAnyPatriProfData) && !pIsEmptyReport) if (!pIsEmptyReport) { if (hasImmoProfessionnel) { if (!isAnyPatriProfData) { y += interline; BlockQuestion(y, x, 1291, 1292, "ClientPP_ParimoineFinancier_030"); //Patrimoine divers (en €) y += interline; BlockMontant(y, x, 793, "ClientPP_ParimoineFinancier_029"); y += interline; } else { y = y + interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3f * height); if (y > 0) y = yTmp; GeneratePatrimoineProfessionnelTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); } } else { y += interline; BlockQuestion(y, x, 1291, 1292, "ClientPP_ParimoineFinancier_030"); } } else { // EMPTY REPORT y += interline; BlockQuestion(y, x, 1291, 1292, "ClientPP_ParimoineFinancier_030"); //Patrimoine divers (en €) y += interline; BlockMontant(y, x, 793, "ClientPP_ParimoineFinancier_029"); y += interline; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3f * height); if (y > 0) y = yTmp; GeneratePatrimoineProfessionnelTableFixIssue9985(pdfGen, report, ref y, pIsEmptyReport); } #endregion //"c - Patrimoine professionnel" y = y + interline + 10; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 90); if (y > 0) y = yTmp; pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_369"), ref y, max_width, 10); y += textInterline; pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_370"), ref y, max_width, 40); y += textInterline * 4; pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_371"), ref y, max_width, 10, 10); y += textInterline; pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_372"), ref y, max_width, 30, 10); y += textInterline * 1.5f; pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_372_2"), ref y, max_width, 30, 10); y += textInterline; pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_372_3"), ref y, max_width, 30, 10); y = y + interline + 5; yTmp = y; pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 30); if (y > 0) y = yTmp; pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_364"), ref y, max_width, 10); y += textInterline; pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_365"), ref y, max_width, 10); y += textInterline; pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_366"), ref y, max_width, 10); #endregion //"II. Patrimoine" y += interline*2f; /******************* II - DIVERS **********************/ #region "III. Divers" if (IS_DEBUG && _listDebug.Any(px => px == key)) { Upsilab.Business.Log.Log.AppendException(new Exception(string.Format(trace, "III. Divers", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")))); } const float rowDiversHeight = 25; pdfGen.AddSubtitleWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_368"), ref y, max_width, height); //GenerateTablePatrimoineDivers(pdfGen, report, y += paddingAfterParagraph); x = 0; var hasDiversImmo = GetReportOptionValueByIdOption(1295, report) != null; var hasDetailDiversImmo = GetReportOptionValueByIdOption(1297, report) != null; // -------------- test existence data PageLanguageHelper globalLanguageData = PageLanguageHelper.GetLanguageContent("User", "ClientPP_Revenue"); bool isAnyDiversData = false; var optAttrs2 = GetOptionAttributesByDataType("driver"); var IdOptions2 = new HashSet<int>(optAttrs2.Select(t => t.idOptionAttribute)).ToList(); for (int k = 0; k < IdOptions2.Count; k++) { int idOptAttrVal = IdOptions2[k]; List<ReportOptionAttributeValue> dataLiquidites = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == idOptAttrVal) .OrderBy(roav => roav.idReportOptionAttributeValue) .ToList(); foreach (ReportOptionAttributeValue reportOptonAttrValue in dataLiquidites) { bool isAnydataInt = IsAnyDataAnd(reportOptonAttrValue, new string[] { /*"CurrentValue", "Active"*/ }); // old criteria if (!isAnydataInt) { isAnydataInt = IsAnyDataAnd(reportOptonAttrValue, new string[] { /*"CurrentValue",*/ "Designation" }); } if (!isAnydataInt) { int idOptionAttribute = 0; Int32.TryParse(Convert.ToString(reportOptonAttrValue.idOptionAttribute), out idOptionAttribute); var obj = ReportOptionBL.GetOptionAttributeById(idOptionAttribute); string designation = string.Empty; if (obj != null) { designation = globalLanguageData.GetContent(obj.NameKey); } isAnydataInt = !string.IsNullOrEmpty(designation); } if (isAnydataInt) { isAnyDiversData = true; break; } } } //---------------------------------- //if ((!hasDiversImmo || !hasDetailDiversImmo) && !pIsEmptyReport) //if ((!hasDiversImmo || !isAnyDiversData) && !pIsEmptyReport) if (!pIsEmptyReport) { if (hasDiversImmo) { if (!isAnyDiversData) { y += interline; BlockQuestion(y, x, 1295, 1296, "ClientPP_ParimoineFinancier_033"); //Patrimoine divers (en €) y += interline; BlockMontant(y, x, 794, "ClientPP_ParimoineFinancier_032"); y += interline; } else { y += interline; GenerateTablePatrimoineDiversFixIssue9985(pdfGen, report, ref y, pIsEmptyReport, rowDiversHeight, 0, 0); } } else { y += interline; BlockQuestion(y, x, 1295, 1296, "ClientPP_ParimoineFinancier_033"); } } else { // EMPTY REPORT y += interline; BlockQuestion(y, x, 1295, 1296, "ClientPP_ParimoineFinancier_033"); //Patrimoine divers (en €) y += interline; BlockMontant(y, x, 794, "ClientPP_ParimoineFinancier_032"); y += interline; GenerateTablePatrimoineDiversFixIssue9985(pdfGen, report, ref y, pIsEmptyReport, rowDiversHeight, 0, 0); } #endregion }