コード例 #1
0
        private static void PlotBooleanValueWithAutomaticNewPage(FoxitPDFGenerator instance, object value, ref float y, float x = 0, String compareValue = "")
        {
            const float heightRef = 40;
            if (y > 0)
            {
                float pixelRestant = instance.DEFAULT_PAGE_SIZE - (y + height);
                if (pixelRestant < heightRef)
                {
                    instance.CreatePage();
                    y = 0;
                }
            }

            if (value != null)
            {
                if (compareValue != String.Empty)
                {
                    if (value.ToString() == compareValue)
                        instance.AddReceuil_Selected_Checkbox(y, x);
                    else instance.AddReceuil_UnSelected_Checkbox(y, x);
                }
                else
                {
                    if (value != null)
                        instance.AddReceuil_Selected_Checkbox(y, x);
                    else instance.AddReceuil_UnSelected_Checkbox(y, x);
                }
            }
            else instance.AddReceuil_UnSelected_Checkbox(y, x);
        }
コード例 #2
0
        //update
        //private static float GeneratePMRLesPersonnesHabilitées(FoxitPDFGenerator instance, Data.Model.Report report, PageLanguageHelper languageData, int idOptionAttribute, float yStartPoint = 0)
        //{
        //    if (yStartPoint + 310 >= 700)
        //    {
        //        instance.CreatePage();
        //        yStartPoint = 0;
        //    }

        //    yStartPoint = yStartPoint + 20; //spacing

        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(languageData.GetContent("PersonnesHabiliteesSection_Line1"), yStartPoint, 500, 20);
        //    ReportBL.PlotBooleanValue(instance, ReportBL.GetBooleanValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, idOptionAttribute), String.Empty, "Title"), yStartPoint, 40);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"Madame", yStartPoint, 500, 20, 60);
        //    ReportBL.PlotBooleanValue(instance, ReportBL.GetBooleanValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, idOptionAttribute), Boolean.FalseString, "Title"), yStartPoint, 110);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"Monsieur", yStartPoint, 500, 20, 130);

        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"Nom : {0}", ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, idOptionAttribute), "Name")), yStartPoint + 20, 500, 20);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"Prénom : {0}", ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, idOptionAttribute), "FirstName")), yStartPoint + 35, 500, 20);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"Date de naissance : {0}", ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, idOptionAttribute), "DateOfBirth")), yStartPoint + 50, 500, 20);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"Fonction : {0}", ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, idOptionAttribute), "Function")), yStartPoint + 65, 500, 20);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"Nationalité : {0}", ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, idOptionAttribute), "Nationality")), yStartPoint + 80, 500, 20);

        //    ReportBL.PlotBooleanValue(instance, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(values[8], idReport), yStartPoint + 100);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"Résident", yStartPoint + 100, 500, 20, 20);
        //    ReportBL.PlotBooleanValue(instance, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(values[9], idReport), yStartPoint + 100, 80);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"Non Résident", yStartPoint + 100, 500, 20, 100);

        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"Pays de résidence : {0}", ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(values[10], idReport))), yStartPoint + 120, 500, 20);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"La personne habilitée est-elle domiciliée dans un pays définis par le GAFI ?  (Accédez à la ", yStartPoint + 140, 500, 20, 100);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"liste de ces  pays sur : http://www.fatf-gafi.org/fr/)", yStartPoint + 155, 500, 20, 100);
        //    ReportBL.PlotBooleanValue(instance, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(values[11], idReport), yStartPoint + 170, 100);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"OUI", yStartPoint + 170, 500, 20, 120);
        //    ReportBL.PlotBooleanValue(instance, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(values[12], idReport), yStartPoint + 170, 150);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"NON", yStartPoint + 170, 500, 20, 170);

        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"La personne habilitée est-elle domiciliée dans un centre dit « Off-shore » ?  (Accédez à ", yStartPoint + 200, 500, 20, 100);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"la liste de ces  pays sur : http://www.oecd.org/ctp/harmful/43775845.pdf)", yStartPoint + 215, 500, 20, 100);
        //    ReportBL.PlotBooleanValue(instance, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(values[13], idReport), yStartPoint + 230, 100);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"OUI", yStartPoint + 230, 500, 20, 120);
        //    ReportBL.PlotBooleanValue(instance, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(values[14], idReport), yStartPoint + 230, 150);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"NON", yStartPoint + 230, 500, 20, 170);

        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"Cette personne est-elle bénéficiaire effectif * ?", yStartPoint + 260, 500, 20);
        //    instance.AddReceuil_DetailText_Justify_Calibri_Label(@"Le bénéficiaire effectif est la personne dont la participation directe ou indirecte au capital de la personne morale est supérieure ou égale à 25%", yStartPoint + 275, 500, 20);
        //    ReportBL.PlotBooleanValue(instance, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(values[15], idReport), yStartPoint + 290);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"OUI", yStartPoint + 290, 500, 20, 20);
        //    ReportBL.PlotBooleanValue(instance, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(values[16], idReport), yStartPoint + 290, 50);
        //    instance.AddReceuil_DefaultText_Justify_Calibri_Label(@"NON", yStartPoint + 290, 500, 20, 70);

        //    //added spacing
        //    return yStartPoint + 310;
        //}

        private static float GeneratePMRLesBénéficiaireEffectif(FoxitPDFGenerator instance, ReportOptionAttributeValue data, PageLanguageHelper languageData, float yStartPoint = 0)
        {
            if (data != null)
            {

                //if (yStartPoint + 530 >= 700)
                //{
                instance.CreatePage();
                yStartPoint = 0;
                //}

                // yStartPoint = yStartPoint + 20; //spacing

                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line1"), yStartPoint, 500, 20);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.Title, yStartPoint, 40, "2");
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line1_Item2"), yStartPoint, 500, 20, 60);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.Title, yStartPoint, 110, "1");
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line1_Item1"), yStartPoint, 500, 20, 130);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.Title, yStartPoint, 200, "3");
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line1_Item3"), yStartPoint, 500, 20, 220);


                //instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line2"), data.CustomObjectValue.Name), yStartPoint + 20, 500, 20);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line2"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Name, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line3"), data.CustomObjectValue.MaidenName), yStartPoint + 35, 500, 20);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line3"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.MaidenName, yStartPoint, answer_width, 20, answer_x);

                //instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line4"), data.CustomObjectValue.FirstName), yStartPoint + 50, 500, 20);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line4"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.FirstName, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line5"), data.CustomObjectValue.DateOfBirth), yStartPoint + 65, 500, 20);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line5"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.DateOfBirth, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line6_Item1"), data.CustomObjectValue.Phone), yStartPoint + 80, 500, 20);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line6_Item1"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Phone, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line6_Item2"), data.CustomObjectValue.Mobile), yStartPoint + 80, 500, 20, 200);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line6_Item2"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Mobile, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line7"), data.CustomObjectValue.Email), yStartPoint + 95, 500, 20);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line7"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Email, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line8"), data.CustomObjectValue.Address), yStartPoint + 120, 500, 20);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line8"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Address, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line9"), data.CustomObjectValue.Function), yStartPoint + 135, 500, 20);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line9"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Function, yStartPoint, answer_width, 20, answer_x);

                //instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line10"), data.CustomObjectValue.Nationality), yStartPoint + 150, 500, 20);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line10"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Nationality, yStartPoint, answer_width, 20, answer_x);


                //instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line11"), yStartPoint + 165, 500, 20, 100);
                //instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line12"), yStartPoint + 180, 500, 20, 100);
                instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line11"), languageData.GetContent("LesBénéficiaireEffectifSection_Line12")), yStartPoint += interline * 1.5f, 500 - 100, 40, 100);

                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsGAFI, yStartPoint += interline * 1.5f, 100, "1");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), yStartPoint, 500, 20, 115);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsGAFI, yStartPoint, 145, "2");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), yStartPoint, 500, 20, 170);
                instance.AddDefaultText(string.Format("{0} {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line13"), data.CustomObjectValue.GAFICountry), yStartPoint += interline, 500, 20, 100);

                //instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line14"), yStartPoint + 240, 500, 20, 100);
                //instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line15"), yStartPoint + 255, 500, 20, 100);
                instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line14"), languageData.GetContent("LesBénéficiaireEffectifSection_Line15")), yStartPoint += interline * 1.5f, 500 - 100, 40, 100);

                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsOffshore, yStartPoint += interline * 1.5f, 100, "1");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), yStartPoint, 500, 20, 115);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsOffshore, yStartPoint, 150, "2");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), yStartPoint, 500, 20, 165);
                instance.AddDefaultText(string.Format("{0} {1}", languageData.GetContent("LesBénéficiaireEffectifSection_Line16"), data.CustomObjectValue.OffshoreCountry), yStartPoint += interline, 500, 20, 100);

                instance.AddDefaultBoldText(languageData.GetContent("LesBénéficiaireEffectifSection_Line17"), yStartPoint += interline * 1.5f, 500, 20, 15);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsPPE, yStartPoint += interline, 35, "1");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), yStartPoint, 500, 20, 50);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsPPE, yStartPoint, 85, "2");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), yStartPoint, 500, 20, 105);

                /*instance.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("LesBénéficiaireEffectifSection_Line18"), yStartPoint + 340, 500, 20);
                instance.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("LesBénéficiaireEffectifSection_Line19"), yStartPoint + 355, 500, 20);
                instance.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("LesBénéficiaireEffectifSection_Line20"), yStartPoint + 370, 500, 20);
                instance.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("LesBénéficiaireEffectifSection_Line21"), yStartPoint + 385, 500, 20);
                instance.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("LesBénéficiaireEffectifSection_Line22"), yStartPoint + 400, 500, 20);
                */
                //string strBenef = String.Format(@"{0} {1} {2} {3} {4}",
                //    languageData.GetContent("LesBénéficiaireEffectifSection_Line18"),
                //    languageData.GetContent("LesBénéficiaireEffectifSection_Line19"),
                //    languageData.GetContent("LesBénéficiaireEffectifSection_Line20"),
                //    languageData.GetContent("LesBénéficiaireEffectifSection_Line21"),
                //    languageData.GetContent("LesBénéficiaireEffectifSection_Line22"));
                string strBenef = languageData.GetContent("LesBénéficiaireEffectifSection_Line18_1");
                instance.AddJustifyText(strBenef, yStartPoint += interline * 2, 500, 100); ;

                /*instance.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("LesBénéficiaireEffectifSection_Line23"), yStartPoint + 415, 500, 20);
                instance.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("LesBénéficiaireEffectifSection_Line24"), yStartPoint + 430, 500, 20);
                instance.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("LesBénéficiaireEffectifSection_Line25"), yStartPoint + 445, 500, 20);
                instance.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("LesBénéficiaireEffectifSection_Line26"), yStartPoint + 460, 500, 20);
                instance.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("LesBénéficiaireEffectifSection_Line27"), yStartPoint + 475, 500, 20);
                */
                instance.AddJustifyText(String.Format(@"{0} {1} {2} {3} {4}", languageData.GetContent("LesBénéficiaireEffectifSection_Line23"), languageData.GetContent("LesBénéficiaireEffectifSection_Line24"), languageData.GetContent("LesBénéficiaireEffectifSection_Line25"), languageData.GetContent("LesBénéficiaireEffectifSection_Line26"), languageData.GetContent("LesBénéficiaireEffectifSection_Line27")), yStartPoint += interline * 3.5f, 500, 100);

                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line28"), yStartPoint += interline * 3.5f, 500, 20, 15);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsBusinessRel, yStartPoint += interline, 35, "1");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), yStartPoint, 500, 20, 55);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsBusinessRel, yStartPoint, 85, "2");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), yStartPoint, 500, 20, 105);
                instance.AddDefaultText(languageData.GetContent("LesBénéficiaireEffectifSection_Line29"), yStartPoint += interline, 500, 20, 35);

                //added spacing
                //return yStartPoint + 545;
                return yStartPoint;
            }
            return yStartPoint;
        }
コード例 #3
0
        private static List<CustomEnum> CustomEnum = new List<CustomEnum>(); //TODO
        //private static Data.Model.Report report;
        //private static bool isEmptyReport = false;
        //private static PageLanguageHelper languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP");
        #endregion

        public static int GeneratePPReport(Guid idReport, string pathFilename, bool forceDowload, bool pIsEmptyReport = false, bool inclureTableauVide = false)
        {
            var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP");
            FirmInstitution firmInstitution = new FirmInstitution();
            Data.Model.Report report = new Data.Model.Report();
            Data.Model.CustomerProspect customerProspect = new Data.Model.CustomerProspect();

            Data.Model.Report tempReport = ReportBL.GetReportWithValues(idReport);
            Data.Model.CustomerProspect tempCustomerProspect = CustomerProspectBL.GetCustomerProspectById(tempReport.idCustomerProspect);
            FirmInstitution tempFirmInstitution = Upsilab.Business.Configuration.FirmInstitutionBL.GetFirmInstitutionByIdFirmInstitution(tempCustomerProspect.idFirmInstitution);
            if (!pIsEmptyReport)
            {
                report = tempReport;
                customerProspect = tempCustomerProspect;
                firmInstitution = tempFirmInstitution;
            }

            report.IsEmptyReport = pIsEmptyReport;
            report.IncludeEmptyTable = inclureTableauVide;

            EnumLanguages = GetLanguageEnum(1);
            CustomEnum = GetCustomEnum();

            //Title and footer document
            string documentTitle = "Recueil d'informations";
            string footerContent = tempFirmInstitution.DocumentFooterContent; //temp is ok for empty or not empty doc

            string name = string.Empty;
            string date = string.Empty;
            if (!pIsEmptyReport)
            {
                name = string.Format("{0} {1}", customerProspect.User.UserName, customerProspect.User.UserFirstName);
                date = DateTime.Now.ToShortDateString();
            }

            if (forceDowload)
                date = string.Empty;
            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent, name, string.Format("{0} {1}", string.IsNullOrEmpty(date) ? string.Empty : languageDataPP.GetContent("PdfReportPP_004"), date));
            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle);

            pdfGen.AddBackgroungImage();
            //Logo
            string logoPathFileName = FileManager.BuildLogoPath(tempFirmInstitution.idFirmInstitution) + tempFirmInstitution.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName, tempFirmInstitution.LogoAlign);


            float y = 360;
            pdfGen.AddWhiteTitle(languageDataPP.GetContent("PdfReportPP_001"), y, 240, 60, 260, 20);//Questionnaire relatif au recueil d’informations
            pdfGen.AddWhiteTitle(languageDataPP.GetContent("PdfReportPP_002"), y += (2 * interline + 15), 200, 20, 300, 20);//clients/prospects
            pdfGen.AddWhiteTitle(languageDataPP.GetContent("PdfReportPP_003"), y += (2 * interline + 15), max_width, 20, 0, 12);//PERSONNE PHYSIQUE

            pdfGen.AddWhiteBorder(y += interline * 1.7f, 195, 305, 70);

            if (pIsEmptyReport)
            {
                //string[] rowContents = { languageDataPP.GetContent("PdfReportPP_004")//Le
                //                     , languageDataPP.GetContent("PdfReportPP_005") //Ref. Recueil
                //                     , string.Empty
                //                   };
                //pdfGen.AddTableTitle(rowContents, 110, y += (2 * interline));
            }
            else
            {
                //string[] rowContents = { string.Format("{0} {1}",languageDataPP.GetContent("PdfReportPP_004"), DateTime.Now.ToShortDateString())//Le
                //                     , string.Format("{0}-{1}",languageDataPP.GetContent("PdfReportPP_005"), idReport) //Ref. Recueil
                //                     , string.Format("{0} {1}", customerProspect.User.UserName, customerProspect.User.UserFirstName)
                //                   };
                //pdfGen.AddTableTitle(rowContents, 110, y += (2 * interline));
                if (!forceDowload)
                    pdfGen.AddWhiteTitleLeft(DateTime.Now.ToShortDateString(), y += 10, max_width, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(name, y += (interline), max_width, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(string.Format("{0}-{1}", languageDataPP.GetContent("PdfReportPP_005"), idReport), y += (interline), max_width, 11, 220, 10);

            }


            //pdfGen.AddRecueil_Notes_Rectangle(480, 108, 308, 30);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(string.Format("{0} {1}", customerProspect.User.UserFirstName, customerProspect.User.UserName), 490, 300, 20, 120);

            #region Identification de l'établissement

            y = 0;
            GeneratePPIdentificationEtablissement(pdfGen, firmInstitution, report, ref y);

            #endregion

            #region IDENTIFICATION DU TITULAIRE

            y = 0;
            GeneratePPIdentificationTitulaire(pdfGen, customerProspect, report, ref y, pIsEmptyReport);

            #endregion

            #region REVENU ET PATRIMOINE

            //y += 45;
            GeneratePPRevenuEtPatrimoine(pdfGen, report, ref y, pIsEmptyReport);

            #endregion

            #region CREDITS

            //var isAnyCredit = report.ReportOptionAttributeValue.Any(roav => roav.idOptionAttribute == 215);
            var hasCredit = GetReportOptionValueByIdOption(1307, report) != null;
            var hasDetailCredit = GetReportOptionValueByIdOption(1309, report) != null;
            var dataCredits = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 215).OrderBy(roav => roav.idReportOptionAttributeValue).ToList();
            dataCredits = dataCredits.Where(dc => !string.IsNullOrEmpty(dc.CustomObjectValue.Borrower)).ToList();
            var isAnyCredit = dataCredits.Count>0;
            //if ((isAnyCredit && hasCredit && hasDetailCredit) || pIsEmptyReport) y = 0;
            //else y += 6f*interline;
            if (isAnyCredit && hasCredit && hasDetailCredit && (dataCredits.Count() + 2 >= 7)) y = 0;
            else y += 3f*interline;
            GeneratePPCredit(pdfGen, report, ref y, pIsEmptyReport);

            #endregion

            #region CHARGES DIVERSES
            
            if (isAnyCredit && hasCredit && hasDetailCredit && (dataCredits.Count()+2 >= 7))
            {
                y = 0;
                pdfGen.CreatePage();
            }
            else
            {
                y += 2f * interline;
            }
        
            GeneratePPChargesDiverses(pdfGen, report, ref y,pIsEmptyReport);

            #endregion

            #region ORIENTATIONS PATRIMONIALES
            //pdfGen.CreatePage();
            //y = 0;
            GeneratePPOrientationPatrimoniales(pdfGen, report, ref y, pIsEmptyReport);

            #endregion

            #region PROFIL ET OBJECTIFS D’INVESTISSEMENTS

            GeneratePPProfilEtObjectif(pdfGen, report);

            #endregion

            #region CATEGORISATION CLIENT

            y = 0;
            pdfGen.CreatePage();
            GeneratePPCategorisationClient(pdfGen, report,ref y);

            #endregion

            #region REMARQUES et SIGNATURES
           // pdfGen.CreatePage();

            y += 3f*interline;

            float hGht = 400*31/50;
            float yTmp = y;
            pdfGen.CalculeZoneWithAutomaticNewPage(ref y, hGht);
            if (y > 0)
                y = yTmp;

            //Remarques
            pdfGen.AddTitle(languageDataPP.GetContent("PdfReportPP_482"), y);

            var reportAlerts = ReportAlertBL.GetReportNonBlockingAlertsByIdReport(idReport);
            List<List<String>> reportAlertArray = new List<List<string>>();
            var alertLanguageData = PageLanguageHelper.GetLanguageContent("User", "AlertPanel");
            foreach (var reportAlert in reportAlerts)
            {
                var tempList = new List<String>();
                tempList.Add(alertLanguageData.GetContent(AlertBL.GetAlertById(reportAlert.idAlert).NameKey));
                tempList.Add(reportAlert.JustifyingReason);
                reportAlertArray.Add(tempList);
            }

            pdfGen.AddRecueil_Table_Remarques(reportAlertArray, 0, y += 40, 500, new List<string>()
            {
                languageDataPP.GetContent("PdfReportPP_461"),
                languageDataPP.GetContent("PdfReportPP_462")
            });

            pdfGen.CreatePage();

            //Signature
            pdfGen.AddTitle(languageDataPP.GetContent("Pdf_Signature"), 0);

            #region Signature etablissement
            pdfGen.AddDefaultBoldText(languageDataPP.GetContent("Pdf_Signature_Etabs"), SignatureDocumentBL.SIGNATURE_AREA_Y - 30, 500, 20, SignatureDocumentBL.SIGNATURE_AREA_LEFT_X + 65);
            pdfGen.AddBlueBorder(SignatureDocumentBL.SIGNATURE_AREA_Y, SignatureDocumentBL.SIGNATURE_AREA_LEFT_X, SignatureDocumentBL.SIGNATURE_AREA_WIDTH, SignatureDocumentBL.SIGNATURE_AREA_HEIGHT);

            //Ne pas afficher si signature electronique
            if (forceDowload)
            {
                var x = SignatureDocumentBL.SIGNATURE_AREA_LEFT_X + 5;
                y = SignatureDocumentBL.SIGNATURE_AREA_Y + 5;
                pdfGen.AddDefaultText(languageDataPP.GetContent("Pdf_Lu_Et_Accepte"), y, 200, 20, x);//J'ai lu et j'accepte les conditions générales.
                pdfGen.AddDefaultText(languageDataPP.GetContent("Pdf_Lu_Et_Approuve"), y += 10, 145, 20, x);
                pdfGen.AddDefaultText(languageDataPP.GetContent("Pdf_Date"), y += 15, 145, 20, x);
            }
            #endregion

            #region Signature client
            pdfGen.AddDefaultBoldText(languageDataPP.GetContent("Pdf_Signature_Client"), SignatureDocumentBL.SIGNATURE_AREA_Y - 30, 500, 20, SignatureDocumentBL.SIGNATURE_AREA_RIGHT_X + 80);
            pdfGen.AddBlueBorder(SignatureDocumentBL.SIGNATURE_AREA_Y, SignatureDocumentBL.SIGNATURE_AREA_RIGHT_X, SignatureDocumentBL.SIGNATURE_AREA_WIDTH, SignatureDocumentBL.SIGNATURE_AREA_HEIGHT);

            //Ne pas afficher si signature electronique
            if (forceDowload)
            {
                var x = SignatureDocumentBL.SIGNATURE_AREA_RIGHT_X + 5;
                y = SignatureDocumentBL.SIGNATURE_AREA_Y + 5;
                pdfGen.AddDefaultText(languageDataPP.GetContent("Pdf_Lu_Et_Accepte"), y, 200, 20, x);
                pdfGen.AddDefaultText(languageDataPP.GetContent("Pdf_Lu_Et_Approuve"), y += 10, 145, 20, x);
                pdfGen.AddDefaultText(languageDataPP.GetContent("Pdf_Date"), y += 15, 145, 20, x);
            }
            #endregion
            #endregion

            if (forceDowload)
            {
                string fileName = string.Format("PP_QuestionnaireRecueil_{0}.pdf", idReport);
                pdfGen.GeneratePdfToWeb(fileName);
            }
            else
            {
                pdfGen.GeneratePdf(pathFilename);
            }

            Int32 pageCount = pdfGen.PageCount;
            pdfGen = null;
            return pageCount;
        }
コード例 #4
0
      /// <summary>
      /// 
      /// </summary>
      /// <param name="guidDoc">Id du Mission document</param>
      /// <param name="adviser">CGP</param>
      /// <param name="customerProspect"></param>
      /// <param name="pathFileName"></param>
      /// <param name="forceDownload"></param>
      /// <param name="pIsEmptyDocument">faire "true" si on veut avoir un document vierge</param>
        public static int GenerateRTO(Guid guidDoc,Data.Model.User adviser, Data.Model.CustomerProspect customerProspect, string pathFileName, bool forceDownload, bool pIsEmptyDocument = false)
        {
            float y = 250;
            const int height = 20;
            const int width = 500;
            const int interligne = 15;
            const float label_width = 200;
            const float answer_width = 280;
            const float answer_x = 200;
            Data.Model.CustomerProspect cust = customerProspect;

            FirmInstitution firmInstitution = customerProspect!=null ? customerProspect.FirmInstitution : null;

            //Title and footer document
            const string documentTitle = "CRTO";
            string footerContent = firmInstitution!=null ? firmInstitution.DocumentFooterContent : null;

            string name = string.Empty;
            if (string.IsNullOrEmpty(name))
            {
                name = (cust.IsCorporation.HasValue && cust.IsCorporation.Value) ? cust.CompanyName : string.Format("{0} {1}", cust.FirstName, cust.Name);
            }
            
            string date = DateTime.Now.ToShortDateString();

            var pdfGen = new FoxitPDFGenerator(documentTitle, footerContent, name, string.Format("{0} {1}", LanguageContentBL.Translate("PdfReportPP_004"), date));

            #region page 1
            string logoPathFileName = firmInstitution!=null ? FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo : string.Empty;
            pdfGen.AddBackgroungImage();
            pdfGen.AddLogoOnFirstPage(logoPathFileName, firmInstitution!=null ? firmInstitution.LogoAlign: string.Empty);


            //pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRTO_001"), y, width, height + 5);
            //pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRTO_002"), y += height, width, height + 5);
            //pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRTO_003"), y += height, width, height + 5);

            //string[] rowContents = { string.Format(LanguageContentBL.Translate("PdfRapportMission_002"), DateTime.Now.ToShortDateString()), //Date de maj ou Date de création
            //                           string.Format("{0} RTO-{1}",LanguageContentBL.Translate("PdfFirm_082"),pMissionDoc.idMissionDocument) };
            //pdfGen.LM_AddTableTitle(rowContents, 80, y += 70);

            y = 380;
            pdfGen.AddWhiteTitle(LanguageContentBL.Translate("PdfRTO_001"), y, 240, 80, 260, 14);
            // pdfGen.AddWhiteTitle(LanguageContentBL.Translate("PdfRTO_002"), y += interligne, 240, 60, 260, 20);
            pdfGen.AddWhiteTitle(LanguageContentBL.Translate("PdfRTO_003"), y += interligne * 2.3f, 500, 20, 0, 12);

            if (!pIsEmptyDocument)
            {
                pdfGen.AddWhiteBorder(y += interligne * 2f, 210, 290, 70);


                pdfGen.AddWhiteTitleLeft(DateTime.Now.ToShortDateString(), y += 10, 500, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(name, y += (interligne), 500, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(string.Format("RTO-{0}", guidDoc), y += (interligne), 500, 11, 220, 10); 
            }


            #endregion

            #region page 2


            Data.Model.User userAdviser = adviser ?? customerProspect.User1;

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_003"), y, width, height);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_004"), name), y += interligne * 1.5f, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_004"), string.Empty), y += interligne, label_width, height);
            var thename = pIsEmptyDocument ? string.Empty : name;
            pdfGen.AddAnswer(thename, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_006"), cust.Adress), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_006"), string.Empty), y += interligne, label_width, height);
            var theadress = pIsEmptyDocument ? string.Empty : cust.Adress;
            pdfGen.AddAnswer(theadress, y, answer_width, height * 3, answer_x);

            // pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_007"), cust.ZipCode), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_007"), string.Empty), y += interligne * 2.8f, label_width, height);
            var theusername = pIsEmptyDocument ? string.Empty : cust.ZipCode;
            pdfGen.AddAnswer(theusername, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_008"), cust.City), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_008"), string.Empty), y += interligne, label_width, height);
            var thecity = pIsEmptyDocument ? string.Empty : cust.City;
            pdfGen.AddAnswer(thecity, y, answer_width, height, answer_x);


            FirmInstitution firm = cust!=null ? cust.FirmInstitution : null;
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_009"), y += interligne * 1.5f, width, height);
            //  pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_010"), firm.FirmInstitutionName), y += interligne * 1.5f, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_010"), string.Empty), y += interligne, label_width, height);
            var thefirm = pIsEmptyDocument ? string.Empty : firm.FirmInstitutionName;
            pdfGen.AddAnswer(thefirm, y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_011"), userAdviser.UserName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_011"), string.Empty), y += interligne, label_width, height);
            var theadviserusername = pIsEmptyDocument ? string.Empty : userAdviser.UserName;
            pdfGen.AddAnswer(theadviserusername, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_012"), userAdviser.UserFirstName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_012"), string.Empty), y += interligne, label_width, height);
            var theadviserfirstname = pIsEmptyDocument ? string.Empty : userAdviser.UserFirstName;
            pdfGen.AddAnswer(theadviserfirstname, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_013"), firm.LeaderName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_013"), string.Empty), y += interligne, label_width, height);
            var thefirmleadername = pIsEmptyDocument ? string.Empty : firm.LeaderName;
            pdfGen.AddAnswer(thefirmleadername, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_014"), firm.LeaderFirstName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_014"), string.Empty), y += interligne, label_width, height);
            var thefirmfirstname = pIsEmptyDocument ? string.Empty : firm.LeaderFirstName;
            pdfGen.AddAnswer(thefirmfirstname, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_015"), firm.FirmStreet), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_015"), string.Empty), y += interligne, label_width, height);
            var thefirmstreet = pIsEmptyDocument ? string.Empty : firm.FirmStreet;
            pdfGen.AddAnswer(thefirmstreet, y, answer_width, height * 3, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_016"), firm.FirmPostCode), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_016"), string.Empty), y += interligne * 2.8f, label_width, height);
            var thefirmpostcode = pIsEmptyDocument ? string.Empty : firm.FirmPostCode;
            pdfGen.AddAnswer(thefirmpostcode, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_017"), firm.FirmCity), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_017"), string.Empty), y += interligne, label_width, height);
            var thefirmcity = pIsEmptyDocument ? string.Empty : firm.FirmCity;
            pdfGen.AddAnswer(thefirmcity, y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_018"), firm.RCS), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_018"), string.Empty), y += interligne, label_width, height);
            var thefirmrcs = pIsEmptyDocument ? string.Empty : firm.RCS;
            pdfGen.AddAnswer(thefirmrcs, y, answer_width, height, answer_x);

            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.FR.ToString())
            {
                //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_019"), firm.RegisteredInRegister), y += interligne, width, height);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_019"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer(firm!=null ? firm.RegisteredInRegister:string.Empty, y, answer_width, height, answer_x);

            }
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRTO_004"), y += interligne * 3, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_005"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_006"), y += interligne * 2f, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_007"), y += interligne, width, height * 2);

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRTO_008"), y += interligne * 3, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_009"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_010"), y += interligne * 2f, width, height * 5);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_011"), y += interligne * 4f, width, height * 6);


            #endregion

            #region page 3

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_012"), y, width, height * 5);

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRTO_013"), y += interligne * 4, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_014"), y += interligne * 1.5f, width, height * 4);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_015"), y += interligne * 2.5f, width, height * 3);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_016"), y += interligne * 2.5f, width, height * 7);

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRTO_017"), y += interligne * 5f, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_018"), y += interligne * 1.5f, width, height * 3);

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRTO_019"), y += interligne * 3f, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_020"), y += interligne * 1.5f, width, height * 3);

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRTO_021"), y += interligne * 3f, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_022"), y += interligne * 1.5f, width, height * 3);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRTO_023"), y += interligne * 2f, width, height * 2);

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRTO_024"), y += interligne * 2.5f, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_025"), y += interligne * 1.5f, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfRTO_026"), y += interligne * 1.5f, width, height);

            #endregion

            #region page 4

            pdfGen.CreatePage();
            y = 0;
            //Signature
            pdfGen.AddSubtitle(LanguageContentBL.Translate("Pdf_Signature"), 0);

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("Pdf_Signature_Etabs"), 100, 500, 20, 80);


            pdfGen.AddBlueBorder(130, 35, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 40);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 40);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 40);
            }

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("Pdf_Signature_Client"), 100, 500, 20, 340);
            pdfGen.AddBlueBorder(130, 280, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 285);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 285);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 285);
            }

            #endregion

            //Force download if pathFileName is not set
            if (forceDownload)
            {
                string fileName = string.Format("CRTO_{0}.pdf", guidDoc);
                if (guidDoc == GuidHelper.EmptyGuid()) fileName = "CRTO.pdf";
                pdfGen.GeneratePdfToWeb(fileName);
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }
            return pdfGen.PageCount;
        }
コード例 #5
0
        public static void GeneratePM_LAB(IDictionary<LABStudy.SectionEnum, LABStudyModel> dicoLABStudyModel, string pathFileName, bool emptyLAB = false)
        {
            int y = 160;
            int height = 20;
            int width = 500;

            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator();

            LABStudyModel labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Client];
            FirmInstitution firmInstitution = labStudyModel.Customer.FirmInstitution;
            var languageData = PageLanguageHelper.GetLanguageContent("User", "LAB_PDF_PM_Report");

            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
                firmInstitution = new FirmInstitution();
                labStudyModel.LABStudy = new LABStudy();
                labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect();
            }

            #region Page 1 : Logo & Title
            //#Page 1 : Title
            //Logo
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName);

            //Title
            pdfGen.AddReceuil_Title_Center_CalibriBold_Label(languageData.GetContent("Report_Title"), y, width, 100);
            pdfGen.AddReceuil_SubTitle_Center_CalibriBold_Label(languageData.GetContent("Report_Title2"), y += 100, width, height);

            if (emptyLAB)
            {
                string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), ""),
                                       string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), "") };
                pdfGen.AddTableTitle(rowContents, 110, y += 80);
            }
            else
            {
                string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), labStudyModel.LABStudy.DateUpdated.HasValue ? labStudyModel.LABStudy.DateUpdated.Value.ToShortDateString() : labStudyModel.LABStudy.DateCreated.ToShortDateString()),
                                       string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), labStudyModel.LABStudy.idLABStudy) };
                pdfGen.AddTableTitle(rowContents, 110, y += 80);
            }
            #endregion

            #region Page 2 : Client : I. identité du client
            //#Page 2 : Client : I. identité du client
            pdfGen.CreatePage();

            y = 0;
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page2_Title"), y, width, 20);

            height = 15;
            y += 5;

            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y + height, 0, Boolean.FalseString);
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section1_Line1"), 15, y += height, width, 15);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y + height, 0, Boolean.TrueString);
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section1_Line2"), 15, y += height, width, 15);

            y += 5;
            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page2_Section2_Title"), 0, y += height, width, 20);

            //Identité
            y += 5;
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line1"), labStudyModel.GetOptionAttributeValue(718, 516)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line2"), labStudyModel.GetOptionAttributeValue(718, 517)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line3"), labStudyModel.GetOptionAttributeValue(718, 518)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line4"), labStudyModel.GetOptionAttributeValue(718, 519)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line5"), labStudyModel.GetOptionAttributeValue(718, 520)), 0, y += height, width, height);
            var dateImatr = labStudyModel.GetOptionAttributeValue(718, 521);
            dateImatr = (!string.IsNullOrEmpty(dateImatr)) ? dateImatr.Substring(0, 10) : dateImatr;
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line6"), dateImatr), 0, y += height, width, height);

            //Adresse
            pdfGen.AddLabelArial(string.Format("{0} : ", languageData.GetContent("Page2_Section2_Line22")), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0}", labStudyModel.GetOptionAttributeValue(718, 525)), 10, y += height, width, 3 * height);
            //ZipCode
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("PDF_LAB_PM_Page2_ZipCode"), labStudyModel.GetOptionAttributeValue(718, 741)), 0, y += 3 * height, width, height);
            //City
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("PDF_LAB_PM_Page2_Country"), labStudyModel.GetOptionAttributeValue(718, 742)), 0, y += height, width, height);
            //Tel
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line23"), labStudyModel.GetOptionAttributeValue(718, 526)), 0, y += height, width, height);
            //Fax
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("PDF_LAB_PM_Fax"), labStudyModel.GetOptionAttributeValue(718, 751)), 0, y += height, width, height);
            //Mail
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line24"), labStudyModel.GetOptionAttributeValue(718, 527)), 0, y += height, width, height);

            //Domiciliation
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(736), y += 20, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line16_Item1"), 15, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(737), y, 150, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line16_Item2"), 165, y, width, height);

            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line17"), labStudyModel.GetOptionAttributeValue(738, 524)), 0, y += height, width, height);
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line18"), 0, y += height, width, height);
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line19"), 0, y += height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(740), y += height, 25, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes_Caps"), 40, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(741), y, 75, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No_Caps"), 90, y, width, height);

            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line20"), 0, y += 20, width, height);
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line21"), 0, y += height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(743), y += height, 25, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes_Caps"), 40, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(744), y, 75, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No_Caps"), 90, y, width, height);

            //Forme juridique
            pdfGen.AddLabelArial(String.Format(@"{0} :", languageData.GetContent("Page2_Section2_Line7")), 0, y += 30, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(721), y += height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line8"), 15, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(722), y += height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line9"), 15, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(723), y += height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line10"), 15, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(724), y += height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line11"), 15, y, width, height);

            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(725), y += height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line12"), 15, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(726), y, 300, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IS"), 315, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(727), y, 340, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IR"), 355, y, width, height);

            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(728), y += height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line13"), 15, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(729), y, 300, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IS"), 315, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(730), y, 340, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IR"), 355, y, width, height);

            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(731), y += height, 0, "1");
            pdfGen.AddLabelArial(string.Format("{0} {1}", languageData.GetContent("Page2_Section2_Line14"), labStudyModel.GetOptionAttributeValue(731, 522)), 15, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(732), y, 300, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IS"), 315, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(733), y, 340, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_IR"), 355, y, width, height);

            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(734), y += height, 0, "1");
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line15"), labStudyModel.GetOptionAttributeValue(734, 523)), 15, y, width, height);

            //Societe cotée
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line25"), 0, y += 30, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(748), y += height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes_Caps"), 15, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(749), y, 50, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No_Caps"), 65, y, width, height);

            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line26"), labStudyModel.GetOptionAttributeValue(746, 528)), 0, y += 20, width, height);
            //pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line27"), labStudyModel.GetOptionAttributeValue(746, 529)), 0, y += height, width, height);
            //pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line28"), labStudyModel.GetOptionAttributeValue(746, 530)), 0, y += height, width, height);
            //pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line29"), labStudyModel.GetOptionAttributeValue(746, 531)), 0, y += height, width, height);
            #endregion

            #region Page 3 : Secteur d'activités
            pdfGen.CreatePage();

            y = 0;
            //Secteur d'activités
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line30"), labStudyModel.GetOptionAttributeValue(751, 532)), 0, y += 30, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line31"), labStudyModel.GetOptionAttributeValue(751, 533)), 0, y += 15, width, height);
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line32"), 0, y += height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(753), y += height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes_Caps"), 15, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(754), y, 50, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No_Caps"), 65, y, width, height);

            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line33"), labStudyModel.GetOptionAttributeValue(755, 534)), 0, y += 20, width, height * 2);

            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line34"), 0, y += 2 * height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(757), y += height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes_Caps"), 15, y, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(758), y, 50, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No_Caps"), 65, y, width, height);
            #endregion

            #region Page 4 : Client : II. Personne Morale
            //#Page 3 : Client : II. Personne Morale
            pdfGen.CreatePage();

            y = 0;
            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page3_Section1_Title"), 0, y += 2 * height, width, height);

            string[] tableRiskVigilanceYesNo_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No") };
            string[] tableRiskVigilanceYesNoIDK_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No"), languageData.GetContent("TableRiskVigilanceYesNo_Item3") };

            LABAnswer labAnswer = labStudyModel.GetAnswerByIdQuestion(9);
            string[] answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line8"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(10);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line9"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(2);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line1"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(3);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line2"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(4);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line3"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(5);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line4"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(6);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line5"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(7);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line6"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(16);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line7"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            #endregion

            #region Page 5 : Client : III. Facteurs de risque aggravé
            //#Page 4 : Client : III. Facteurs de risque aggravé
            pdfGen.CreatePage();

            y = 0;
            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page4_Section1_Title"), 0, y += 2 * height, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(17);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line1"), 0, y += 2 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(18);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line2"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(19);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line3"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(20);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line4"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(21);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line5"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(24);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line8"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(22);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line6"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(23);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line7"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(51);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line9"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 6 : Client : IV. Risques fiscaux
            //#Page 5 : Client : IV. Risques fiscaux
            pdfGen.CreatePage();

            y = 0;
            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page5_Section1_Title"), 0, y += 2 * height, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(25);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line1"), 0, y += 2 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(26);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line2"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(27);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line3"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(28);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line4"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(29);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line5"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(30);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line6"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(32); 
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line8"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 7 : Produit : V. L'environnement et les caractéristiques du produit
            //#Page 6 : Produit : V. L'environnement et les caractéristiques du produit
            pdfGen.CreatePage();

            labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Product];
            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
            }

            y = 0;
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page6_Section1_Title"), y, width, 20);

            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page6_Section1_Title2"), 0, y += 2 * height, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(34);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line1"), 0, y += 2 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(35);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line2"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(36);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line3"), 0, y += 3 * height, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(38);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line5"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(39);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line6"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(40);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line7"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(41);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line8"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(42);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line9"), 0, y += 3 * height, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 8 : Produit : V. L'environnement et les caractéristiques du produit
            //#Page 7 : Produit : V. L'environnement et les caractéristiques du produit
            pdfGen.CreatePage();

            y = 0;
            labAnswer = labStudyModel.GetAnswerByIdQuestion(43);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line1"), 0, y, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(44);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line2"), 0, y += 3 * height, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(45);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line3"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(46);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line4"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 9 : Operation : VI. Risques généraux - Risques fiscaux
            //#Page 8 : Operation : VI. Risques généraux / fiscaux
            pdfGen.CreatePage();

            labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Operation];
            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
                firmInstitution = new FirmInstitution();
                labStudyModel.LABStudy = new LABStudy();
                labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect();
            }

            y = 0;
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page8_Section1_Title"), y, width, 20);

            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page8_Section1_Title2"), 0, y += 2 * height, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(49);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line2"), 0, y += 2 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(50);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line3"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            //VII. Risques liés à la distribution des fonds gérés par les sociétés de gestion
            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page9_Section1_Title"), 0, y += 5 * height, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(57);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line3"), 0, y += 2 * height, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(58);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line4"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 10 : NIVEAU DE RISQUE GLOBAL DU CLIENT
            //#Page 9 : NIVEAU DE RISQUE GLOBAL DU CLIENT            
            pdfGen.CreatePage();

            y = 0;           
            //NIVEAU DE RISQUE GLOBAL DU CLIENT            
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page9_Section2_Title"), y, width, 20);

            string dateUpdated = (labStudyModel.LABStudy.DateUpdated.HasValue) ? labStudyModel.LABStudy.DateUpdated.Value.ToString("dd/MM/yyyy") : labStudyModel.LABStudy.DateCreated.ToString("dd/MM/yyyy");
            string idGlobalRisk = labStudyModel.LABStudy.idRisk.ToString();
            string idGlobalVigilance = labStudyModel.LABStudy.idVigilance.ToString();

            pdfGen.AddLabelArial(string.Format("{0} {1}", languageData.GetContent("Page9_Section2_Line1"), dateUpdated), 0, y += 2 * height, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line2"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "2");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line3"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "3");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line4"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "4");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line5"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "5");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line6"), 20, y, width, height);

            //NIVEAU DE VIGILANCE GLOBAL DU CLIENT
            y += 60;
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page9_Section3_Title"), y, width, 20);

            pdfGen.AddLabelArial(string.Format("{0} {1}", languageData.GetContent("Page9_Section3_Line1"), dateUpdated), 0, y += 2 * height, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line2"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "2");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line3"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "3");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line4"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "4");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line5"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "5");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line6"), 20, y, width, height);
            #endregion

            //Force download if pathFileName is not set
            if (string.IsNullOrEmpty(pathFileName))
            {
                pdfGen.GeneratePdfToWeb("LAB_PM.pdf");
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }
        }
コード例 #6
0
        private static void GeneratePPIdentificationEtablissement(FoxitPDFGenerator pdfGen, FirmInstitution firmInstitution, Data.Model.Report report, ref float y)
        {
            var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP");
            var languageData = PageLanguageHelper.GetLanguageContent("User", "PDF_PM_Report");
            pdfGen.CreatePage();
            pdfGen.AddTitle(languageDataPP.GetContent("PdfReportPP_006"), y, max_width, 20);//IDENTIFICATION DE L’ÉTABLISSEMENT
            /*pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_007"), y = y + interline + textInterline, max_width, 20,0,10);//Préalablement à tout investissement financier......
            pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_008"), y += interline, max_width, 20, 0, 10);//patrimoniale intégrant toutes les dimensions....
            pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_009"), y += interline, max_width, 20, 0, 10);//sensibilité au risque en vue de vous proposer une allocation d’actifs cohérente.
            */
            StringBuilder sbTextprealable = new StringBuilder(languageDataPP.GetContent("PdfReportPP_007"));
            sbTextprealable.Append(@" " + languageDataPP.GetContent("PdfReportPP_008"));
            sbTextprealable.Append(@" " + languageDataPP.GetContent("PdfReportPP_009"));
            pdfGen.AddJustifyText(sbTextprealable.ToString(), y = y + interline + textInterline, max_width, 60, 0);

            /*pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_010"), y = y + interline, max_width, 20, 0, 10);//A cet effet, nous vous proposons le recueil ....
            pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageDataPP.GetContent("PdfReportPP_011"), y += interline, max_width, 20, 0, 10);//questionnaire profil de risques
            */
            StringBuilder sbTextEffet = new StringBuilder(languageDataPP.GetContent("PdfReportPP_010"));
            sbTextEffet.Append(@" " + languageDataPP.GetContent("PdfReportPP_011"));
            pdfGen.AddJustifyText(sbTextEffet.ToString(), y = y + (interline * 2), max_width, 40, 0);//A cet effet, nous vous proposons le recueil ....

            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_012"), y = y + (interline * 2) + textInterline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.FirmInstitutionName, y, answer_width, 20, answer_x);

            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.FR.ToString())
            {
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_013"), y += interline, label_width, height);
                pdfGen.AddAnswer(firmInstitution.LeaderName, y, answer_width, 20, answer_x);

                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_014"), y += interline, label_width, height);
                pdfGen.AddAnswer(firmInstitution.LeaderFirstName, y, answer_width, 20, answer_x);

                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_015"), y += interline, label_width, height);//Numéro RCS : 
                pdfGen.AddAnswer(firmInstitution.RCS, y, answer_width, 20, answer_x);
            }
            else
            {
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_015"), y += interline, label_width, height);//Numéro d'entreprise
                pdfGen.AddAnswer(firmInstitution.RegisteredInRegister, y, answer_width, 20, answer_x);

                var optionValue = Business.Configuration.FirmInstitutionOptionBL.GetFirmInstitutionOptionAttributeValueByFirmAndIdOptionAttribute(firmInstitution.idFirmInstitution, 1);
                var optFSMA = string.Empty;
                if (optionValue != null)
                    optFSMA = Convert.ToString(optionValue.Value);

                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_FSMA"), y += interline, label_width, height);//Numéro FSMA :
                pdfGen.AddAnswer(optFSMA, y, answer_width, 20, answer_x);

            }

            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_016"), y += interline, label_width, height);//Adresse du siège : 
            pdfGen.AddAnswer(firmInstitution.FirmStreet, y, answer_width, 20, answer_x);

            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_017"), y += interline, label_width, height);//Code postal :
            pdfGen.AddAnswer(firmInstitution.FirmPostCode, y, answer_width, 20, answer_x);

            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_018"), y += interline, label_width, height);//Ville :
            pdfGen.AddAnswer(firmInstitution.FirmCity, y, answer_width, 20, answer_x);

            #region Conseiller signataire
            string signataireFirstName = string.Empty;
            string signataireName = string.Empty;

            if (!report.IsEmptyReport)
            {
                Data.Model.User userAdviser = (report.User != null) ? report.User : report.CustomerProspect.User1;

                if (!string.IsNullOrEmpty(userAdviser.UserFirstName))
                {
                    signataireFirstName = userAdviser.UserFirstName;
                }

                if (!string.IsNullOrEmpty(userAdviser.UserName))
                {
                    signataireName = userAdviser.UserName;
                }
            }

            pdfGen.AddDefaultText(String.Format(languageDataPP.GetContent("PdfReportPP_753"), string.Empty, string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(string.Format("{0} {1}", signataireFirstName, signataireName), y, answer_width, 20, answer_x);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(languageDataPP.GetContent("PdfReportPP_754"), signataireFirstName), y += interline, max_width, height);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(languageDataPP.GetContent("PdfReportPP_755"), signataireName), y += interline, max_width, height);

            #endregion

            pdfGen.AddOrangeTitle(languageDataPP.GetContent("PdfReportPP_019"), y += paddingAfterParagraph + 10, max_width, 20);//"PREALABLE"
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_020"), y += interline, max_width, 20, 0);//Nous vous rappelons que :
            pdfGen.AddDefaultBoldText(".", y += interline, max_width, 20, 20);
            pdfGen.AddJustifyText(languageDataPP.GetContent("PdfReportPP_021"), y, max_width - 35, 40, 35);//le recueil des informations est effectué dans votre intérêt
            pdfGen.AddDefaultBoldText(".", y += interline * 1.5f, max_width, 20, 20);
            pdfGen.AddJustifyText(languageDataPP.GetContent("PdfReportPP_022"), y, max_width - 35, 40, 35);//la fourniture d’une information complète et sincère ....
            pdfGen.AddDefaultBoldText(".", y += interline * 1.5f, max_width, 20, 20);
            pdfGen.AddJustifyText(languageDataPP.GetContent("PdfReportPP_023"), y, max_width - 35, 40, 35);//toute modification de votre situation peut avoir une incidence ....

            /*pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_024"), y = y + interline * 3, max_width, 20,0,10);//Les informations recueillies dans le présent formulaire font l’objet d’un traitement informatique..
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_025"), y += interline, max_width, 20,0,10);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_026"), y += interline, max_width, 20, 0, 10);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_027"), y += interline, max_width, 20, 0, 10);
            */

            pdfGen.AddBlueBorder(y += 30, 0, max_width, 190);
            //StringBuilder sbText24 = new StringBuilder(languageDataPP.GetContent("PdfReportPP_024"));
            //sbText24.Append(@" " + languageDataPP.GetContent("PdfReportPP_025"));
            //sbText24.Append(@" " + languageDataPP.GetContent("PdfReportPP_026"));
            //sbText24.Append(@" " + languageDataPP.GetContent("PdfReportPP_027"));
            StringBuilder sbText24 = new StringBuilder(languageDataPP.GetContent("PdfReportPP_024_1"));
            pdfGen.AddItalicJustifyText(sbText24.ToString(), y = y + interline, max_width - 20, 80, 10);//Les informations recueillies dans le présent formulaire font l’objet d’un traitement informatique..

            /*pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_028"), y = y + interline * 2, max_width, 20, 0, 10);//Les destinataires des données sont les conseils en ....
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_029"), y += interline, max_width, 20, 0, 10);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_030"), y += interline, max_width, 20, 0, 10);
            */

            float h = 20;
            StringBuilder sbText28 = new StringBuilder(languageDataPP.GetContent("PdfReportPP_028"));
            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.FR.ToString())
            {
                h = 60;
                sbText28.Append(@" " + languageDataPP.GetContent("PdfReportPP_029"));
                sbText28.Append(@" " + languageDataPP.GetContent("PdfReportPP_030"));
            }


            pdfGen.AddItalicJustifyText(sbText28.ToString(), y = y + interline * 3, max_width - 20, h, 10);//Les destinataires des données sont les conseils en ....

            /*pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_031"), y = y + interline * 2, max_width, 20, 0, 10);//Il est rappelé que les Prestataires sont tenus de respecter le principe de pertinence et de proportionnalité des données collectées au regard
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_032"), y += interline, max_width, 20, 0, 10);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_033"), y += interline, max_width, 20, 0, 10);
            */

            //StringBuilder sbText31 = new StringBuilder(languageDataPP.GetContent("PdfReportPP_031"));
            //sbText31.Append(@" " + languageDataPP.GetContent("PdfReportPP_032"));
            //sbText31.Append(@" " + languageDataPP.GetContent("PdfReportPP_033"));
            var sbText31 = new StringBuilder(languageData.GetContent("Page1_Section2_Paragraph4_Line4"));
            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.FR.ToString())
            {
                pdfGen.AddItalicJustifyText(sbText31.ToString(), y = y + interline * 2.5f, max_width - 20, 60, 10);//Il est rappelé que les Prestataires sont tenus de respecter le principe de pertinence et de proportionnalité des données collectées au regard
            }
            else
            {
                pdfGen.AddItalicJustifyText(sbText31.ToString(), y = y + interline * 1.5f, max_width - 20, 60, 10);//Il est rappelé que les Prestataires sont tenus de respecter le principe de pertinence et de proportionnalité des données collectées au regard
            }
            /*pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_034"), y = y + interline * 2, max_width, 20, 0, 10);//Conformément à cette loi « informatique et libertés » n°78-17 du 6 janvier 1978, le client bénéficie d’un droit d’accès et de rectification aux 
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_035"), y += interline, max_width, 20, 0, 10);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_036"), y += interline, max_width, 20, 0, 10);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageDataPP.GetContent("PdfReportPP_037"), y += interline, max_width, 20, 0, 10);
            */

            //StringBuilder sbText34 = new StringBuilder(languageDataPP.GetContent("PdfReportPP_034"));
            //sbText34.Append(@" " + languageDataPP.GetContent("PdfReportPP_035"));
            //sbText34.Append(@" " + languageDataPP.GetContent("PdfReportPP_036"));
            //sbText34.Append(@" " + languageDataPP.GetContent("PdfReportPP_037"));
            StringBuilder sbText34 = new StringBuilder(languageDataPP.GetContent("PdfReportPP_034_1"));
            pdfGen.AddItalicJustifyText(sbText34.ToString(), y = y + interline * 2.5f, max_width - 20, 80, 10);//Conformément à cette loi « informatique et libertés » n°78-17 du 6 janvier 1978, le client bénéficie d’un droit d’accès et de rectification aux 
        }
コード例 #7
0
        public static int GeneratePDF(Upsilab.Data.Model.CustomerProspect pCustomer, Upsilab.Data.Model.FirmInstitution pFirmInstitution, string pathFileName, bool forceDownload = true) //Guid idCustomer paramétre à mettre en place ???
        {
            float y = 100;
            int height = 20;
            int width = 500;
            int interligne = 20;
            int paddingLeft = 50;
            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator();

            #region Page 1

            pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_001"), y += 100, width, height);
            string[] rowContents = { string.Format(LanguageContentBL.Translate("PdfRapportMission_002"), DateTime.Now.ToShortDateString()), 
                                       string.Format("{0} EC-{1}", LanguageContentBL.Translate("PdfFirm_082"),pCustomer.idCustomer) };
            pdfGen.AddTableTitle(rowContents, 110, y += 80);

            #endregion

            #region Page 2

            pdfGen.CreatePage();
            y = 0;
            Dictionary<int, List<string>> data = new Dictionary<int, List<string>>();
            for (int j = 0; j < 7; j++)
            {
                data.Add(j, new List<string>());
            }
            data[0].Add(LanguageContentBL.Translate("PdfEngagement_002"));
            data[0].Add(pFirmInstitution.FirmInstitutionName);

            data[1].Add(LanguageContentBL.Translate("PdfEngagement_003"));
            data[1].Add(pFirmInstitution.ShareCapital);

            data[2].Add(LanguageContentBL.Translate("PdfEngagement_004"));
            data[2].Add(pFirmInstitution.RegisteredInRegister);

            data[3].Add(LanguageContentBL.Translate("PdfEngagement_005"));
            data[3].Add(pFirmInstitution.RCS);

            data[4].Add(LanguageContentBL.Translate("PdfEngagement_006"));
            data[4].Add(string.Format("{0}\n{1}\n{2}", pFirmInstitution.FirmStreet, pFirmInstitution.FirmPostCode, pFirmInstitution.FirmCity));
            data[5].Add(LanguageContentBL.Translate("PdfEngagement_007"));
            data[5].Add(string.Format("{0} {1}", pFirmInstitution.LeaderFirstName, pFirmInstitution.LeaderName));

            data[6].Add(LanguageContentBL.Translate("PdfEngagement_008"));
            data[6].Add(pFirmInstitution.LeaderFonction);

            pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_009"), y, width, height, paddingLeft);

            pdfGen.GeneratePinkTable(data, 0, y += interligne * 2, width, 240, 11, false);

            pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_010"), y += 260, width, height, paddingLeft);

            pdfGen.AddReceuil_SubTitle_Right_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_011"), y += interligne * 2, width, height);

            pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_012"), y += interligne * 2, width, height, paddingLeft);

            var lstRowHeight = new List<float>();
            data = new Dictionary<int, List<string>>();
            for (int j = 0; j < 5; j++)
            {
                data.Add(j, new List<string>());
            }

            data[0].Add(LanguageContentBL.Translate("PdfEngagement_013"));
            data[0].Add(pCustomer.User.EntireName);
            lstRowHeight.Add(30);

            data[1].Add(LanguageContentBL.Translate("PdfEngagement_014"));
            data[1].Add(pCustomer.DateOfBirth.HasValue ? pCustomer.DateOfBirth.Value.ToShortDateString() : string.Empty);
            lstRowHeight.Add(30);

            data[2].Add(LanguageContentBL.Translate("PdfEngagement_015"));
            data[2].Add(pCustomer.PlaceOfBirth);
            lstRowHeight.Add(30);

            data[3].Add(LanguageContentBL.Translate("PdfEngagement_016"));
            data[3].Add(pCustomer.Nationality);
            lstRowHeight.Add(30);

            data[4].Add(LanguageContentBL.Translate("PdfEngagement_017"));
          //  data[4].Add(pCustomer.Adress);
            // fix issue 9509
            var str = string.Empty;
            var hg = 30;
            if (!string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) &&
                !string.IsNullOrEmpty(pCustomer.City))
            {
                str = string.Format("{0}\n{1}\n{2}", pCustomer.Adress, pCustomer.ZipCode, pCustomer.City);
                hg = 60;
            }
            else if(!string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) &&
                string.IsNullOrEmpty(pCustomer.City))
            {
                str = string.Format("{0}\n{1}", pCustomer.Adress, pCustomer.ZipCode);
                hg = 45;
            }
            else if (string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) &&
   ! string.IsNullOrEmpty(pCustomer.City))
            {
                str = string.Format("{0}\n{1}", pCustomer.ZipCode, pCustomer.City);
                hg = 45;
            }
            else if (!string.IsNullOrEmpty(pCustomer.Adress) && string.IsNullOrEmpty(pCustomer.ZipCode) &&
!string.IsNullOrEmpty(pCustomer.City))
            {
                str = string.Format("{0}\n{1}", pCustomer.Adress, pCustomer.City);
                hg = 45;
            }
            else if (!string.IsNullOrEmpty(pCustomer.Adress) && string.IsNullOrEmpty(pCustomer.ZipCode) &&
                     string.IsNullOrEmpty(pCustomer.City))
            {
                str = string.Format("{0}", pCustomer.Adress);
                hg = 30;
            }
            else if (string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) &&
         string.IsNullOrEmpty(pCustomer.City))
            {
                str = string.Format("{0}", pCustomer.ZipCode);
                hg = 30;
            }
            else if (string.IsNullOrEmpty(pCustomer.Adress) && string.IsNullOrEmpty(pCustomer.ZipCode) &&
!string.IsNullOrEmpty(pCustomer.City))
            {
                str = string.Format("{0}", pCustomer.City);
                hg = 30;
            }
            data[4].Add(str);
            lstRowHeight.Add(hg);

           // pdfGen.GeneratePinkTable(data, 0, y += interligne * 2, width, 150, 11, false);
            pdfGen.GeneratePinkTableWithRowHeight(data, 0, y += interligne * 2, width, 150, 11, false, lstRowHeight);

            pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_018"), y += 200, width, height, paddingLeft);

            pdfGen.AddReceuil_SubTitle_Right_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_019"), y += interligne * 2, width, height);

            pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_020"), y += interligne * 2, width, height, paddingLeft);


            #endregion

            #region Page 3

            pdfGen.CreatePage();
            y = 0;
            pdfGen.GenerateStyledTitle(LanguageContentBL.Translate("PdfEngagement_021"), y, 100, 300, 40, 16);
            pdfGen.GenerateSommaireAnalytique(0, y = +interligne * 4, width, 400, 12,
                new List<string>() {LanguageContentBL.Translate("PdfEngagement_095"),LanguageContentBL.Translate("PdfEngagement_096"),LanguageContentBL.Translate("PdfEngagement_097"),LanguageContentBL.Translate("PdfEngagement_098")
                    ,LanguageContentBL.Translate("PdfEngagement_099"),LanguageContentBL.Translate("PdfEngagement_100"),LanguageContentBL.Translate("PdfEngagement_101"),LanguageContentBL.Translate("PdfEngagement_102")
                    ,LanguageContentBL.Translate("PdfEngagement_103"),LanguageContentBL.Translate("PdfEngagement_104"),LanguageContentBL.Translate("PdfEngagement_105"),LanguageContentBL.Translate("PdfEngagement_106")
                    ,LanguageContentBL.Translate("PdfEngagement_107"),LanguageContentBL.Translate("PdfEngagement_108") ,LanguageContentBL.Translate("PdfEngagement_109"),LanguageContentBL.Translate("PdfEngagement_110")
                    ,LanguageContentBL.Translate("PdfEngagement_111") ,LanguageContentBL.Translate("PdfEngagement_112")
                });

            #endregion

            #region Page 4

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_022"), y, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_023"), y += interligne, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_024"), y += interligne * 2, width - 50, height, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_025"), y += interligne * 2, width - 50, height * 4, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_026"), y += interligne * 3, width - 50, height * 4, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_027"), y += interligne * 4, width - 50, height * 3, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_028"), y += interligne * 3, width - 50, height * 4, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_029"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_030"), y += interligne * 1.5f, width - 50, height, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_031"), y += interligne, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_032"), y += (interligne * 2), width - 50, height * 5, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_033"), y += (interligne * 4), width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_034"), y += (interligne * 2), width - 50, height * 2, paddingLeft);



            #endregion

            #region Page 5

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_035"), y, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_036"), y += interligne * 1.5f, width - 50, height * 5, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_037"), y += interligne * 3, width - 50, height * 3, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_038"), y += interligne * 3, width - 50, height * 4, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_039"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_040"), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_041"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_042"), y += interligne * 2, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_043"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_044"), y += interligne * 2, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_045"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_046"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_047"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_048"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_049"), y += interligne * 1.5f, width - 50, height, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_050"), y += interligne, width - 50, height, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_051"), y += interligne, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_052"), y += interligne * 1.5f, width - 50, height, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_053"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);


            #endregion

            #region Page 6

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_054"), y, width - 50, height, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_055"), y += interligne, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_056"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_057"), y += interligne * 2.5f, width - 50, height, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_058"), y += interligne, width - 50, height * 2, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_059"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_060"), y += interligne * 1.5f, width - 50, height * 4, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_061"), y += interligne * 3.5f, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_062"), y += interligne * 2.5f, width - 50, height * 2, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_063"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft + 15);
            pdfGen.AddPinkNotesRectangle(y += interligne * 1.5f, paddingLeft + 15, width - 65, 45);
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pFirmInstitution.claimsName) ? pFirmInstitution.claimsName : "", y += 5, width - 65, 40, paddingLeft + 15);
           // string customerAdress = string.Format("{0}\n{1}\n{2}", pCustomer.Adress, pCustomer.ZipCode, pCustomer.City);
            string firmAdress = string.Format("{0}\n{1}\n{2}", pFirmInstitution.FirmStreet, pFirmInstitution.FirmPostCode, pFirmInstitution.FirmCity);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(firmAdress) ? firmAdress : "", y += 5, width - 65, 45, paddingLeft + 20);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_064"), y += (interligne * 2) + 5, width - 50, height * 2, paddingLeft + 15);
            pdfGen.AddPinkNotesRectangle(y += interligne * 1.5f, paddingLeft + 15, width - 65, 40);
            //  pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pFirmInstitution.claimsMail) ? pFirmInstitution.claimsMail : "", y += 5, width - 65, 40, paddingLeft + 15);
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pCustomer.User.UserEmail) ? pCustomer.User.UserEmail : "", y += 5, width - 65, 40, paddingLeft + 15);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pFirmInstitution.E_mail) ? pFirmInstitution.E_mail : "", y += 5, width - 65, 40, paddingLeft + 20);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_065"), y += interligne * 2.5f, width - 50, height * 3, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_066"), y += interligne * 2.5f, width - 50, height * 3, paddingLeft);

            // 
            #endregion

            #region Page 7
            // 
            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_067"), y, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_068"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_069"), y += interligne * 2, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_070"), y += interligne * 2, width - 50, height * 2, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_071"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_072"), y += interligne * 1.5f, width - 50, height * 3, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_073"), y += interligne * 2.5f, width - 50, height * 2, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_074"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_075"), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_076"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_077"), y += interligne * 2.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_078"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_079"), y += interligne * 2f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_080"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_081"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_082"), y += interligne * 1.5f, width - 50, height, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_083"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);


            #endregion

            #region Page 8

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_084"), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_085"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_086"), y += interligne * 2, width, height);

            data = new Dictionary<int, List<string>>();
            data.Add(0, new List<string>());
            data[0].Add(LanguageContentBL.Translate("PdfEngagement_087")); // fait à 
            data[0].Add(" ");

            pdfGen.GeneratePinkTable(data, 0, y += interligne * 2, width, 30, 11, false);

            data = new Dictionary<int, List<string>>();
            data.Add(0, new List<string>());
            data[0].Add(LanguageContentBL.Translate("PdfEngagement_088"));//en
            data[0].Add(" ");
            data[0].Add(LanguageContentBL.Translate("PdfEngagement_089"));

            pdfGen.GeneratePinkTable3cols(data, 0, y += interligne * 3, width, 30, 11, false);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_090"), y += interligne * 2.5f, width - 50, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_091"), y, width - 50, height * 2, paddingLeft * 5);

            data = new Dictionary<int, List<string>>();
            data.Add(0, new List<string>());
            data[0].Add(LanguageContentBL.Translate("PdfEngagement_092"));
            data[0].Add((pCustomer.ConfidentialityAgreement != null && pCustomer.ConfidentialityAgreement.User != null) ? pCustomer.ConfidentialityAgreement.User.EntireName : pCustomer.User1.EntireName);

            data.Add(1, new List<string>());
            data[1].Add(LanguageContentBL.Translate("PdfEngagement_093"));
            data[1].Add(" ");

            data.Add(2, new List<string>());
            data[2].Add(LanguageContentBL.Translate("PdfEngagement_094"));
            data[2].Add(DateTime.Now.ToShortDateString());

            pdfGen.GeneratePinkTable2(data, 0, y += interligne * 1.5f, 230, 100, 11, false);

            data = new Dictionary<int, List<string>>();
            data.Add(0, new List<string>());
            data[0].Add(LanguageContentBL.Translate("PdfEngagement_092"));
            data[0].Add(pCustomer.User.EntireName);

            data.Add(1, new List<string>());
            data[1].Add(LanguageContentBL.Translate("PdfEngagement_093"));
            data[1].Add("");

            data.Add(2, new List<string>());
            data[2].Add(LanguageContentBL.Translate("PdfEngagement_094"));
            data[2].Add(DateTime.Now.ToShortDateString());

            pdfGen.GeneratePinkTable2(data, paddingLeft * 5, y, 230, 100, 11, false);

            float x = 18;
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 6, x, 200, 120);

            if (forceDownload)
            {
                //Ces textes sont automatiques pour la signature en ligne //
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), y + 5, 200, 20, x + 5);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), y + 20, 145, 20, x + 5);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), y + 35, 145, 20, x + 5);
            }

            x = (paddingLeft * 5) + 13;
            pdfGen.AddRecueil_Notes_Rectangle(y, x, 200, 120);

            if (forceDownload)
            {
                //Ces textes sont automatiques pour la signature en ligne
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), y + 5, 200, 20, x + 5);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), y + 20, 145, 20, x + 5);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), y + 35, 145, 20, x + 5);
            }

            #endregion

            if (forceDownload)
            {
                pdfGen.GeneratePdfToWeb("EngagementConfidentialiteSignature.pdf");
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }
            return pdfGen.PageCount;

        }
コード例 #8
0
        public static void GeneratePM_LAB(IDictionary<LABStudy.SectionEnum, LABStudyModel> dicoLABStudyModel, string pathFileName, bool emptyLAB = false)
        {
            float y = 240;
            int height = 20;
            int width = 500;
            float label_width = 200;
            float answer_width = 280;
            float answer_x = 200;
            float tabCheck = 15;

            LABStudyModel labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Client];
            FirmInstitution firmInstitution = labStudyModel.Customer.FirmInstitution;
            var languageData = PageLanguageHelper.GetLanguageContent("User", "LAB_PDF_PM_Report");

            string currentHostCode = Upsilab.Business.Utility.SessionManager.GetHostCodeSession();
            //Title and footer document
            string documentTitle = "Etude LAB";
            string footerContent = firmInstitution.DocumentFooterContent;

            string name = string.Empty;
            string date = string.Empty;
            if (!emptyLAB)
            {
                name = string.Format("{0}", labStudyModel.Customer.CompanyName);
                date = DateTime.Now.ToShortDateString();
            }
            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator();
            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent, name, string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), date));
            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent);
            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator();

            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
                firmInstitution = new FirmInstitution();
                labStudyModel.LABStudy = new LABStudy();
                labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect();
            }

            #region Page 1 : Logo & Title
            //#Page 1 : Title
            //Logo
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName, firmInstitution.LogoAlign);
            pdfGen.AddBackgroungImage();

            y = 390;
            //Title
            // pdfGen.AddReceuil_Title_Center_CalibriBold_Label(languageData.GetContent("Report_Title"), y, width, 100);
            // pdfGen.AddReceuil_SubTitle_Center_CalibriBold_Label(languageData.GetContent("Report_Title2"), y += 90, width, height);
            pdfGen.AddWhiteTitle(languageData.GetContent("Report_Title"), y, 310, 80, 200, 16);
            // pdfGen.AddWhiteTitle(languageData.GetContent("Report_Title2"), y += interline * 3.5f, 200, 20, 300, 20);//clients/prospects
            pdfGen.AddWhiteTitle(languageData.GetContent("Report_Title2"), y += interline * 5f, 510, 20, 0, 12);

            pdfGen.AddWhiteBorder(y += interline * 1.7f, 195, 315, 70);
            if (emptyLAB)
            {
                //string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), ""),
                //                       string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), "") };
                //pdfGen.AddTableTitle(rowContents, 110, y += 40);
            }
            else
            {
                //string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), labStudyModel.LABStudy.DateUpdated.HasValue ? labStudyModel.LABStudy.DateUpdated.Value.ToShortDateString() : labStudyModel.LABStudy.DateCreated.ToShortDateString()),
                //                       string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), labStudyModel.LABStudy.idLABStudy) };
                //pdfGen.AddTableTitle(rowContents, 110, y += 40);
                pdfGen.AddWhiteTitleLeft(DateTime.Now.ToShortDateString(), y += 10, width + 10, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(name, y += (interline), width + 10, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(string.Format("{0}-{1}", languageData.GetContent("Report_Title_Reference"), labStudyModel.LABStudy.idLABStudy), y += (interline), width + 10, 11, 220, 10);
            }
            #endregion

            #region Page identification etablissement
            var languageDataPM = PageLanguageHelper.GetLanguageContent("User", "PDF_PM_Report");
            var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP");
            pdfGen.CreatePage();
            y = 0;


            pdfGen.AddTitle(languageDataPM.GetContent("Page1_Section1_Title"), 0, 500, 20);

            pdfGen.AddDefaultText(languageDataPM.GetContent("Page1_Section1_NameOfEstablishement"), y = y + (interline * 2), label_width, height);
            pdfGen.AddAnswer(firmInstitution.FirmInstitutionName, y, answer_width, height, answer_x);

            pdfGen.AddDefaultText(languageDataPM.GetContent("Page1_Section1_Name"), y += interline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.LeaderName, y, answer_width, height, answer_x);

            pdfGen.AddDefaultText(languageDataPM.GetContent("Page1_Section1_FirstName"), y += interline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.LeaderFirstName, y, answer_width, height, answer_x);


            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.FR.ToString())
            {
                pdfGen.AddDefaultText(languageDataPM.GetContent("Page1_Section1_RCS"), y += interline, label_width, height);
                pdfGen.AddAnswer(firmInstitution.RCS, y, answer_width, height, answer_x);
                //y = 165;
            }
            else
            {
                //Numéro d'entreprise : 
                pdfGen.AddDefaultText(languageDataPM.GetContent("Page1_Section1_RCS"), y += interline, label_width, height);
                pdfGen.AddAnswer(firmInstitution.RegisteredInRegister, y, answer_width, height, answer_x);

                //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format("{0} {1}", languageData.GetContent("Page1_Section1_769"), firmInstitution.RCS), 165, 600, 20, 300);//Numéro FSMA :
                var optionValue = Business.Configuration.FirmInstitutionOptionBL.GetFirmInstitutionOptionAttributeValueByFirmAndIdOptionAttribute(firmInstitution.idFirmInstitution, 1);
                var optFSMA = string.Empty;
                if (optionValue != null)
                    optFSMA = Convert.ToString(optionValue.Value);
                // pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format("{0} {1}", languageData.GetContent("Page1_Section1_769"), optFSMA), 165, 600, 20, 300);//Numéro FSMA :
                pdfGen.AddDefaultText(languageDataPM.GetContent("Page1_Section1_769"), y += interline, label_width, height);
                pdfGen.AddAnswer(optFSMA, y, answer_width, height, answer_x);
                // y = 180;
            }
            //  pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page1_Section1_RCS"), firmInstitution.RCS), 165, 500, 20, 0, 10);
            // pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} {1}", languageData.GetContent("Page1_Section1_769"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 769))), 165, 600, 20, 300);
            // pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page1_Section1_StreetAddress"), firmInstitution.FirmStreet), 180, 500, 20, 0, 10);
            pdfGen.AddDefaultText(languageDataPM.GetContent("Page1_Section1_StreetAddress"), y += interline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.FirmStreet, y, answer_width, height, answer_x);

            // pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page1_Section1_PostalCode"), firmInstitution.FirmPostCode), 195, 500, 20, 0, 10);
            pdfGen.AddDefaultText(languageDataPM.GetContent("Page1_Section1_PostalCode"), y += interline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.FirmPostCode, y, answer_width, height, answer_x);

            //   pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page1_Section1_City"), firmInstitution.FirmCity), 210, 500, 20, 0, 10);
            pdfGen.AddDefaultText(languageDataPM.GetContent("Page1_Section1_City"), y += interline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.FirmCity, y, answer_width, height, answer_x);

            #region Conseiller signataire
            string signataireFirstName = string.Empty;
            string signataireName = string.Empty;



            Data.Model.User userAdviser = labStudyModel.Customer.User1;// (report.User != null) ? report.User : report.CustomerProspect.User1;

            if (!string.IsNullOrEmpty(userAdviser.UserFirstName))
            {
                signataireFirstName = userAdviser.UserFirstName;
            }

            if (!string.IsNullOrEmpty(userAdviser.UserName))
            {
                signataireName = userAdviser.UserName;
            }


            pdfGen.AddDefaultText(String.Format(languageDataPP.GetContent("PdfReportPP_753"), string.Empty, string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(String.Format("{0} {1} {2}", signataireFirstName, signataireName, " (signataire)"), y, answer_width, height, answer_x);


            #endregion

            #endregion

            #region Page 2 : Client : I. identité du client
            //#Page 2 : Client : I. identité du client
            pdfGen.CreatePage();

            y = 0;
            pdfGen.AddTitle(languageData.GetContent("Page2_Title"), y, width, 20);

            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y += interline * 1.5f, 0, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section1_Line1"), y, width, 20, tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y += interline, 0, Boolean.TrueString);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section1_Line2"), y, width, 20, tabCheck);

            pdfGen.AddSubtitle(languageData.GetContent("Page2_Section2_Title"), y += interline * 2f, width, 20);

            //Identité
            // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line1"), labStudyModel.Customer.CompanyName), y += interline, width, height); //Raison sociale
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line1"), string.Empty), y += interline * 1.5f, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.CompanyName, y, answer_width, 20, answer_x);

            // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line2"), labStudyModel.Customer.Sigle), 0, y += interline, width, height); //Sigle
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line2"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.Sigle, y, answer_width, 20, answer_x);

            // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line3"), labStudyModel.Customer.NumRCS), 0, y += interline, width, height); //RCS
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line3"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.NumRCS, y, answer_width, 20, answer_x);

            if (currentHostCode != Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line4"), labStudyModel.Customer.CityRegistration), 0, y += interline, width, height); //Ville d'enregistrement
                pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line4"), string.Empty), y += interline, label_width, height);
                pdfGen.AddAnswer(labStudyModel.Customer.CityRegistration, y, answer_width, 20, answer_x);

                //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line5"), labStudyModel.Customer.NumSIREN), 0, y += interline, width, height); //Siren
                pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line5"), string.Empty), y += interline, label_width, height);
                pdfGen.AddAnswer(labStudyModel.Customer.NumSIREN, y, answer_width, 20, answer_x);

                string dateImatr = (labStudyModel.Customer.DateRegistration.HasValue) ? labStudyModel.Customer.DateRegistration.Value.ToString("dd/MM/yyyy") : string.Empty; //Date immatriculation
                // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line6"), dateImatr), 0, y += interline, width, height);
                pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line6"), string.Empty), y += interline, label_width, height);
                pdfGen.AddAnswer(dateImatr, y, answer_width, 20, answer_x);
            }

            //Adresse
            // pdfGen.AddDefaultText(string.Format("{0} : ", languageData.GetContent("Page2_Section2_Line22")), 0, y += interline, width, height);
            //pdfGen.AddDefaultText(string.Format("{0}", labStudyModel.Customer.Adress), 10, y += interline, width, 3 * height);
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line22"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.Adress, y, answer_width, height * 3, answer_x);

            //ZipCode
            //  pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("PDF_LAB_PM_Page2_ZipCode"), labStudyModel.Customer.ZipCode), y += interline * 2.8f, width, height);
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("PDF_LAB_PM_Page2_ZipCode"), string.Empty), y += interline * 2.8f, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.ZipCode, y, answer_width, 20, answer_x);

            //City
            // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("PDF_LAB_PM_Page2_Country"), labStudyModel.Customer.City), 0, y += interline, width, height);
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("PDF_LAB_PM_Page2_Country"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.City, y, answer_width, 20, answer_x);

            //Tel
            // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line23"), labStudyModel.Customer.User.UserMobilePhone), 0, y += interline, width, height);
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line23"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.User.UserMobilePhone, y, answer_width, 20, answer_x);

            //Fax
            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("PDF_LAB_PM_Fax"), labStudyModel.Customer.Fax), 0, y += interline, width, height);
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("PDF_LAB_PM_Fax"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.Fax, y, answer_width, 20, answer_x);

            //Mail
            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line24"), labStudyModel.Customer.User.UserEmail), 0, y += interline, width, height);
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line24"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.User.UserEmail, y, answer_width, 20, answer_x);

            //Domiciliation
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsResident, y += 20, 0, Boolean.TrueString); //Resident
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line16_Item1"), y, width, height, tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsResident, y, 150, Boolean.FalseString); //Non resident
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line16_Item2"), y, width, height, 165);
            pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line17"), labStudyModel.Customer.Country), y += interline, width, height); //Pays de domiciliation
            // pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line17"), string.Empty), y += interline, label_width, height);
            // pdfGen.AddAnswer(labStudyModel.Customer.Country, y, answer_width, 20, answer_x);

            pdfGen.AddBlueBorder(y += interline, 70, width - 100, 105);
            float x = 80;
            //GAFI
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line18"), y += interline, width - 120, height, x);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line19"), y += interline, width - 120, height, x);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Gafi, y += interline, x += 10, Boolean.TrueString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, width, height, x += tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Gafi, y, x += 30, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, width, height, x += tabCheck);

            x = 80;
            //Offshore
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line20"), y += interline, width - 120, height, x);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line21"), y += interline, width - 120, height, x);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.OffShore, y += interline, x += 10, Boolean.TrueString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, width, height, x += tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.OffShore, y, x += 30, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, width, height, x += tabCheck);

            //Forme juridique
            pdfGen.AddDefaultText(String.Format(@"{0} :", languageData.GetContent("Page2_Section2_Line7")), y += 30, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "SA"); //SA
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line8"), y, width, height, tabCheck);
            if (currentHostCode != Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "SAS"); //SAS
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line9"), y, width, height, tabCheck);
            }
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "SARL"); //SARL TODO pour BE
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line10"), y, width, height, tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "EURL"); //EURL
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line11"), y, width, height, tabCheck);

            if (currentHostCode != Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                if (labStudyModel.Customer.LegalForm == "SC_IS")
                    pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "SC_IS"); //Societe civile
                else
                    pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "SC_IR"); //Societe civile

                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line12"), y, width, height, tabCheck);
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y, 300, "SC_IS"); //Societe civile IS
                pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_IS"), y, width, height, 315);
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y, 340, "SC_IR"); //Sociente civile IR
                pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_IR"), y, width, height, 355);
            }

            //Association
            if (labStudyModel.Customer.LegalForm == "Association_IS")
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "Association_IS");
            else
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "Association_IR");

            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line13"), y, width, height, tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y, 300, "Association_IS");
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_IS"), y, width, height, 315);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y, 340, "Association_IR");
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_IR"), y, width, height, 355);

            //Autre
            if (labStudyModel.Customer.LegalForm == "Autre_IS")
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "Autre_IS");
            else
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "Autre_IR");

            pdfGen.AddDefaultText(string.Format("{0} {1}", languageData.GetContent("Page2_Section2_Line14"), labStudyModel.GetOptionAttributeValue(731, 522)), y, width, height, tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y, 300, "Autre_IS");
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_IS"), y, width, height, 315);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y, 340, "Autre_IR");
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_IR"), y, width, height, 355);

            //Appartenance à un groupe
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalForm, y += interline, 0, "Appartenance");
            pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line15"), labStudyModel.Customer.LegalForm_Appartenance_Groupe), y, width, height, tabCheck);


            //Societe cotée
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line25"), y += 30, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.ListedCompany, y += interline, 0, Boolean.TrueString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, width, height, tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.ListedCompany, y, 50, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, width, height, 50 + tabCheck);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line26"), labStudyModel.Customer.Market), 0, y += 20, width, height); //Sur quel marché
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line26"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.Market, y, answer_width, 20, answer_x);
            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line27"), labStudyModel.GetOptionAttributeValue(746, 529)), 0, y += interline, width, height);
            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line28"), labStudyModel.GetOptionAttributeValue(746, 530)), 0, y += interline, width, height);
            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line29"), labStudyModel.GetOptionAttributeValue(746, 531)), 0, y += interline, width, height);
            #endregion

            #region Page 3 : Secteur d'activités
            pdfGen.CreatePage();

            y = 0;
            //Secteur d'activités
            pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line30"), labStudyModel.Customer.Industry), y += 30, width, height); //Secteur d'activite
            pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line31"), labStudyModel.Customer.OtherIndustry), y += 15, width, height); //Autre secteur
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line32"), y += interline, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.HasIndustryRestriction, y += interline, 0, Boolean.TrueString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, width, height, tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.HasIndustryRestriction, y, 50, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, width, height, 50 + tabCheck);

            // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line33"), labStudyModel.Customer.IndustryRestriction), y += interline, width, height * 2); //Restriction
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line33"), string.Empty), y += interline, label_width / 2, height);
            pdfGen.AddAnswer(labStudyModel.Customer.IndustryRestriction, y, answer_width, height * 3, answer_x / 2);

            x = 0;
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line34"), y += interline * 3, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.RestrictionPreventInvest, y += interline, x, Boolean.TrueString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, width, height, x + tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.RestrictionPreventInvest, y, x = 50, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, width, height, x + tabCheck);
            #endregion

            #region Page 4 : Client : II. Personne Morale
            //#Page 3 : Client : II. Personne Morale
            pdfGen.CreatePage();

            y = 0;
            pdfGen.AddSubtitle(languageData.GetContent("Page3_Section1_Title"), y += interline * 2, width, height);

            string[] tableRiskVigilanceYesNo_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No") };
            string[] tableRiskVigilanceYesNoIDK_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No"), languageData.GetContent("TableRiskVigilanceYesNo_Item3") };

            LABAnswer labAnswer = labStudyModel.GetAnswerByIdQuestion(9);
            string[] answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line8"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(10);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line9"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(2);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line1"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(3);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line2"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(4);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line3"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(5);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line4"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(6);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line5"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(7);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line6"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);


            //Create new page
            pdfGen.CreatePage();
            y = 0;

            labAnswer = labStudyModel.GetAnswerByIdQuestion(16);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line7"), y, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            #endregion

            #region Page 5 : Client : III. Facteurs de risque aggravé
            //#Page 4 : Client : III. Facteurs de risque aggravé
            //pdfGen.CreatePage();
            pdfGen.AddSubtitle(languageData.GetContent("Page4_Section1_Title"), y += interline * 2, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(17);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line1"), y += interline * 2, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(18);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line2"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(19);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line3"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(20);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line4"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(21);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line5"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(24);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line8"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(22);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line6"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(23);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line7"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //Create new page
            pdfGen.CreatePage();
            y = 0;

            labAnswer = labStudyModel.GetAnswerByIdQuestion(51);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line9"), y, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 6 : Client : IV. Risques fiscaux
            //#Page 5 : Client : IV. Risques fiscaux
            //pdfGen.CreatePage();

            pdfGen.AddSubtitle(languageData.GetContent("Page5_Section1_Title"), y += interline * 3, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(25);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line1"), y += interline * 2, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(26);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line2"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(27);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line3"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(28);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line4"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(29);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line5"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(30);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line6"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(32);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line8"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 7 : Produit : V. L'environnement et les caractéristiques du produit
            //#Page 6 : Produit : V. L'environnement et les caractéristiques du produit
            pdfGen.CreatePage();

            labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Product];
            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
            }

            y = 0;
            pdfGen.AddTitle(languageData.GetContent("Page6_Section1_Title"), y, width, 20);

            pdfGen.AddSubtitle(languageData.GetContent("Page6_Section1_Title2"), y += interline * 2, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(34);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line1"), y += interline * 2, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(35);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line2"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(36);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line3"), y += interline * 3, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(38);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line5"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(39);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line6"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(40);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line7"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(41);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line8"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(42);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line9"), y += interline * 3, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 8 : Produit : V. L'environnement et les caractéristiques du produit
            //#Page 7 : Produit : V. L'environnement et les caractéristiques du produit
            pdfGen.CreatePage();

            y = 0;
            labAnswer = labStudyModel.GetAnswerByIdQuestion(43);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line1"), y, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(44);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line2"), y += interline * 3, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(45);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line3"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(46);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line4"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 9 : Operation : VI. Risques généraux - Risques fiscaux
            //#Page 8 : Operation : VI. Risques généraux / fiscaux
            pdfGen.CreatePage();

            labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Operation];
            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
                firmInstitution = new FirmInstitution();
                labStudyModel.LABStudy = new LABStudy();
                labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect();
            }

            y = 0;
            pdfGen.AddTitle(languageData.GetContent("Page8_Section1_Title"), y, width, 20);

            pdfGen.AddSubtitle(languageData.GetContent("Page8_Section1_Title2"), y += interline * 2, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(49);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line2"), y += interline * 2, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(50);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line3"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            //VII. Risques liés à la distribution des fonds gérés par les sociétés de gestion
            pdfGen.AddSubtitle(languageData.GetContent("Page9_Section1_Title"), y += 5 * height, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(57);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section1_Line3"), y += interline * 2, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(58);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section1_Line4"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 10 : NIVEAU DE RISQUE GLOBAL DU CLIENT
            //#Page 9 : NIVEAU DE RISQUE GLOBAL DU CLIENT            
            pdfGen.CreatePage();

            y = 0;
            //NIVEAU DE RISQUE GLOBAL DU CLIENT            
            pdfGen.AddTitle(languageData.GetContent("Page9_Section2_Title"), y, width, 20);

            string dateUpdated = (labStudyModel.LABStudy.DateUpdated.HasValue) ? labStudyModel.LABStudy.DateUpdated.Value.ToString("dd/MM/yyyy") : labStudyModel.LABStudy.DateCreated.ToString("dd/MM/yyyy");
            string idGlobalRisk = labStudyModel.LABStudy.idRisk.ToString();
            string idGlobalVigilance = labStudyModel.LABStudy.idVigilance.ToString();

            pdfGen.AddDefaultText(string.Format("{0} {1}", languageData.GetContent("Page9_Section2_Line1"), dateUpdated), y += interline * 2, width, height);


            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y += interline, 0, "1");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line2"), y, width, height, tabCheck);

            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y += interline, 0, "2");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line3"), y, width, height, tabCheck);

            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y += interline, 0, "3");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line4"), y, width, height, tabCheck);

            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y += interline, 0, "4");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line5"), y, width, height, tabCheck);

            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y += interline, 0, "5");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line6"), y, width, height, tabCheck);

            //NIVEAU DE VIGILANCE GLOBAL DU CLIENT
            y += 60;
            pdfGen.AddTitle(languageData.GetContent("Page9_Section3_Title"), y, width, 20);

            pdfGen.AddDefaultText(string.Format("{0} {1}", languageData.GetContent("Page9_Section3_Line1"), dateUpdated), y += 2 * interline, width, height);

            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y += interline, 0, "1");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line2"), y, width, height, tabCheck);

            if (currentHostCode != Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {

                pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y += interline, 0, "2");
                pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line3"), y, width, height, tabCheck);
            }

            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y += interline, 0, "3");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line4"), y, width, height, tabCheck);

            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y += interline, 0, "4");
            if (currentHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line5"), y, width, height * 2, tabCheck);
                //y += 20 * 2;
            }
            else
            {
                pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line5"), y, width, height, tabCheck);
                //y += 20;
            }

            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y += interline, 0, "5");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line6"), y, width, height, tabCheck);
            #endregion

            //Force download if pathFileName is not set
            if (string.IsNullOrEmpty(pathFileName))
            {
                pdfGen.GeneratePdfToWeb("LAB_PM.pdf");
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }
        }
コード例 #9
0
        public static int GeneratePresentation(FirmInstitution pFirm, string pathFileName, bool forceDownload)
        {
            float y = 240;
            int height = 20;
            int width = 500;
            int interligne = 15;
            int paddingLeft = 40;
            int paddingLeft20 = 20;

            float label_width = 200;
            float answer_width = 280;
            float answer_x = 200;

            List<FirmInstitutionOptionAttributeValue> lstOptionAttributeValue = FirmInstitutionOptionBL.GetFirmInstitutionOptionAttributeValueByFirm(pFirm.idFirmInstitution);
            List<FirmInstitutionOptionValue> lstOptionValue = FirmInstitutionOptionBL.GetFirmInstitutionOptionValueByFirm(pFirm.idFirmInstitution);

            //Title and footer document
            string documentTitle = "Présentation de l'établissement";
            string footerContent = pFirm.DocumentFooterContent;

            string userName = "******"; //Presentation de l'etab pas de user name ?
            string date = DateTime.Now.ToShortDateString();

            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent);
            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent, userName, string.Format("{0} {1}", LanguageContentBL.Translate("PdfReportPP_004"), date));

            #region Page 1
            //Background image
            pdfGen.AddBackgroungImage();

            //Logo
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(pFirm.idFirmInstitution) + pFirm.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName, pFirm.LogoAlign);

            //Title
            //pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfFirm_001"), y, width, 100);

            //string[] rowContents = { string.Format("{0} {1}",LanguageContentBL.Translate("PdfReportPP_004"), DateTime.Now.ToShortDateString()),//Le
            //                           string.Format("{0} BS-{1}",LanguageContentBL.Translate("PdfFirm_082"),pFirm.idFirmInstitution) };
            //pdfGen.LM_AddTableTitle(rowContents, 90, y += 60);

            y = 380;
            pdfGen.AddWhiteTitle(LanguageContentBL.Translate("PdfFirm_001").ToUpper(), y, 240, 60, 260, 20);

            pdfGen.AddWhiteBorder(y += (3 * interligne) + 15, 210, 290, 70);
            if (!forceDownload)
                pdfGen.AddWhiteTitleLeft(DateTime.Now.ToShortDateString(), y += 20, 500, 11, 220, 10);
            pdfGen.AddWhiteTitleLeft(string.Format("BS-{0}", pFirm.idFirmInstitution), y += (interligne), 500, 11, 220, 10);

            #endregion

            #region Page 2

            pdfGen.CreatePage();
            y = 0;

            #region "Etablissement"
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_002"), pFirm.FirmInstitutionName), y, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_002"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.FirmInstitutionName, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_003"), pFirm.ShareCapital), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_003"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.ShareCapital, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_004"), pFirm.NAF_APE), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_004"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.NAF_APE, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_005"), pFirm.RCS), y += interligne, width, height);
           
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_005"), string.Empty), y += interligne, label_width, height);
            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
                pdfGen.AddAnswer(pFirm.RCS, y, answer_width, height, answer_x);
            else
                pdfGen.AddAnswer(pFirm.RegisteredInRegister, y, answer_width, height, answer_x);

            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_006"), pFirm.SIRET), y += interligne, width, height);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_006"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer(pFirm.SIRET, y, answer_width, height, answer_x);

                //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_007"), pFirm.SIREN), y += interligne, width, height);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_007"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer(pFirm.SIREN, y, answer_width, height, answer_x);
            }

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_008"), pFirm.FirmStreet), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_008"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.FirmStreet, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_009"), pFirm.FirmPostCode), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_009"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.FirmPostCode, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_010"), pFirm.FirmCity), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_010"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.FirmCity, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_011"), pFirm.E_mail), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_011"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.E_mail, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_012"), pFirm.FirmPhone), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_012"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.FirmPhone, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_013"), pFirm.Fax), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_013"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.Fax, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_014"), pFirm.Website), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_014"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.Website, y, answer_width, height, answer_x);

            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_015")), y += interligne * 2, width, height);
            }
            #endregion

            #region Dirigeant / formation / cursus
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfFirm_016"), y += interligne * 2, width, height);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_017"), pFirm.LeaderName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_017"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.LeaderName, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_018"), pFirm.LeaderFirstName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_018"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.LeaderFirstName, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_019"), pFirm.LeaderBirthDay), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_019"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer((pFirm.LeaderBirthDay.HasValue) ? pFirm.LeaderBirthDay.Value.ToString("dd/MM/yyyy") : string.Empty, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_020"), pFirm.LeaderPlaceOfBirth), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_020"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.LeaderPlaceOfBirth, y, answer_width, height, answer_x);

            //Formation des dirigeants CIF
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfFirm_021"), y += interligne * 2, width, height);
            pdfGen.AddDefaultText(pFirm.LeaderFormation, y += interligne, width, height * 2);

            //Cursus des dirigeants CIF
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfFirm_022"), y += interligne * 2.5f, width, height);
            pdfGen.AddDefaultText(pFirm.LeaderCursusProfessional, y += interligne, width, height * 2);
            #endregion

            #region Methode de travail
            //Exposé complet de la méthode de travail utilisé
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfFirm_022_0"), y += interligne * 2.5f, width, height);
            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfFirm_022_1"), y += interligne, width, height * 2);
            }

            pdfGen.AddBlueBorder(y += (2 * interligne), 0, width, 150);
            pdfGen.AddDefaultText(pFirm.TeamWorkMethod, y + 5, 480, 150, 10);
            #endregion
            #endregion

            #region Page 3

            pdfGen.CreatePage();
            y = 0;

            #region Equipe et organisation
            //Presentation de l'equipe
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfFirm_022_3"), y, width, height);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfFirm_022_4"), y += interligne, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 150);
            pdfGen.AddDefaultText(pFirm.TeamPresentation, y + 5, 480, 150, 10);

            //Organisation professionnelle
            y += 150;
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfFirm_023"), y += interligne * 2f, width, height);

            var _association = FirmInstitutionBL.GetFirmInstitutionProfessionalAssociation(pFirm.idFirmInstitution);
            var _types = FirmInstitutionBL.GetProfessionalAssociationType();
            var _type = (_types != null && _association != null) ? _types.Where(ass => ass.idProfessionalAssociation == _association.idProfessionalAssociation).FirstOrDefault() : null;

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_024"), _type != null ? _type.Name : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_024"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(_type != null ? _type.Name : string.Empty, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_025"), _association != null ? _association.MembershipNumber : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_025"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(_association != null ? _association.MembershipNumber : string.Empty, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_026"), _association != null ? _association.HeadquartersAddress : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_026"), string.Empty), y += interligne + 10, label_width, height);
            pdfGen.AddAnswer(_association != null ? _association.HeadquartersAddress : string.Empty, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_027"), _association != null ? _association.PostCode : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_027"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(_association != null ? _association.PostCode : string.Empty, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_028"), _association != null ? _association.City : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_028"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(_association != null ? _association.City : string.Empty, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_029"), _association != null ? _association.Website : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_029"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(_association != null ? _association.Website : string.Empty, y, answer_width, height, answer_x);

            #endregion

            #region Metiers
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfFirm_030"), y += interligne * 2f, width, height);//Métiers

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_031"), GetOptionAttributeValue(lstOptionAttributeValue, 1)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_031"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 1), y, answer_width, height, answer_x);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_032")), y += interligne * 2, width, height * 2);

            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_033")), y += interligne * 2.5f, width, height);

            //CGP
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 3), y += interligne * 2f, 0);//Conseil en Gestion de Patrimoine (CGP)
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_034")), y, width, height, 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 4), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_035")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 5), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_036")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 6), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_037")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 7), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_038")), y, width, height, paddingLeft + 15);

            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 1243), y += interligne, paddingLeft);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_Agent_lie")), y, width, height, paddingLeft + 15);
            }
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 8), y += interligne, paddingLeft);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_039")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 9), y += interligne, paddingLeft);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_040")), y, width, height, paddingLeft + 15);

            //SDG
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 10), y += interligne * 1.5f, 0); //Société de gestion ---- Banque(BE)
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_041")), y, width, height, 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 11), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_035")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 12), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_036")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 13), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_037")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 14), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_Agent_lie")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 15), y += interligne, paddingLeft);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_039")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 16), y += interligne, paddingLeft);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_040")), y, width, height, paddingLeft + 15);
            #endregion

            #endregion

            #region Page 4

            pdfGen.CreatePage();
            y = 0;

            #region Metiers
            //Banque
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 17), y, 0); //Banque ---- Société de gestion de portefeuille et de conseil en investissement
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_042")), y, width, height, 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 18), y += interligne, paddingLeft);
            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_bank_privee")), y, width, height, paddingLeft + 15);
            }
            else
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_035")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 19), y += interligne, paddingLeft);
            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_bank_privee")), y, width, height, paddingLeft + 15);
            }
            else
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_036")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 20), y += interligne, paddingLeft);
            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_family")), y, width, height, paddingLeft + 15);
            }
            else
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_gestionnaire")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 21), y += interligne, paddingLeft);
            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_ste_bourse")), y, width, height, paddingLeft + 15);
            }
            else
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_038")), y, width, height, paddingLeft + 15);

            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 22), y += interligne, paddingLeft);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_039")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 23), y += interligne, paddingLeft);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_040")), y, width, height, paddingLeft + 15);

            //Prestataire de service en investissement ---- 	Planificateur Financier Indépendant
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 24), y += interligne * 1.5f, 0);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_043")), y, width, height, 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 25), y += interligne, paddingLeft);
            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_agent_bank")), y, width, height, paddingLeft + 15);
            }
            else
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_035")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 26), y += interligne, paddingLeft);
            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_intermediaire_ass")), y, width, height, paddingLeft + 15);
            }
            else
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_036")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 27), y += interligne, paddingLeft);
            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_Agent_lie")), y, width, height, paddingLeft + 15);
            }
            else
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_037")), y, width, height, paddingLeft + 15);

            if (Business.Utility.ConfigurationManager.ExtranetHostCode != Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 28), y += interligne, paddingLeft);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_038")), y, width, height, paddingLeft + 15);
            }

            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 29), y += interligne, paddingLeft);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_039")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 30), y += interligne, paddingLeft);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_040")), y, width, height, paddingLeft + 15);

            //Agent lié
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 31), y += interligne * 1.5f, 0);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_044")), y, width, height, 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 32), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_045")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 33), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_046")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 34), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_047")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 35), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_048")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 36), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_049")), y, width, height, paddingLeft + 15);

            if (Business.Utility.ConfigurationManager.ExtranetHostCode != Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 1140), y += interligne, paddingLeft);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_050")), y, width, height, paddingLeft + 15);
            }

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 37), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_051")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 38), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_052")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 39), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_053")), y, width, height, paddingLeft + 15);
            #endregion

            #region Type d'investissement
            //Types d'investissements
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfFirm_054"), y += (2 * interligne), width, height);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_055")), y += interligne, width, height);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 78), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_056")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 79), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_057")), y, width, height, paddingLeft + 15);

            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 80), y += interligne, paddingLeft);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_058")), y, width, height, paddingLeft + 15);
            }

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 81), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_059")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 82), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_060")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 83), y += interligne, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_061")), y, width, height, paddingLeft + 15);

            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 1242), y += interligne, paddingLeft);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_metaux")), y, width, height, paddingLeft + 15);
            }
            else
            {
                string val = GetOptionAttributeValue(lstOptionAttributeValue, 62);
                if (string.IsNullOrEmpty(val) || (!string.IsNullOrEmpty(val) && val.Trim().Length == 0))
                    val = null;
                PlotBooleanValue(pdfGen, val, y += interligne, paddingLeft);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_062"), val), y, width, height, paddingLeft + 15);
            }
            #endregion

            #endregion

            #region Page 5

            pdfGen.CreatePage();
            y = 0;

            #region Immatriculations
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfFirm_063"), y, width, height);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_064"), pFirm.RCS), y += interligne, width, height, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_064"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.RCS, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_065"), pFirm.RegisteredInRegister), y += interligne, width, height, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_065"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.RegisteredInRegister, y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_066"), GetOptionAttributeValue(lstOptionAttributeValue, 1)), y += interligne, width, height, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_066"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 1), y, answer_width, height, answer_x);


            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_067"), GetOptionAttributeValue(lstOptionAttributeValue, 2)), y += interligne, width, height, paddingLeft);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_067"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 2), y, answer_width, height, answer_x);

                //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_068"), GetOptionAttributeValue(lstOptionAttributeValue, 5)), y += interligne, width, height, paddingLeft);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_068"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 5), y, answer_width, height, answer_x);

            }

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_069"), GetOptionAttributeValue(lstOptionAttributeValue, 720)), y += interligne, width, height, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_069"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 720), y, answer_width, height, answer_x);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 66), y += interligne, 10);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_070")), y, width, height, 25);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 67), y += interligne, 10);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_071")), y, width, height, 25);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_072"), GetOptionAttributeValue(lstOptionAttributeValue, 51)), y += interligne, width, height, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_072"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 51), y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_073"), GetOptionAttributeValue(lstOptionAttributeValue, 47)), y += interligne, width, height, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_073"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 47), y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_074"), GetOptionAttributeValue(lstOptionAttributeValue, 48)), y += interligne, width, height, paddingLeft + 10);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_074"), string.Empty), y += interligne, label_width, height, 10);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 48), y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_075"), GetOptionAttributeValue(lstOptionAttributeValue, 49)), y += interligne, width, height, paddingLeft + 10);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_075"), string.Empty), y += interligne, label_width, height, 10);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 49), y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfFirm_076"), GetOptionAttributeValue(lstOptionAttributeValue, 53)), y += interligne, width, height, paddingLeft);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_076"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 53), y, answer_width, height, answer_x);

            #endregion

            #region Agrégateur
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfFirm_077"), y += interligne * 2, width, height);

            PlotBooleanValue(pdfGen, pFirm.Agregateur.HasValue ? pFirm.Agregateur.Value.ToString().ToLower() : "", y += interligne, paddingLeft20 + 10, "true");
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfReportPP_Yes")), y, width, height, paddingLeft20 + 25);

            PlotBooleanValue(pdfGen, pFirm.Agregateur.HasValue ? pFirm.Agregateur.Value.ToString().ToLower() : "", y, paddingLeft20 + 50, "false");
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfReportPP_No")), y, width, height, paddingLeft20 + 65);


            if (Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                bool isAMC = !string.IsNullOrEmpty(pFirm.AgregateurNoms) && pFirm.AgregateurNoms.Contains(LanguageContentBL.Translate("PdfFirm_078"));
                bool isFractal = !string.IsNullOrEmpty(pFirm.AgregateurNoms) && pFirm.AgregateurNoms.Contains(LanguageContentBL.Translate("PdfFirm_079"));
                bool isMany = !string.IsNullOrEmpty(pFirm.AgregateurNoms) && pFirm.AgregateurNoms.Contains(LanguageContentBL.Translate("PdfFirm_080"));
                bool isOs2 = !string.IsNullOrEmpty(pFirm.AgregateurNoms) && pFirm.AgregateurNoms.Contains(LanguageContentBL.Translate("PdfFirm_081"));

                PlotBooleanValue(pdfGen, isAMC.ToString().ToLower(), y += interligne * 2, paddingLeft20 + 10, "true");
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_078")), y, width, height, paddingLeft20 + 25);

                PlotBooleanValue(pdfGen, isFractal.ToString().ToLower(), y += interligne, paddingLeft20 + 10, "true");
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_079")), y, width, height, paddingLeft20 + 25);

                PlotBooleanValue(pdfGen, isMany.ToString().ToLower(), y += interligne, paddingLeft20 + 10, "true");
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_080")), y, width, height, paddingLeft20 + 25);

                PlotBooleanValue(pdfGen, isOs2.ToString().ToLower(), y += interligne, paddingLeft20 + 10, "true");
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_081")), y, width, height, paddingLeft20 + 25);
            }
            else
            {
                bool isBrocam = !string.IsNullOrEmpty(pFirm.AgregateurNoms) && pFirm.AgregateurNoms.Contains(LanguageContentBL.Translate("PdfFirm_bro"));
                bool isPortima = !string.IsNullOrEmpty(pFirm.AgregateurNoms) && pFirm.AgregateurNoms.Contains(LanguageContentBL.Translate("PdfFirm_port"));

                PlotBooleanValue(pdfGen, isBrocam.ToString().ToLower(), y += interligne, paddingLeft20 + 10, "true");
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_bro")), y, width, height, paddingLeft20 + 25);

                PlotBooleanValue(pdfGen, isPortima.ToString().ToLower(), y += interligne, paddingLeft20 + 10, "true");
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_port")), y, width, height, paddingLeft20 + 25);
            }
            #endregion


            #endregion

            #region Page 6
            pdfGen.CreatePage();

            //Signature
            pdfGen.AddTitle(LanguageContentBL.Translate("Pdf_Signature"), 0);

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("Pdf_Signature_Etabs"), 100, 500, 20, 80);
            pdfGen.AddBlueBorder(130, 35, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 40);//J'ai lu et j'accepte les conditions générales.
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 40);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 40);
            }

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("Pdf_Signature_Client"), 100, 500, 20, 340);
            pdfGen.AddBlueBorder(130, 280, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 285);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 285);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 285);
            }

            #endregion

            //Force download if pathFileName is not set
            if (forceDownload)
            {
                string fileName = string.Format("Presentation_etablissement_{0}.pdf", pFirm.idFirmInstitution);
                pdfGen.GeneratePdfToWeb(fileName);
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }
            return pdfGen.PageCount;
        }
コード例 #10
0
        public static byte[] GenerateVigilanceMeasure(Data.Model.VigilanceMeasure vigilanceMeasure)
        {

            //#Page 1 : Title
            float y = 250;
            int height = 20;
            int width = 500;

            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator();

            //Get LAB
            LABStudy labStudy = LABStudyBL.GetLABStudyByIdLABStudy(vigilanceMeasure.idLABStudy);
            FirmInstitution firmInstitution = labStudy.CustomerProspect.FirmInstitution;

            var languageData = PageLanguageHelper.GetLanguageContent("User", "VigilanceMeasurePDF");

            #region Page 1 : Logo & Title
            //Logo
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName, firmInstitution.LogoAlign);

            //Title
            pdfGen.AddReceuil_Title_Center_CalibriBold_Label(languageData.GetContent("pdf_mesure_vigilance_title"), y, width, 100);

            string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("pdf_mesure_vigilance_on"), DateTime.Now.ToShortDateString())
                                     , string.Format("{0} MV_{1}", languageData.GetContent("pdf_mesure_vigilance_ref"), vigilanceMeasure.idVigilanceMeasure)
                                     , string.Format("{0} : {1}", languageData.GetContent("pdf_mesure_vigilance_client"), (labStudy.CustomerProspect.IsCorporation.Value) ?  labStudy.CustomerProspect.CompanyName : labStudy.CustomerProspect.Name + " " + labStudy.CustomerProspect.FirstName)
                                     , string.Format("{0} : {1}", languageData.GetContent("pdf_mesure_vigilance_date_lab"), labStudy.DateUpdated.Value.ToString("dd/MM/yyyy"))
                                     , string.Format("{0} LAB_{1}", languageData.GetContent("pdf_mesure_vigilance_ref_lab"), labStudy.idLABStudy)
                                    };

            pdfGen.AddTableTitle(rowContents, 110, y += 80);


            #endregion

            #region Page 2 : Measure content
            //#Page 2 : Client : I. identité du client
            pdfGen.CreatePage();

            y = 0;

            pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("pdf_mesure_vigilance_title2"), vigilanceMeasure.Title), 0, y += interline, width, height);
            pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("pdf_mesure_vigilance_date"), vigilanceMeasure.DateMeasure.ToString("dd/MM/yyyy")), 0, y += interline, width, height);
            pdfGen.AddDefaultText(string.Format("{0} : ", languageData.GetContent("pdf_mesure_vigilance_content")), 0, y += interline, width, height);
            pdfGen.AddDefaultText(string.Format("{0}", vigilanceMeasure.Content), 0, y += interline, width, height * 10);
            #endregion

            return pdfGen.GeneratePdf();
        }
コード例 #11
0
        public static void GeneratePP_LAB(IDictionary<LABStudy.SectionEnum, LABStudyModel> dicoLABStudyModel, string pathFileName, bool emptyLAB = false)
        {

            //#Page 1 : Title
            float y = 240;
            int height = 20;
            int width = 500;
            float label_width = 200;
            float answer_width = 280;
            float answer_x = 200;
            float tabCheck = 15;

            var languageData = PageLanguageHelper.GetLanguageContent("User", "LAB_PDF_PP_Report");

            LABStudyModel labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Client];
            FirmInstitution firmInstitution = labStudyModel.Customer.FirmInstitution;
            string currentHostCode = Upsilab.Business.Utility.SessionManager.GetHostCodeSession();
            //Title and footer document
            string documentTitle = "Etude LAB";
            string footerContent = firmInstitution.DocumentFooterContent;


            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent);
            string name = string.Empty;
            string date = string.Empty;
            if (!emptyLAB)
            {
                name = string.Format("{0} {1}", labStudyModel.Customer.User.UserName, labStudyModel.Customer.User.UserFirstName);
                date = DateTime.Now.ToShortDateString();
            }
            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator();
            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent, name, string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), date));

            CustomEnum = Upsilab.Business.Custom.CustomEnumBL.GetAllCustomEnums();
            EnumLanguages = GetLanguageEnum(1);

            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
                firmInstitution = new FirmInstitution();
                labStudyModel.LABStudy = new LABStudy();
                labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect();
            }

            #region Page 1 : Logo & Title
            //Logo
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName, firmInstitution.LogoAlign);
            pdfGen.AddBackgroungImage();

            y = 390;
            //Title
            // pdfGen.AddReceuil_Title_Center_CalibriBold_Label(languageData.GetContent("Report_Title"), y, width, 100);
            // pdfGen.AddReceuil_SubTitle_Center_CalibriBold_Label(languageData.GetContent("Report_Title2"), y += 90, width, height);
            pdfGen.AddWhiteTitle(languageData.GetContent("Report_Title"), y, 310, 80, 200, 16);
            // pdfGen.AddWhiteTitle(languageData.GetContent("Report_Title2"), y += interline * 3.5f, 200, 20, 300, 20);//clients/prospects
            pdfGen.AddWhiteTitle(languageData.GetContent("Report_Title2"), y += interline * 5f, 510, 20, 0, 12);

            pdfGen.AddWhiteBorder(y += interline * 1.7f, 195, 315, 70);
            if (emptyLAB)
            {
                //string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), ""),
                //                       string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), "") };
                //pdfGen.AddTableTitle(rowContents, 110, y += 40);
            }
            else
            {
                //string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), labStudyModel.LABStudy.DateUpdated.HasValue ? labStudyModel.LABStudy.DateUpdated.Value.ToShortDateString() : labStudyModel.LABStudy.DateCreated.ToShortDateString()),
                //                       string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), labStudyModel.LABStudy.idLABStudy) };
                //pdfGen.AddTableTitle(rowContents, 110, y += 40);
                pdfGen.AddWhiteTitleLeft(DateTime.Now.ToShortDateString(), y += 10, width + 10, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(name, y += (interline), width + 10, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(string.Format("{0}-{1}", languageData.GetContent("Report_Title_Reference"), labStudyModel.LABStudy.idLABStudy), y += (interline), width + 10, 11, 220, 10);
            }
            #endregion

            #region Page identification etablissement
            var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP");
            pdfGen.CreatePage();
            y = 0;
            var textInterline = 0;
            pdfGen.AddTitle(languageDataPP.GetContent("PdfReportPP_006"), y, width, 20);//IDENTIFICATION DE L’ÉTABLISSEMENT

            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_012"), y = y + (interline * 2) + textInterline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.FirmInstitutionName, y, answer_width, 20, answer_x);

            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_013"), y += interline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.LeaderName, y, answer_width, 20, answer_x);

            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_014"), y += interline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.LeaderFirstName, y, answer_width, 20, answer_x);

            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.FR.ToString())
            {
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_015"), y += interline, label_width, height);//Numéro RCS : 
                pdfGen.AddAnswer(firmInstitution.RCS, y, answer_width, 20, answer_x);
            }
            else
            {
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_015"), y += interline, label_width, height);//Numéro d'entreprise
                pdfGen.AddAnswer(firmInstitution.RegisteredInRegister, y, answer_width, 20, answer_x);

                var optionValue = Business.Configuration.FirmInstitutionOptionBL.GetFirmInstitutionOptionAttributeValueByFirmAndIdOptionAttribute(firmInstitution.idFirmInstitution, 1);
                var optFSMA = string.Empty;
                if (optionValue != null)
                    optFSMA = Convert.ToString(optionValue.Value);

                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_FSMA"), y += interline, label_width, height);//Numéro FSMA :
                pdfGen.AddAnswer(optFSMA, y, answer_width, 20, answer_x);

            }

            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_016"), y += interline, label_width, height);//Adresse du siège : 
            pdfGen.AddAnswer(firmInstitution.FirmStreet, y, answer_width, 20, answer_x);

            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_017"), y += interline, label_width, height);//Code postal :
            pdfGen.AddAnswer(firmInstitution.FirmPostCode, y, answer_width, 20, answer_x);

            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_018"), y += interline, label_width, height);//Ville :
            pdfGen.AddAnswer(firmInstitution.FirmCity, y, answer_width, 20, answer_x);

            #region Conseiller signataire
            string signataireFirstName = string.Empty;
            string signataireName = string.Empty;


            //    if (!report.IsEmptyReport)
            // {
            Data.Model.User userAdviser = labStudyModel.Customer.User1;// (report.User != null) ? report.User : report.CustomerProspect.User1;

            if (!string.IsNullOrEmpty(userAdviser.UserFirstName))
            {
                signataireFirstName = userAdviser.UserFirstName;
            }

            if (!string.IsNullOrEmpty(userAdviser.UserName))
            {
                signataireName = userAdviser.UserName;
            }
            //}

            pdfGen.AddDefaultText(String.Format(languageDataPP.GetContent("PdfReportPP_753"), string.Empty, string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(string.Format("{0} {1}", signataireFirstName, signataireName), y, answer_width, 20, answer_x);

            #endregion

            #endregion

            #region Page 2 : Client : I. Identité du client
            //#Page 2 : Client : I. identité du client
            pdfGen.CreatePage();

            y = 0;
            pdfGen.AddTitle(languageData.GetContent("Page2_Title"), y, width, 20);

            //height = 15;
            //y += 35;
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y += interline + 10, 0, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section1_Line1"), y, width, height, tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y += interline, 0, Boolean.TrueString);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section1_Line2"), y, width, height, tabCheck);

            pdfGen.AddSubtitle(languageData.GetContent("Page2_Section2_Title"), y += interline * 2f, width);
            // civilité

            float x = 0;

            pdfGen.AddDefaultText(languageData.GetContent("LABPP_1227"), y += interline * 1.5f, width);

            x = 40;
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Title, y, x, languageData.GetContent("LABPP_1228"));
            pdfGen.AddDefaultText(languageData.GetContent("LABPP_1228"), y, width, height, x + tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Title, y, x += 60, languageData.GetContent("LABPP_1229"));
            pdfGen.AddDefaultText(languageData.GetContent("LABPP_1229"), y, width, height, x = x + tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Title, y, x += 50, languageData.GetContent("LABPP_1230"));
            pdfGen.AddDefaultText(languageData.GetContent("LABPP_1230"), y, width, height, x = x + tabCheck);


            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line1"), labStudyModel.Customer.User.UserName), 0, y += interline, width, height); //Nom
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line1"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.User.UserName, y, answer_width, 20, answer_x);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line2"), labStudyModel.Customer.User.UserFirstName), 0, y += interline, width, height); //Prenom
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line2"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.User.UserFirstName, y, answer_width, 20, answer_x);

            // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line3"), labStudyModel.Customer.MaidenName), 0, y += interline, width, height); //Nom de jeune fille
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line3"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.MaidenName, y, answer_width, 20, answer_x);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line4"), (labStudyModel.Customer.DateOfBirth.HasValue) ? labStudyModel.Customer.DateOfBirth.Value.ToString("dd/MM/yyyy") : string.Empty), 0, y += interline, width, height); //Date of birth
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line4"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer((labStudyModel.Customer.DateOfBirth.HasValue) ? labStudyModel.Customer.DateOfBirth.Value.ToString("dd/MM/yyyy") : string.Empty, y, answer_width, 20, answer_x);

            // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line5"), labStudyModel.Customer.PlaceOfBirth), 0, y += interline, width, height); //Lieu de naissance
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line5"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.PlaceOfBirth, y, answer_width, 20, answer_x);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line6"), labStudyModel.Customer.PrivatePhone), 0, y += interline, width, height); //Tel priv
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line6"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.PrivatePhone, y, answer_width, 20, answer_x);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line7"), labStudyModel.Customer.Fax), 0, y += interline, width, height); //Fax
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line7"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.Fax, y, answer_width, 20, answer_x);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line8"), labStudyModel.Customer.ProfessionalPhone), 0, y += interline, width, height); //Tel prof
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line8"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.ProfessionalPhone, y, answer_width, 20, answer_x);

            // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line9"), labStudyModel.Customer.User.UserMobilePhone), 0, y += interline, width, height); //Mobile
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line9"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.User.UserMobilePhone, y, answer_width, 20, answer_x);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line10"), labStudyModel.Customer.User.UserEmail), 0, y += interline, width, height); //Mail
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line10"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.User.UserEmail, y, answer_width, 20, answer_x);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line11"), labStudyModel.Customer.Adress), 0, y += interline, width, 3 * height); //Adresse courier
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line11"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.Adress, y, answer_width, height * 3, answer_x);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line12"), labStudyModel.Customer.FiscalAddrress),  y += interline * 3, width, 3 * height); //Adresse fiscale
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line12"), string.Empty), y += interline * 2.8f, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.FiscalAddrress, y, answer_width, height * 3, answer_x);

            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line13"), y += interline * 2.8f, width, height);

            x = answer_x;
            //Etes-vous
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalCapacity, y, x, "Majeur capable"); //Majeur capable
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line14_Item1"), y, width, height, x = x + tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalCapacity, y, x += 100, "Majeur sous tutelle"); //Majeur sous tutelle
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line14_Item2"), y, width, height, x += tabCheck);

            if (currentHostCode != Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                x = answer_x;
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalCapacity, y += interline, x, "Majeur sous curatelle"); //"Majeur sous curatelle"
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line15_Item1"), y, width, height, x += tabCheck);
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalCapacity, y, x += 100, "Majeur sous sauvegarde de justice"); //"Majeur sous sauvegarde de justice"
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line15_Item2"), y, width, height, x += tabCheck);

                x = answer_x;
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalCapacity, y += interline, x, "Mineur non émancipé"); //"Mineur non émancipé"
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line16_Item1"), y, width, height, x += tabCheck);
                pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.LegalCapacity, y, x += 100, "Mineur émancipé"); //"Mineur émancipé"
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line16_Item2"), y, width, height, x += tabCheck);
            }
            else if (currentHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                x = answer_x;
                pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(1257), y += interline, x, "1");//TODO
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line16_Item_1257"), y, width, height, x += tabCheck);
                pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(1150), y, x += 100, "1"); //TODO
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line16_Item2"), y, width, height, x + tabCheck);
            }

            //Représentant légal
            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_LegalRepresentative"), labStudyModel.Customer.LegalRepresentative), 0, y += interline, width, height); //Representant legal
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_LegalRepresentative"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.LegalRepresentative, y, answer_width, 20, answer_x);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line17"), labStudyModel.Customer.Nationality), 0, y += interline, width, height); //Nationalité
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line17"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.Nationality, y, answer_width, 20, answer_x);

            // pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line18"), labStudyModel.Customer.NationalityIfDouble), 0, y += interline, width, height); //Nationalité si double
            pdfGen.AddDefaultText(String.Format(languageData.GetContent("Page2_Section2_Line18"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(labStudyModel.Customer.NationalityIfDouble, y, answer_width, 20, answer_x);

            x = 0;
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsResident, y += interline, x, Boolean.TrueString); //Resident
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line19_Item1"), y, width, height, x += tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsResident, y, x = 100, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line19_Item2"), y, width, height, x += tabCheck);

            //pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line20"), labStudyModel.Customer.Country), 0, y += interline, width, height); //Pays de residence
            pdfGen.AddDefaultText(String.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line20"), labStudyModel.Customer.Country), y += interline, label_width, height);
            //pdfGen.AddAnswer(labStudyModel.Customer.Country, y, answer_width, 20, answer_x);


            pdfGen.AddBlueBorder(y += interline, 70, width - 100, 90);
            x = 80;

            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line21"), y += interline, width - 120, height, x);

            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Gafi, y += interline, x += 10, Boolean.TrueString); //Gafi
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes"), y, width, height, x += tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Gafi, y, x += 30, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No"), y, width, height, x += tabCheck);

            x = 80;
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section2_Line22"), y += interline, width - 120, height, x);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.OffShore, y += interline, x += 10, Boolean.TrueString); //Offshore
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes"), y, width, height, x += tabCheck);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.OffShore, y, x += 30, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No"), y, width, height, x += tabCheck);
            #endregion

            #region Page 3 : Client : II. Personne physique
            //#Page 3 : Client : II. Personne physique
            pdfGen.CreatePage();

            y = 50;
            pdfGen.AddSubtitle(languageData.GetContent("Page3_Section1_Title"), y, width, height);

            //CLIENT MENU

            LABAnswer labAnswer = labStudyModel.GetAnswerByIdQuestion(11);
            string[] tableRiskVigilanceYesNo_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No") };
            string[] tableRiskVigilanceYesNoIDK_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No"), languageData.GetContent("TableRiskVigilanceYesNo_Item3") };
            string[] answer = { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line1"), y += interline * 2, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //This question is for only client (not prospect)
            if (labStudyModel.Customer.IsCustomer && currentHostCode != Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                labAnswer = labStudyModel.GetAnswerByIdQuestion(12);
                answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
                pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line2"), y += interline * 3, width, 2 * height);
                pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += interline * 2, tableRiskVigilanceYesNo_Text);
            }

            labAnswer = labStudyModel.GetAnswerByIdQuestion(13);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line3"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(14);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line4"),  y += interline * 3, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(15);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line5"),  y += interline * 3, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(67);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line5_1"), y += 3 * interline, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(68);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line5_2"), y += 3 * interline, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(16);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line6"),  y += interline * 3, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 4 : Client : III. Facteurs de risque aggravé
            //#Page 4 : Client : III. Facteurs de risque aggravé
            pdfGen.CreatePage();

            y = 0;
            pdfGen.AddSubtitle(languageData.GetContent("Page4_Section1_Title"), y, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(17);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line1"), y += interline * 2, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(18);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line2"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(19);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line3"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(20);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line4"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(21);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line5"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(24);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line6"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(22);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line7"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(23);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line8"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(51);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line6"), y += interline * 3, width, height); //Question from operation
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 5 : Client : IV. Risques fiscaux
            //#Page 5 : Client : IV. Risques fiscaux
            pdfGen.CreatePage();

            y = 0;
            pdfGen.AddSubtitle(languageData.GetContent("Page5_Section1_Title"), y, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(25);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line1"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text);

            //The following three questions are for PM
            /*labAnswer = labStudyModel.GetAnswerByIdQuestion(26);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText("La société cliente a-t-elle connu des changements statutaires fréquents non justifiés par la situation économique de l’entreprise ?",  y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(27);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText("La société cliente en sommeil ou peu active a-t-elle connu des changements statutaires récents ?",  y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(28);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText("La société cliente a-t-elle recours à l’interposition de personnes physiques n’intervenant qu’en apparence pour le compte de clients de la PSI ou du CIF ?",  y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30);*/

            labAnswer = labStudyModel.GetAnswerByIdQuestion(29);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line2"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(30);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line3"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(31);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line4"), y += interline * 3, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(32);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line5"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 6 : Produit : V. L'environnement et les caractéristiques du produit
            //#Page 6 : Produit : V. L'environnement et les caractéristiques du produit
            pdfGen.CreatePage();

            labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Product];

            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
            }

            y = 0;
            pdfGen.AddTitle(languageData.GetContent("Page6_Section1_Title"), y, width, 20);

            pdfGen.AddSubtitle(languageData.GetContent("Page6_Section1_Title2"), y += interline * 1.5f, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(34);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line1"), y += interline * 2, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(35);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line2"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(36);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line3"), y += interline * 3, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(37);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line4"),  y += interline * 3, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(38);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line5"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(39);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line6"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(40);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line7"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(41);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line8"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(42);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section1_Line9"), y += interline * 3, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 7 : Produit : V. L'environnement et les caractéristiques du produit
            //#Page 7 : Produit : V. L'environnement et les caractéristiques du produit
            pdfGen.CreatePage();

            y = 0;
            labAnswer = labStudyModel.GetAnswerByIdQuestion(43);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line1"), y, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(44);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line2"), y += interline * 3, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(45);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line3"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(46);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line4"), y += interline * 3, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 8 : Operation : VI. Risques généraux / fiscaux
            //#Page 8 : Operation : VI. Risques généraux
            pdfGen.CreatePage();

            labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Operation];
            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
                firmInstitution = new FirmInstitution();
                labStudyModel.LABStudy = new LABStudy();
                labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect();
            }

            y = 0;
            pdfGen.AddTitle(languageData.GetContent("Page8_Section1_Title"), y, width, 20);

            pdfGen.AddSubtitle(languageData.GetContent("Page8_Section1_Title2"), y += interline * 1.5f, width, height);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(48);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line1"), y+= interline *2, width, 2 * height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(49);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line2"), y += interline * 3, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(50);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line3"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(52);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line4"),  y += interline * 3, width, 2 * height);
            //pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line5"), y+= interline *2, width, 10 * height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 8 * height, tableRiskVigilanceYesNo_Text);

            //VII. Risques liés à la distribution des fonds gérés par les sociétés de gestion
            //pdfGen.AddSubtitle(languageData.GetContent("Page8_Section2_Title"), 0, y += 4 * height, width, height);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(53);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddDefaultText(languageData.GetContent("Page8_Section2_Line1"), y+= interline *2, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(54);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddDefaultText(languageData.GetContent("Page8_Section2_Line2"),  y += interline * 3, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //VIII. Risques fiscaux
            pdfGen.AddSubtitle(languageData.GetContent("Page9_Section1_Title"), y += 4 * interline, width, height);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(55);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddDefaultText(languageData.GetContent("Page9_Section1_Line1"), y+= interline *2, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(56);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddDefaultText(languageData.GetContent("Page9_Section1_Line2"),  y += interline * 3, width, 2 * height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            //This question is only for client (not prospect)
            if (labStudyModel.Customer.IsCustomer && currentHostCode != Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                labAnswer = labStudyModel.GetAnswerByIdQuestion(57);
                answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
                pdfGen.AddDefaultText(languageData.GetContent("Page9_Section1_Line3"), y += interline * 3, width, 3 * height);
                pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);
            }

            labAnswer = labStudyModel.GetAnswerByIdQuestion(58);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section1_Line4"), y += interline * 3, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNoIDK_Text);
            #endregion

            #region Page 9 : NIVEAU DE RISQUE GLOBAL DU CLIENT
            //#Page 9 : NIVEAU DE RISQUE GLOBAL DU CLIENT
            pdfGen.CreatePage();

            y = 0;
            //NIVEAU DE RISQUE GLOBAL DU CLIENT           
            pdfGen.AddTitle(languageData.GetContent("Page9_Section2_Title"), y, width, 20);


            string dateUpdated = (labStudyModel.LABStudy.DateUpdated.HasValue) ? labStudyModel.LABStudy.DateUpdated.Value.ToString("dd/MM/yyyy") : labStudyModel.LABStudy.DateCreated.ToString("dd/MM/yyyy");
            string idGlobalRisk = labStudyModel.LABStudy.idRisk.ToString();
            string idGlobalVigilance = labStudyModel.LABStudy.idVigilance.ToString();

            pdfGen.AddDefaultText(string.Format("{0} {1}", languageData.GetContent("Page9_Section2_Line1"), dateUpdated), y += interline * 2, width, height);

            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y += interline, 0, "1");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line2"), y, width, height, tabCheck);

            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y += interline, 0, "2");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line3"), y, width, height, tabCheck);

            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y += interline, 0, "3");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line4"), y, width, height, tabCheck);

            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y += interline, 0, "4");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line5"), y, width, height, tabCheck);

            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y += interline, 0, "5");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line6"), y, width, height, tabCheck);

            //NIVEAU DE VIGILANCE GLOBAL DU CLIENT
            y += 60;
            pdfGen.AddTitle(languageData.GetContent("Page9_Section3_Title"), y, width, 20);

            pdfGen.AddDefaultText(string.Format("{0} {1}", languageData.GetContent("Page9_Section3_Line1"), dateUpdated), y += interline * 2, width, height);


            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y += interline, 0, "1");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line2"), y, width, height, tabCheck);

            if (currentHostCode != Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y += interline, 0, "2");
                pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line3"), y, width, height, tabCheck);
            }

            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y += interline, 0, "3");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line4"), y, width, height, tabCheck);


            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y += interline, 0, "4");
            if (currentHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line5"), y, width, height * 2, tabCheck);
            }
            else
            {
                pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line5"), y, width, height, tabCheck);
            }
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y += interline, 0, "5");
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section3_Line6"), y, width, height, tabCheck);
            #endregion

            //Force download if pathFileName is not set
            if (string.IsNullOrEmpty(pathFileName))
            {
                pdfGen.GeneratePdfToWeb("LAB_PP.pdf");
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }

        }
        public static void Generate_MissionReport(Upsilab.Data.Model.MissionDocument pMissionDoc, string pathFileName, bool forceDownload)
        {
            float y = 260;
            int height = 20;
            int width = 500;
            int interligne = 15;
            // int paddingLeft = 50;
            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator();

            #region page 1

            FirmInstitution firmInstitution = pMissionDoc.CustomerProspect.FirmInstitution;
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName);

            pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRapportMission_001"), y, width, 100);

            string clientName = string.Empty;
            if (pMissionDoc.CustomerProspect.IsCorporation.HasValue && pMissionDoc.CustomerProspect.IsCorporation.Value)
                clientName = string.Format("{0}", pMissionDoc.CustomerProspect.CompanyName);
            else
                clientName = string.Format("{0} {1}", pMissionDoc.CustomerProspect.User.UserName, pMissionDoc.CustomerProspect.User.UserFirstName);

            //Title
            string[] rowContents = { string.Format(LanguageContentBL.Translate("PdfRapportMission_002"), DateTime.Now.ToShortDateString()) //Date de maj ou Date de création??
                                     , string.Format(LanguageContentBL.Translate("PdfRapportMission_003"),pMissionDoc.idMissionDocument)
                                     , clientName
                                   };

            pdfGen.LM_AddTableTitle(rowContents, 90, y += 80);

            //pdfGen.AddRecueil_Notes_Rectangle(y += 100, 105, 375, 30);
            //if (pMissionDoc.CustomerProspect.IsCorporation.HasValue && pMissionDoc.CustomerProspect.IsCorporation.Value)
            //    pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(string.Format("{0}", pMissionDoc.CustomerProspect.CompanyName), y + 5, 300, 20, 120);
            //else
            //    pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(string.Format("{0} {1}", pMissionDoc.CustomerProspect.User.UserFirstName, pMissionDoc.CustomerProspect.User.UserName), y + 5, 300, 20, 120);


            #endregion

            #region page 2

            Data.Model.CustomerProspect cust = pMissionDoc.CustomerProspect;
            Data.Model.User userAdviser = (pMissionDoc.User != null) ? pMissionDoc.User : pMissionDoc.CustomerProspect.User1;

            var data = Upsilab.Business.CustomerProspect.CustomerProspectOptionBL.GetOptionValueListWithIdCustomerProspectAndIdParentOptionPlus(cust.idCustomer,
            Upsilab.Business.CustomerProspect.CustomerProspectBL.MissionParentQuestionId);

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfMissionClient"), y, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionNom"), (cust.IsCorporation.HasValue && cust.IsCorporation.Value) ? cust.CompanyName : cust.User.UserName), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionPrenom"), (cust.IsCorporation.HasValue && cust.IsCorporation.Value) ? LanguageContentBL.Translate("PdfMission") : cust.User.UserFirstName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionAdresse"), cust.Adress), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionCP"), cust.ZipCode), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionVille"), cust.City), y += interligne, width, height);

            FirmInstitution firm = cust.FirmInstitution;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfMissionConseiller"), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionNomEtabs"), firm.FirmInstitutionName), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionNomCons"), userAdviser.UserName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionPrenomCons"), userAdviser.UserFirstName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionNomDir"), firm.LeaderName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionPrenomDir"), firm.LeaderFirstName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionAdrssSiege"), firm.FirmStreet), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionCP"), firm.FirmPostCode), y += interligne, width, height);//CP
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionVille"), firm.FirmCity), y += interligne, width, height);//Ville
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionRCS"), firm.RCS), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionRegistre"), firm.RegisteredInRegister), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfMissionAgregateur"), ""), y += interligne, width, height);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfMmeMsieur"), y += interligne * 2f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_004"), y += interligne * 2f, width, height * 3);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_005"), y += interligne * 3f, width, height * 3);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_006"), y += interligne * 4f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_007"), y += interligne * 1.5f, width, height * 2);



            #endregion

            #region page 3

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddReceuil_ChapterSubTitle_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRapportmission_008"), y, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_009"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_010"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue("Client_Mission_008", data), y + 5 * 1.5f, width, height, 5);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_011"), y += interligne * 3f, width, height);

            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 1.5f, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(192, 126, data), y + 2 * 1.5f, width, height, 5);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 2.6f, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(192, 127, data), y + 2 * 1.5f, width, height, 5);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 2.6f, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(192, 128, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 2.6f, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(192, 129, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 2.6f, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(192, 130, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 2.6f, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(192, 131, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 2.6f, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(192, 132, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 2.6f, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(192, 133, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 2.6f, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(192, 134, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 2.6f, 0, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(192, 135, data), y + 2 * 2.6f, width, height, 5);

            #endregion

            #region page 4

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddReceuil_ChapterSubTitle_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRapportmission_012"), y, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_013"), y += interligne * 1.5f, width, height * 3);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_012", data), y += interligne * 3, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_014"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_013", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_015"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_014", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_016"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_015", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_017"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_016", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_018"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_017", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_019"), y, width, height, 15);
            // PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_018", data), y += interligne, 0, "1"); --> pas de checkbox sur le formulaire
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_020"), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue("Client_Mission_018", data), y, 480, height * 2, 40);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfReportPP_Notes"), y += interligne * 2, 500, 20);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 125);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue("Client_Mission_019", data), y + 5, 480, 125, 10);

            pdfGen.AddReceuil_ChapterSubTitle_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRapportmission_021"), y += interligne * 9f, width, height);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_020", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_022"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_021", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_023"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_022", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_024"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_023", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_025"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_024", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_026"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_025", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_027"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_026", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_028"), y, width, height, 15);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfReportPP_Notes"), y += interligne * 2, 500, 20);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 125);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(194, 139, data), y + 5, 480, 125, 10);

            #endregion

            #region page 5

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddReceuil_ChapterSubTitle_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRapportmission_029"), y, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfReportPP_Notes"), y += interligne * 2, 500, 20);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 600);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(195, 140, data), y + 5, 480, 600, 10);

            #endregion

            #region page 6

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddReceuil_ChapterSubTitle_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRapportmission_030"), y, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_031"), y += interligne * 2, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_032"), y += interligne, width, height);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_033"), y += interligne * 2, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_034"), y += interligne * 2, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRapportmission_035"), y += interligne * 2, width, height * 2);

            #endregion

            #region page 7

            pdfGen.CreatePage();
            y = 0;
            //Signature
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(@"Signatures", 0);

            pdfGen.AddReceuil_DetailText_Justify_CalibriBoldItalic_Label(@"Signature de l'Etablissement", 100, 500, 20, 80);


            pdfGen.AddRecueil_Notes_Rectangle(130, 35, 200, 120);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(@"J'ai lu et j'accepte les conditions générales.", 135, 200, 20, 40);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(@"Lu et approuvé.", 145, 145, 20, 40);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(@"Date:", 160, 145, 20, 40);
            }

            pdfGen.AddReceuil_DetailText_Justify_CalibriBoldItalic_Label(@"Signature du Client", 100, 500, 20, 340);
            pdfGen.AddRecueil_Notes_Rectangle(130, 280, 200, 120);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(@"J'ai lu et j'accepte les conditions générales.", 135, 200, 20, 285);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(@"Lu et approuvé.", 145, 145, 20, 285);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(@"Date:", 160, 145, 20, 285);
            }

            #endregion

            //Force download if pathFileName is not set
            if (forceDownload)
            {
                pdfGen.GeneratePdfToWeb("RapportDeMission.pdf");
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }
        }
        public static void GeneratePM_EngagementLetter(Upsilab.Data.Model.MissionDocument pMissionDoc, string pathFileName, bool forceDownload)
        {
            float y = 260;
            int height = 20;
            int width = 500;
            int interligne = 15;
            int paddingLeft = 50;
            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator();

            #region page 1
            FirmInstitution firmInstitution = pMissionDoc.CustomerProspect.FirmInstitution;
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName);

            pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_001"), y, width, 100);
            pdfGen.AddReceuil_SubTitle_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_134"), y += 100, width, height);

            string[] rowContents = { string.Format(LanguageContentBL.Translate("PdfRapportMission_002"), DateTime.Now.ToShortDateString()) //Date de maj ou Date de création
                                     , string.Format("{0} LM-{1}",LanguageContentBL.Translate("PdfFirm_082"),pMissionDoc.idMissionDocument)
                                     , string.Format("{0}", pMissionDoc.CustomerProspect.CompanyName)
                                   };
            pdfGen.LM_AddTableTitle(rowContents, 90, y += 80);

            //pdfGen.AddRecueil_Notes_Rectangle(y += 100, 105, 375, 30);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(string.Format("{0}", pMissionDoc.CustomerProspect.CompanyName), y + 5, 300, 20, 120);
            #endregion

            #region page 2

            Data.Model.CustomerProspect cust = pMissionDoc.CustomerProspect;
            Data.Model.User userAdviser = (pMissionDoc.User != null) ? pMissionDoc.User : pMissionDoc.CustomerProspect.User1;

            var data = Upsilab.Business.CustomerProspect.CustomerProspectOptionBL.GetOptionValueListWithIdCustomerProspectAndIdParentOptionPlus(cust.idCustomer,
               Upsilab.Business.CustomerProspect.CustomerProspectBL.EngagementLetterParentQuestionId);
            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_003"), y, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_004"), cust.CompanyName), y += interligne * 1.5f, width, height);
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format("Prénom : {0}", "XXX"), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_006"), cust.Adress), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_007"), cust.ZipCode), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_008"), cust.City), y += interligne, width, height);

            FirmInstitution firm = cust.FirmInstitution;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_009"), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_010"), firm.FirmInstitutionName), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_011"), userAdviser.UserName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_012"), userAdviser.UserFirstName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_013"), firm.LeaderName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_014"), firm.LeaderFirstName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_015"), firm.FirmStreet), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_016"), firm.FirmPostCode), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_017"), firm.FirmCity), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_018"), firm.RCS), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_019"), firm.RegisteredInRegister), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_020"), firm.AgregateurNoms), y += interligne, width, height);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_021"), y += interligne * 2, width, height, paddingLeft);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_022"), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_023"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_024"), y += interligne * 3f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_025"), y += interligne * 2.5f, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_026"), y += interligne * 2.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_027"), y += interligne * 1.5f, width, height * 3);


            #endregion

            #region page 3

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_028"), y, width, height);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(138, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_029"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(139, data), y += interligne + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_030"), y - 5, width, height * 2, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(140, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_031"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(141, data), y += interligne + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_032"), y - 5, width, height * 2, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(142, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_033"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(143, data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_034"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(144, data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_035"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(145, data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_036"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(146, data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_037"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(147, data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_038"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(148, data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_039"), y, width, 20, 15);
            //PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(149, data), y += interligne, 0, "1");
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label("Réception / transmission d’ordres", y, width, 20, 15);
            //PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(150, data), y += interligne, 0, "1");
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label("Suivi annuel de patrimoine et produits financiers externes", y, width, 20, 15);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_040"), y += interligne, width, height);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 20);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(128, 96, data), y + 5, width, height, 5);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_040"), y += interligne * 1.5f, width, height);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 20);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(128, 97, data), y + 5, width, height, 5);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_040"), y += interligne * 1.5f, width, height);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 20);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(128, 98, data), y + 5, width, height, 5);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_041"), y += interligne * 2, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_042"), y += interligne * 1.5f, width, height);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_031", data), y += interligne * 1.5f + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_043"), y - 5, width, 40, 15);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_032", data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_045"), y, width, 20, 15);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_033", data), y += interligne + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_054"), y - 5, width, 40, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_034", data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_055"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_035", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_135"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_036", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_136"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_037", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_137"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_038", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_138"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_039", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_139"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_040", data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_140"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_041", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_141"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_042", data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_142"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Letter_PM_043", data), y += interligne);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_143"), y, width, 20, 15);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_040"), y += interligne, width, height);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 20);
            if (!cust.IsCorporation.Value)//PP
                pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(151, 59, data), y + 5, width, height, 5);
            else
                pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue("Client_Letter_PM_044", data), y + 5, width, height, 5);

            #endregion

            #region page 4

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_056"), y, width, height);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(166, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_057"), y - 5, width, 20 * 2, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(167, data), y += interligne * 3f, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_058"), y - 15, width, 20 * 3, 15);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_059"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_060"), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_061"), y += interligne, width, height);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 125);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(168, 100, data), y + 5, width, 125, 5);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_062"), y += interligne * 9f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_061"), y += interligne, width, height);//Notes
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 125);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(169, 101, data), y + 5, width, 125, 5);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_063"), y += interligne * 9f, width, height);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(172, data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_064"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(173, data), y += interligne + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_065"), y - 5, width, 40, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(174, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_066"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(175, data), y += interligne + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_067"), y - 5, width, 40, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(176, data), y += (interligne * 1.5f) + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_068"), y - 5, width, 40, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(177, data), y += (interligne * 1.5f) + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_069"), y - 5, width, 40, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(178, data), y += (interligne * 1.5f) + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_070"), y - 5, width, 40, 15);

            #endregion

            #region page 5
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_040"), y, width, height);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 20);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(170, 102, data), y + 5, width, height, 5);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_061"), y += interligne * 1.5f, width, height);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 125);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(170, 103, data), y + 5, width, 125, 5);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_071"), y += interligne * 9f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_061"), y += interligne, width, height);
            pdfGen.AddRecueil_Notes_Rectangle(y += interligne, 0, width, 125);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(171, 104, data), y + 5, width, 125, 5);

            #endregion

            #region page 6

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_072"), y, width, height);//Le mode de facturation et de rémunération
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_073"), y += interligne, width, 20);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_074"), y += interligne, width, 20 * 3);

            pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 3, 0, 30, 20);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(131, 105, data), y + 5, 50, 20, 5);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label("X", y + 8, 20, 20, 40);
            pdfGen.AddRecueil_Notes_Rectangle(y, 60, 30, 20);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(CustomerProspectOptionBL.GetProspectAttributeValue(131, 106, data), y + 5, 50, 30, 65);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_075"), y + 8, width, height, 110);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_076"), y += interligne * 3, width, height * 2);
            // pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label("Au titre de l’accompagnement du client, une information plus précise sera fournie ultérieurement sur simple demande une fois connus les supports choisis par le client.", y += interligne * 3, width, height * 2, 15);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriItalic_Label(LanguageContentBL.Translate("PdfLM_077"), y += interligne * 3, width, height * 2, 15);


            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_078"), y += interligne * 3, width, height);//Les honoraires

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(181, data), y += (interligne * 1.5f) + 10, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_079")
                , CustomerProspectOptionBL.GetProspectAttributeValue(181, 115, data)
                , CustomerProspectOptionBL.GetProspectAttributeValue(181, 116, data)
                , CustomerProspectOptionBL.GetProspectAttributeValue(181, 117, data))
                , y - 10, width, height * 4, 20);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_080"), y += interligne * 3f, width, height);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(182, data), y += (interligne * 1.5f) + 10, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_081")
                , CustomerProspectOptionBL.GetProspectAttributeValue(182, 118, data)), y - 10, width, height * 3, 20);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_080"), y += interligne * 2.5f, width, height);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(183, data), y += (interligne * 1.5f) + 20, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_082")
                , CustomerProspectOptionBL.GetProspectAttributeValue(183, 119, data)), y - 20, width, height * 5, 20);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_083")
                , CustomerProspectOptionBL.GetProspectAttributeValue(133, 120, data)), y += interligne * 4, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_084")
               , CustomerProspectOptionBL.GetProspectAttributeValue(133, 121, data)), y += interligne * 2, width, height);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_085"), y += interligne * 2f, width, height);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_086"), y += interligne, width, height);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(184, data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_087"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(185, data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_088"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(186, data), y += interligne + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_089"), y - 5, width, height * 2, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(187, data), y += interligne + 10 + 5, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_090"), y - 5, width, height * 2, 15);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(188, data), y += interligne + 10, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_091"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(189, data), y += interligne, 0, "1");
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_092"), y, width, height, 15);



            #endregion

            #region page 7

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_093"), y, width, height);//La durée et le calendrier de la mission

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_094")
            , CustomerProspectOptionBL.GetProspectAttributeValue(135, 122, data)), y += interligne * 1.5f, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_095")
            , CustomerProspectOptionBL.GetProspectAttributeValue(135, 123, data)), y += interligne * 2f, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_096"), y += interligne * 3, width, height);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_097")
            , CustomerProspectOptionBL.GetProspectAttributeValue(136, 124, data)), y += interligne * 1.5f, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_098"), y += interligne * 3, width, height);//Typologie de client

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_099"), y += interligne * 1.5f, width, height * 4);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_100"), y += interligne * 4, width, height);//Déroulement de la mission
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_101"), y += interligne * 2f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_102"), y += interligne * 2.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_103"), y += interligne * 2f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_104"), y += interligne * 2.5f, width, height * 3);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_105"), y += interligne * 4f, width, height * 3);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_106"), y += interligne * 3.5f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_107"), y += interligne * 3f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_108"), y += interligne * 2f, width, height * 2);


            #endregion

            #region page 8

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_109"), y, width, height);//Suivi patrimonial envisagé
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_110"), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_111"), y += interligne * 2f, width, height * 3);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_112"), y += interligne * 4, width, height);//Modalités d’information
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_113"), y += interligne * 1.5f, width, height);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_114"), y += interligne * 2.5f, width, height);//Dénonciation de la mission
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_115"), y += interligne * 1.5f, width, height * 3);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_116"), y += interligne * 4f, width, height * 4);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_117"), y += interligne * 4f, width, height * 3);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_118"), y += interligne * 3.5f, width, height);//Responsabilité
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_119"), y += interligne * 1.5f, width, height * 4);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_120"), y += interligne * 4.5f, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_121"), y += interligne * 3f, width, height);//Confidentialité
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_122"), y += interligne * 1.5f, width, height * 2);




            #endregion

            #region page 9

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_123"), y, width, height);//Litiges
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_124"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_125"), y += interligne * 3f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_126"), y += interligne * 3f, width, height * 3);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_127"), y += interligne * 4f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_128"), y += interligne * 3f, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_129"), y += interligne * 3, width, height);//Traitement des informations
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_130"), y += interligne * 1.5f, width, height * 5);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_131"), y += interligne * 5f, width, height * 3);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_132"), y += interligne * 4f, width, height * 4);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfLM_133"), y += interligne * 4.5f, width, height * 4);



            #endregion

            #region page 10

            pdfGen.CreatePage();
            y = 0;
            //Signature
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(LanguageContentBL.Translate("Pdf_Signature"), 0);

            pdfGen.AddReceuil_DetailText_Justify_CalibriBoldItalic_Label(LanguageContentBL.Translate("Pdf_Signature_Etabs"), 100, 500, 20, 80);


            pdfGen.AddRecueil_Notes_Rectangle(130, 35, 200, 120);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 40);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 40);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 40);
            }

            pdfGen.AddReceuil_DetailText_Justify_CalibriBoldItalic_Label(LanguageContentBL.Translate("Pdf_Signature_Client"), 100, 500, 20, 340);
            pdfGen.AddRecueil_Notes_Rectangle(130, 280, 200, 120);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 285);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 285);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 285);
            }

            #endregion

            //Force download if pathFileName is not set
            if (forceDownload)
            {
                pdfGen.GeneratePdfToWeb("LettreMission_PM.pdf");
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }
        }
        public static void GenerateRTO(Upsilab.Data.Model.MissionDocument pMissionDoc, string pathFileName, bool forceDownload)
        {
            float y = 250;
            int height = 20;
            int width = 500;
            int interligne = 15;
            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator();

            #region page 1
            FirmInstitution firmInstitution = pMissionDoc.CustomerProspect.FirmInstitution;
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName);

            pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRTO_001"), y, width, height + 5);
            pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRTO_002"), y += interligne, width, height + 5);
            pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfRTO_003"), y += interligne, width, height + 5);

            string[] rowContents = { string.Format(LanguageContentBL.Translate("PdfRapportMission_002"), DateTime.Now.ToShortDateString()), //Date de maj ou Date de création
                                       string.Format("{0} RTO-{1}",LanguageContentBL.Translate("PdfFirm_082"),pMissionDoc.idMissionDocument) };
            pdfGen.LM_AddTableTitle(rowContents, 80, y += 90);

            #endregion

            #region page 2

            Data.Model.CustomerProspect cust = pMissionDoc.CustomerProspect;
            Data.Model.User userAdviser = (pMissionDoc.User != null) ? pMissionDoc.User : pMissionDoc.CustomerProspect.User1;

            var data = Upsilab.Business.CustomerProspect.CustomerProspectOptionBL.GetOptionValueListWithIdCustomerProspectAndIdParentOptionPlus(cust.idCustomer,
               Upsilab.Business.CustomerProspect.CustomerProspectBL.EngagementLetterParentQuestionId);
            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_003"), y, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_004"), (cust.IsCorporation.HasValue && cust.IsCorporation.Value) ? cust.CompanyName : string.Format("{0} {1}", cust.FirstName, cust.Name)), y += interligne * 1.5f, width, height);
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format("Prénom : {0}", "XXX"), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_006"), cust.Adress), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_007"), cust.ZipCode), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_008"), cust.City), y += interligne, width, height);

            FirmInstitution firm = cust.FirmInstitution;
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfLM_009"), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_010"), firm.FirmInstitutionName), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_011"), userAdviser.UserName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_012"), userAdviser.UserFirstName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_013"), firm.LeaderName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_014"), firm.LeaderFirstName), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_015"), firm.FirmStreet), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_016"), firm.FirmPostCode), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_017"), firm.FirmCity), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_018"), firm.RCS), y += interligne, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(string.Format(LanguageContentBL.Translate("PdfLM_019"), firm.RegisteredInRegister), y += interligne, width, height);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfRTO_004"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_005"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_006"), y += interligne * 2.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_007"), y += interligne * 1.5f, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfRTO_008"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_009"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_010"), y += interligne * 2.5f, width, height * 5);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_011"), y += interligne * 5.5f, width, height * 6);


            #endregion

            #region page 3

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_012"), y, width, height * 5);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfRTO_013"), y += interligne * 6, width, height);

            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_014"), y += interligne * 1.5f, width, height * 4);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_015"), y += interligne * 4.5f, width, height * 3);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_016"), y += interligne * 4, width, height * 7);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfRTO_017"), y += interligne * 6, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_018"), y += interligne * 1.5f, width, height * 3);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfRTO_019"), y += interligne * 3.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_020"), y += interligne * 1.5f, width, height * 3);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfRTO_021"), y += interligne * 4, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_022"), y += interligne * 1.5f, width, height * 3);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_023"), y += interligne * 3.5f, width, height * 2);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Blue_Label(LanguageContentBL.Translate("PdfRTO_024"), y += interligne * 3, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_025"), y += interligne * 1.5f, width, height);
            pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfRTO_026"), y += interligne * 1.5f, width, height);

            #endregion

            #region page 4

            pdfGen.CreatePage();
            y = 0;
            //Signature
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(LanguageContentBL.Translate("Pdf_Signature"), 0);

            pdfGen.AddReceuil_DetailText_Justify_CalibriBoldItalic_Label(LanguageContentBL.Translate("Pdf_Signature_Etabs"), 100, 500, 20, 80);


            pdfGen.AddRecueil_Notes_Rectangle(130, 35, 200, 120);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 40);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 40);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 40);
            }

            pdfGen.AddReceuil_DetailText_Justify_CalibriBoldItalic_Label(LanguageContentBL.Translate("Pdf_Signature_Client"), 100, 500, 20, 340);
            pdfGen.AddRecueil_Notes_Rectangle(130, 280, 200, 120);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 285);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 285);
                pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 285);
            }

            #endregion

            //Force download if pathFileName is not set
            if (forceDownload)
            {
                pdfGen.GeneratePdfToWeb("RTO.pdf");
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }
        }
コード例 #15
0
        private static Double GenerateValeursImmobilieresTable(FoxitPDFGenerator pdfGen, int nbLignes, Data.Model.Report report, float y, float x = 0, int debutLigne = 0, Double sommefinale = 0)
        {
            var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP");
            List<string> colsNames = new List<string>() { languageDataPP.GetContent("PdfReportPP_066"), languageDataPP.GetContent("PdfReportPP_067"), languageDataPP.GetContent("PdfReportPP_068"), languageDataPP.GetContent("PdfReportPP_069"), languageDataPP.GetContent("PdfReportPP_085"), languageDataPP.GetContent("PdfReportPP_086"), languageDataPP.GetContent("PdfReportPP_087"), languageDataPP.GetContent("PdfReportPP_070"), languageDataPP.GetContent("PdfReportPP_079") };
            List<float> colsWidth = new List<float>() { 60, 60f, 50, 50, 65, 60, 60, 60f, 60 };
            List<ReportOptionAttributeValue> dataLiquidites = new List<ReportOptionAttributeValue>();
            dataLiquidites = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 203).OrderBy(roav => roav.idReportOptionAttributeValue).ToList();
            Dictionary<int, List<string>> data = new Dictionary<int, List<string>>();
            //int nbLignes = 21;
            double sommeCurrentValue = 0, d;
            //int nbLignes = debutLigne == 0 ? 10 : 21;
            //int nbLignes = 21;

            int nbLigneAafficher = 0;
            // parcours des lignes
            for (int i = debutLigne; i < nbLignes; i++)
            {
                // lignes des données
                if (i <= nbLignes - 2 && i < dataLiquidites.Count())
                {
                    /*
                    * TESTER LA PREMIERE COLONNE DE CHAQUE LIGNE; 
                    * SI ELLE EST VIDE C'EST A DIRE QUE CETTE LIGNE NE SERA PAS AFFICHEE
                    */
                    string Description = Convert.ToString(dataLiquidites[i].CustomObjectValue.Description);
                    if (!string.IsNullOrEmpty(Description))
                    {
                        if (nbLigneAafficher == 12)
                        {
                            pdfGen.AddTable(colsNames, colsWidth, data, y, colsWidth.Sum(), (nbLigneAafficher + 5) * 40, x, 40);
                            pdfGen.CreatePage();
                            data = new Dictionary<int, List<string>>();
                            y = 0;
                            nbLigneAafficher = 0;
                        }
                        nbLigneAafficher++;

                        data.Add(i, new List<string>());
                        data[i] = new List<string>();

                        // parcours des colonnes
                        for (int j = 1; j <= colsNames.Count; j++)
                        {
                            if (dataLiquidites.Count >= i + 1)
                            {
                                switch (j)
                                {
                                    case 1:
                                        Description = Convert.ToString(dataLiquidites[i].CustomObjectValue.Description);
                                        data[i].Add(Description);
                                        break;
                                    case 2:
                                        string Organization = Convert.ToString(dataLiquidites[i].CustomObjectValue.Organization);
                                        data[i].Add(Organization);
                                        break;
                                    case 3:
                                        string CurrentValue = Convert.ToString(dataLiquidites[i].CustomObjectValue.CurrentValue);
                                        data[i].Add(CurrentValue);
                                        if (Double.TryParse(CurrentValue.Replace(".", ","), out d))
                                            sommeCurrentValue += d;
                                        break;
                                    case 4:
                                        string Holder = Convert.ToString(dataLiquidites[i].CustomObjectValue.Holder);
                                        data[i].Add(Holder);
                                        break;
                                    case 5:
                                        string SouscriptionDate = Convert.ToString(dataLiquidites[i].CustomObjectValue.SubscriptionDate);
                                        data[i].Add(SouscriptionDate);
                                        break;
                                    case 6:
                                        string AnnualRendement = Convert.ToString(dataLiquidites[i].CustomObjectValue.AnnualYield);
                                        data[i].Add(AnnualRendement);
                                        break;
                                    case 7:
                                        string Beneficiary = Convert.ToString(dataLiquidites[i].CustomObjectValue.Beneficiary);
                                        data[i].Add(Beneficiary);
                                        break;
                                    case 8:
                                        string Source = Convert.ToString(dataLiquidites[i].CustomObjectValue.Source);
                                        data[i].Add(Source);
                                        break;
                                    case 9:
                                        data[i].Add(GetEnumValue(Convert.ToString(dataLiquidites[i].CustomObjectValue.Country), 10));
                                        break;
                                }
                            }
                            else
                            {
                                data[i].Add("");
                            }
                        }
                    }
                }

                if (i == nbLignes - 1)
                {
                    data.Add(i, new List<string>());
                    data[i] = new List<string>();
                    for (int j = 1; j <= colsNames.Count; j++)
                    {
                        switch (j)
                        {
                            case 2:
                                data[i].Add(LanguageContentBL.Translate("libelle_total"));
                                break;
                            case 3:
                                {
                                    if (sommefinale == 0)
                                        data[i].Add(sommeCurrentValue.ToString());
                                    else
                                        data[i].Add((sommeCurrentValue + sommefinale).ToString());
                                    break;
                                }
                            default:
                                data[i].Add("");
                                break;
                        }
                    }
                }
            }

            pdfGen.AddTable(colsNames, colsWidth, data, y, colsWidth.Sum(), (nbLigneAafficher + 5) * 40, x, 40);

            return sommeCurrentValue;
        }
コード例 #16
0
        public static int GenerateDER(FirmInstitution pFirm, Guid customerID, string pathFileName, bool forceDownload)
        {
            float y = 380;
            int height = 20;
            int width = 500;
            int interligne = 15;
            int interligneParagraph = 20;
            int paddingLeft = 40;
            float label_width = 200;
            float answer_width = 280;
            float answer_x = 200;

            //Title and footer document
            string documentTitle = "DER";
            string footerContent = pFirm.DocumentFooterContent;

            var cust = Upsilab.Business.CustomerProspect.CustomerProspectBL.GetCustomerProspectById(customerID);

            //string name = cust.IsCorporation.Value ? cust.CompanyName : string.Format("{0} {1}", cust.User.UserName, cust.User.UserFirstName);
            //string date = DateTime.Now.ToShortDateString();
            //string idDocument = pFirm.idFirmInstitution.ToString();


            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent, name, string.Format("{0} {1}", LanguageContentBL.Translate("PdfReportPP_004"), date));


            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent);


            List<FirmInstitutionOptionAttributeValue> lstOptionAttributeValue = FirmInstitutionOptionBL.GetFirmInstitutionOptionAttributeValueByFirm(pFirm.idFirmInstitution);
            List<FirmInstitutionOptionValue> lstOptionValue = FirmInstitutionOptionBL.GetFirmInstitutionOptionValueByFirm(pFirm.idFirmInstitution);

            #region page 1

            pdfGen.AddBackgroungImage();
            //Logo
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(pFirm.idFirmInstitution) + pFirm.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName, pFirm.LogoAlign);

            pdfGen.AddWhiteTitle(LanguageContentBL.Translate("PdfFirm_083"), y, 240, 60, 260, 20);

            //string[] rowContents = { string.Format("{0} {1}",LanguageContentBL.Translate("PdfReportPP_004"), DateTime.Now.ToShortDateString()),//Le
            //                           string.Format("{0} DER-{1}",LanguageContentBL.Translate("PdfFirm_082"),pFirm.idFirmInstitution) };

            //pdfGen.LM_AddTableTitle(rowContents, 90, y += 60);

            pdfGen.AddWhiteBorder(y += interligne * 3.5f, 210, 290, 70);

            if (!forceDownload)
                pdfGen.AddWhiteTitleLeft(DateTime.Now.ToShortDateString(), y += 10, 500, 11, 220, 10);
            pdfGen.AddWhiteTitleLeft(pFirm.FirmInstitutionName, y += (interligne), 500, 11, 220, 10);
            pdfGen.AddWhiteTitleLeft(string.Format("DER-{0}", pFirm.idFirmInstitution), y += (interligne), 500, 11, 220, 10);

            #endregion

            #region page 2
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_084"), y, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_085"), y += interligne, width, height * 2);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_086"), y += interligne * 2, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_087"), y += interligne, width, height * 2);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_002"), pFirm.FirmInstitutionName), y += interligne * 2.5f, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_002"), string.Empty), y += interligne * 2, label_width, height);
            pdfGen.AddAnswer(pFirm.FirmInstitutionName, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_003"), pFirm.ShareCapital), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_003"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.ShareCapital, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_004"), pFirm.NAF_APE), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_004"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.NAF_APE, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_005"), pFirm.RCS), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_005"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.RCS, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_006"), pFirm.SIRET), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_006"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.SIRET, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_007"), pFirm.SIREN), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_007"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.SIREN, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_008"), pFirm.FirmStreet), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_008"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.FirmStreet, y, answer_width, height * 3, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_009"), pFirm.FirmPostCode), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_009"), string.Empty), y += interligne * 2.8f, label_width, height);
            pdfGen.AddAnswer(pFirm.FirmPostCode, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_010"), pFirm.FirmCity), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_010"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.FirmCity, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_011"), pFirm.E_mail), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_011"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.E_mail, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_012"), pFirm.FirmPhone), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_012"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(pFirm.FirmPhone, y, answer_width, height, answer_x);

            if (!string.IsNullOrEmpty(pFirm.Fax))
            {
                //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_013"), pFirm.Fax), y += interligne, width, height);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_013"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer(pFirm.Fax, y, answer_width, height, answer_x);
            }
            if (!string.IsNullOrEmpty(pFirm.Website))
            {
                //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_014"), pFirm.Website), y += interligne, width, height);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_014"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer(pFirm.Website, y, answer_width, height, answer_x);
            }

            #endregion

            #region page 3

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_088"), y, width, height);//Statuts réglementés
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_031"), GetOptionAttributeValue(lstOptionAttributeValue, 1)), y += interligne * 1.5f, width, height);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_032")), y += interligne * 1.5f, width, height * 2);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_033")), y += interligne * 2.5f, width, height);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 3), y += interligne * 2f, 0);//Conseil en Gestion de Patrimoine (CGP)
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_034")), y, width, height, 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 4), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_035")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 5), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_036")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 6), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_037")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 7), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_038")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 8), y += interligne, paddingLeft);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_039")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 9), y += interligne, paddingLeft);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_040")), y, width, height, paddingLeft + 15);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 10), y += interligne * 1.5f, 0); //Société de gestion
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_041")), y, width, height, 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 11), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_035")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 12), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_036")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 13), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_037")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 14), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_038")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 15), y += interligne, paddingLeft);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_039")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 16), y += interligne, paddingLeft);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_040")), y, width, height, paddingLeft + 15);

            //N° d’agrément :
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_089"), GetOptionAttributeValue(lstOptionAttributeValue, 54)), y += interligne, width, height, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_090")), y += interligne, width, height, paddingLeft);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 73), y, paddingLeft + 120);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_091")), y, width, height, paddingLeft + 135);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 74), y, paddingLeft + 230);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_092")), y, width, height, paddingLeft + 245);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_093"), GetOptionAttributeValue(lstOptionAttributeValue, 55)), y += interligne, width, height, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_094")), y += interligne, width, height, paddingLeft);
            pdfGen.AddBlueBorder(y += interligne, paddingLeft, width, 50);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 56), y + 5, width, height * 3, paddingLeft + 2);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 17), y += interligne * 3.5f, 0); //Banque
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_042")), y, width, height, 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 18), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_035")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 19), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_036")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 20), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_037")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 21), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_038")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 22), y += interligne, paddingLeft);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_039")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 23), y += interligne, paddingLeft);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_040")), y, width, height, paddingLeft + 15);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_095"), GetOptionAttributeValue(lstOptionAttributeValue, 57)), y += interligne, width, height, paddingLeft);
            pdfGen.AddBlueBorder(y += interligne, paddingLeft, width, 50);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 58), y + 5, width, height * 3, paddingLeft + 2);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_096")), y += (4 * interligne), width, height, paddingLeft);
            pdfGen.AddBlueBorder(y += interligne, paddingLeft, width, 50);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 59), y + 5, width, height * 3, paddingLeft + 2);

            #endregion

            #region page 4

            pdfGen.CreatePage();
            y = 0;

            //Prestataire de service en investissement
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 24), y, 0);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_043")), y, width, height, 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 25), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_035")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 26), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_036")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 27), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_037")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 28), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_038")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 29), y += interligne, paddingLeft);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_039")), y, width, height, paddingLeft + 15);
            //PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 30), y += interligne, paddingLeft);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_040")), y, width, height, paddingLeft + 15);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_097"), GetOptionAttributeValue(lstOptionAttributeValue, 60)), y += interligne * 1.5f, width, height, paddingLeft);// à mapper
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_096")), y += interligne, width, height, paddingLeft);
            pdfGen.AddBlueBorder(y += interligne, paddingLeft, width, 50);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 61), y + 5, width, height * 3, paddingLeft + 2);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 31), y += interligne * 4f, 0); //Agent lié
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_044")), y, width, height, 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 32), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_045")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 33), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_046")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 34), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_047")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 35), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_048")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 36), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_049")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 1140), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_050")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 37), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_051")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 38), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_052")), y, width, height, paddingLeft + 15);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 39), y += interligne, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_053")), y, width, height, paddingLeft + 15);

            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_023"), y += interligne * 4f, width, height);
            var _association = FirmInstitutionBL.GetFirmInstitutionProfessionalAssociation(pFirm.idFirmInstitution);
            var _types = FirmInstitutionBL.GetProfessionalAssociationType();
            var _type = (_types != null && _association != null) ? _types.Where(ass => ass.idProfessionalAssociation == _association.idProfessionalAssociation).FirstOrDefault() : null;

            var languageAssoc = Upsilab.Business.Utility.PageLanguageHelper.GetLanguageContent("User", "profesionnalAssociation"); 
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_024"), _type != null ? _type.Name : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_024"), string.Empty), y += interligne * 1.5f, label_width, height);
            pdfGen.AddAnswer(_type != null ? languageAssoc.GetContent(_type.Name) : string.Empty, y, answer_width, height, answer_x); ;

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_025"), _association != null ? _association.MembershipNumber : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_025"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(_association != null ? _association.MembershipNumber : string.Empty, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_026"), _association != null ? _association.HeadquartersAddress : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_026"), string.Empty), y += interligne * 1.5f, label_width, height);
            pdfGen.AddAnswer(_association != null ? _association.HeadquartersAddress : string.Empty, y, answer_width, height * 3, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_027"), _association != null ? _association.PostCode : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_027"), string.Empty), y += interligne * 2.8f, label_width, height);
            pdfGen.AddAnswer(_association != null ? _association.PostCode : string.Empty, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_028"), _association != null ? _association.City : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_028"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(_association != null ? _association.City : string.Empty, y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_029"), _association != null ? _association.Website : string.Empty), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_029"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(_association != null ? _association.Website : string.Empty, y, answer_width, height, answer_x);



            #endregion

            #region page 5

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_098"), y, width, height);//Conseiller en investissements financiers
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_099"), GetOptionAttributeValue(lstOptionAttributeValue, 2)), y += interligne * 2, width, height);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_100")), y += interligne * 2, width, height);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_101")), y += interligne, width, height * 4);
            pdfGen.AddBlueBorder(y += interligne * 4f, 0, width, 200);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 3), y + 5, width, 180, 2);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_102")), y += 230, width, height * 8);


            #endregion

            #region page 6

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_103"), y, width, height);//Intermédiaire en opérations de banque et en services de paiement
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_099"), GetOptionAttributeValue(lstOptionAttributeValue, 5)), y += interligne * 1.5f, width, height);
            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 43), y += interligne); //Courtier en opérations de banque et en services de paiement
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_104")), y, width, height, 15);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_105")), y += interligne, width, height * 2);
            pdfGen.AddBlueBorder(y += interligne * 2f, 0, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 6), y + 5, width, 60, 2);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_106")), y += (interligne * 4f) + 5, width, height * 4);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 8), y + 5, width, 60, 2);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 46), y += (interligne * 4f) + 10); //Mandataire non exclusif en opérations de banque et en service de paiement
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_107")), y, width, height, 15);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_105")), y += interligne * 2, width, height * 2);
            pdfGen.AddBlueBorder(y += interligne * 2f, 0, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 10), y + 5, width, 60, 2);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_108")), y += (interligne * 4f) + 5, width, height * 2);
            pdfGen.AddBlueBorder(y += interligne * 2f, 0, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 12), y + 5, width, 60, 2);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 49), y += (interligne * 4f) + 10);//Mandataire exclusif en opérations de banque et en services de paiement
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_109")), y, width, height, 15);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_110")), y += interligne * 2, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 14), y + 5, width, 60, 2);

            #endregion

            #region page 7

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_108")), y, width, height * 2);
            pdfGen.AddBlueBorder(y += interligne * 2.5f, 0, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 16), y + 5, width - 10, 60, 2);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_106")), y += (interligne * 5f), width, height * 4);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 18), y + 5, width - 10, 60, 2);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 53), y += (interligne * 5f) + 5);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_111")), y, width, height, 15);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_112"), GetOptionAttributeValue(lstOptionAttributeValue, 20)), y += interligne * 1.5f, width, height * 2);

            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_113"), y += interligne * 2.5f, width, height, paddingLeft);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 54), y += (interligne * 1.5f) + 5, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_114")), y, width, height, paddingLeft + 15);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_115")), y += interligne * 1.5f, width, height, paddingLeft + 10);
            pdfGen.AddBlueBorder(y += interligne, paddingLeft + 10, width - 10, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 21), y + 5, width - 15, 60, paddingLeft + 12);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_116")), y += (interligne * 4f) + 5, width - 10, height, paddingLeft + 10);
            pdfGen.AddBlueBorder(y += interligne, paddingLeft + 10, width - 10, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 23), y + 5, width - 15, 60, paddingLeft + 12);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_117")), y += (interligne * 4f) + 5, width - 10, height * 4, paddingLeft + 10);
            pdfGen.AddBlueBorder(y += interligne * 3f, paddingLeft + 10, width - 10, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 25), y + 5, width - 15, 60, paddingLeft + 12);
            #endregion

            #region page 8

            pdfGen.CreatePage();
            y = 0;

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 58), y, paddingLeft);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_118")), y, width - 10, height, paddingLeft + 15);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_116")), y += interligne * 1.5f, width - 10, height, paddingLeft + 10);
            pdfGen.AddBlueBorder(y += interligne, paddingLeft + 10, width - 10, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 27), y + 5, width - 15, 60, paddingLeft + 12);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_119")), y += (interligne * 4f) + 5, width - 10, height * 2, paddingLeft + 10);
            pdfGen.AddBlueBorder(y += interligne * 2.5f, paddingLeft + 10, width - 10, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 29), y + 5, width - 15, 60, paddingLeft + 12);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 62), y += (interligne * 5f));
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_120")), y, width, height, 15);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_116")), y += interligne * 1.5f, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 33), y + 5, width - 10, 60, 2);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_119")), y += (interligne * 5f), width, height * 2);
            pdfGen.AddBlueBorder(y += interligne * 2.5f, 0, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 34), y + 5, width - 10, 60, 2);

            #endregion

            #region page 9

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_121"), y, width, height);//Intermédiaire d'assurance
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_099"), GetOptionAttributeValue(lstOptionAttributeValue, 720)), y += interligne * 1.5f, width, height);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 66), y += interligne * 1.5f);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_122")), y, width, height, 15);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_123")), y += interligne, width, height * 4);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_094")), y += (interligne * 3f) + 5, width, height, 20);
            pdfGen.AddBlueBorder(y += interligne, 20, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 710), y + 5, width - 10, 60, 22);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_106")), y += (interligne * 4f) + 5, width, height * 4, 20);
            pdfGen.AddBlueBorder(y += interligne * 3f, 20, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 712), y + 5, width - 10, 60, 22);

            PlotBooleanValue(pdfGen, GetOptionValue(lstOptionValue, 67), y += (interligne * 5f));//Courtier de catégorie « c »
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_125")), y, width, height, 15);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_126")), y += interligne, width, height * 2);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_124")), y += (interligne * 2f), width, height, 20);
            pdfGen.AddBlueBorder(y += interligne, 20, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 714), y + 5, width - 10, 60, 22);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_127")), y += (interligne * 4f) + 5, width, height, 20);
            pdfGen.AddBlueBorder(y += interligne, 20, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 716), y + 5, width - 10, 60, 22);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_106")), y += (interligne * 4f) + 5, width, height * 4, 20);
            pdfGen.AddBlueBorder(y += interligne * 3f, 20, width, 60);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 718), y + 5, width - 10, 60, 22);

            #endregion

            #region page 10

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_128"), y, width, height);//Agent immobilier
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_099"), GetOptionAttributeValue(lstOptionAttributeValue, 47)), y += interligne * 1.5f, width, height);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_074"), GetOptionAttributeValue(lstOptionAttributeValue, 48)), y += interligne * 1.5f, width, height);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_075"), GetOptionAttributeValue(lstOptionAttributeValue, 49)), y += interligne * 1.5f, width, height);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_094")), y += interligne * 1.5f, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 100);
            pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 50), y + 5, width, 100, 2);

            ////Compétence juridique appropriée
            //pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_129"), y += height * 7, width, height);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_099"), GetOptionAttributeValue(lstOptionAttributeValue, 53)), y += interligne * 1.5f, width, height);

            ////Démarcheur financier
            //pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_130"), y += height * 3, width, height);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_099"), GetOptionAttributeValue(lstOptionAttributeValue, 51)), y += interligne * 1.5f, width, height);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_094")), y += interligne * 1.5f, width, height);
            //pdfGen.AddBlueBorder(y += interligne, 0, width, 100);
            //pdfGen.AddJustifyText(GetOptionAttributeValue(lstOptionAttributeValue, 52), y + 5, width, 100, 2);

            //OLD page 11
            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_131"), y += height * 6, width, height);//Responsabilité civile professionnelle
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_132"), y += interligne * 1.5f, width, height * 4);

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfFirm_133"), y += interligne * 3f, width, height);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_134"), GetOptionAttributeValue(lstOptionAttributeValue, 65)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_134"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 65), y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_026"), GetOptionAttributeValue(lstOptionAttributeValue, 66)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_026"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 66), y, answer_width, height * 3, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_027"), GetOptionAttributeValue(lstOptionAttributeValue, 67)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_027"), string.Empty), y += interligne * 2.8f, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 67), y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_028"), GetOptionAttributeValue(lstOptionAttributeValue, 68)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_028"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 68), y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_135"), GetOptionAttributeValue(lstOptionAttributeValue, 69)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_135"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 69), y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_136"), GetOptionAttributeValue(lstOptionAttributeValue, 70)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_136"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 70), y, answer_width, height, answer_x);

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfFirm_137"), y += interligne * 2f, width, height);
            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_134"), GetOptionAttributeValue(lstOptionAttributeValue, 71)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_134"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 71), y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_026"), GetOptionAttributeValue(lstOptionAttributeValue, 72)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_026"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 72), y, answer_width, height * 3, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_027"), GetOptionAttributeValue(lstOptionAttributeValue, 73)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_027"), string.Empty), y += interligne * 2.8f, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 73), y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_028"), GetOptionAttributeValue(lstOptionAttributeValue, 74)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_028"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 74), y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_135"), GetOptionAttributeValue(lstOptionAttributeValue, 75)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_135"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 75), y, answer_width, height, answer_x);

            //pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_136"), GetOptionAttributeValue(lstOptionAttributeValue, 76)), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfFirm_136"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(GetOptionAttributeValue(lstOptionAttributeValue, 76), y, answer_width, height, answer_x);


            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_138"), y += interligne * 3, width, height);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_139"), _type != null ? _type.Name : string.Empty), y += interligne * 2, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_140"), y += interligne * 2, width, height);


            #endregion

            #region page 11
            int _tarificationParentID = 350;
            bool useDefaultTarification = false;
            var _customerTarification = CustomerProspectOptionBL.GetOptionValueListWithIdCustomerProspectAndIdParentOption(customerID, _tarificationParentID);

            if (_customerTarification.Count() == 0)
                useDefaultTarification = true;

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_141"), y, width, height);//Mode de facturation et rémunération du professionnel

            object opt = null;
            if (useDefaultTarification)
                opt = GetOptionValue(lstOptionValue, 106);
            else
                opt = GetCustomerOptionValue(_customerTarification, 353);
            PlotBooleanValue(pdfGen, opt, y += interligne * 1.5f);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_142")), y, width, height, 15);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 60);
            string txt = string.Empty;
            if (useDefaultTarification)
                txt = GetOptionAttributeValue(lstOptionAttributeValue, 78);
            else
            {
                var option = GetCustomerOptionValue(_customerTarification, 353);
                if (option != null && option.CustomerProspectOptionAttributeValue != null)
                    txt = GetCustomerOptionAttributeValue(option.CustomerProspectOptionAttributeValue.ToList(), 255);
                else
                    txt = string.Empty;
            }

            pdfGen.AddJustifyText(txt, y + 5, width - 10, 60, 2);

            if (useDefaultTarification)
                opt = GetOptionValue(lstOptionValue, 107);
            else
                opt = GetCustomerOptionValue(_customerTarification, 354);
            PlotBooleanValue(pdfGen, opt, y += (interligne * 4f) + 10);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_143")), y, width, height, 15);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 60);
            if (useDefaultTarification)
                txt = GetOptionAttributeValue(lstOptionAttributeValue, 79);
            else
            {
                var option = GetCustomerOptionValue(_customerTarification, 354);
                if (option != null && option.CustomerProspectOptionAttributeValue != null)
                    txt = GetCustomerOptionAttributeValue(option.CustomerProspectOptionAttributeValue.ToList(), 256);
                else
                    txt = string.Empty;
            }
            pdfGen.AddJustifyText(txt, y + 5, width - 10, 60, 2);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_144")), y += (interligne * 4f) + 10, width, height);

            if (useDefaultTarification)
                opt = GetOptionValue(lstOptionValue, 108);
            else
                opt = GetCustomerOptionValue(_customerTarification, 355);
            PlotBooleanValue(pdfGen, opt, y += (interligne * 2f));

            // Fraction des frais de gestion des supports financiers de :
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_145")), y, width, height, 15);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 282);
            if (useDefaultTarification)
                txt = GetOptionAttributeValue(lstOptionAttributeValue, 80);
            else
            {
                var option = GetCustomerOptionValue(_customerTarification, 355);
                if (option != null && option.CustomerProspectOptionAttributeValue != null)
                    txt = GetCustomerOptionAttributeValue(option.CustomerProspectOptionAttributeValue.ToList(), 257);
                else
                    txt = string.Empty;
            }
            pdfGen.AddJustifyText(txt, y + 5, width - 10, 282, 2);
            #endregion

            #region page 12
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_146")), y, width, height);
            if (useDefaultTarification)
                opt = GetOptionValue(lstOptionValue, 109);
            else
                opt = GetCustomerOptionValue(_customerTarification, 356);
            PlotBooleanValue(pdfGen, opt, y += (interligne * 2f));

            // Autre mode de tarification TTC (en €) :
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_147")), y, width, height, 15);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 282);
            if (useDefaultTarification)
                txt = GetOptionAttributeValue(lstOptionAttributeValue, 81);
            else
            {
                var option = GetCustomerOptionValue(_customerTarification, 356);
                if (option != null && option.CustomerProspectOptionAttributeValue != null)
                    txt = GetCustomerOptionAttributeValue(option.CustomerProspectOptionAttributeValue.ToList(), 258);
                else
                    txt = string.Empty;
            }
            pdfGen.AddJustifyText(txt, y + 5, width, 282, 2);
            #endregion

            #region page 13
            pdfGen.CreatePage();
            y = 0;

            if (useDefaultTarification)
                opt = GetOptionValue(lstOptionValue, 110);
            else
                opt = GetCustomerOptionValue(_customerTarification, 357);

            PlotBooleanValue(pdfGen, opt, y);
            // Autre mode de tarification TTC (en %) :
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_164")), y, width, height, 15);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 282);
            if (useDefaultTarification)
                txt = GetOptionAttributeValue(lstOptionAttributeValue, 82);
            else
            {
                var option = GetCustomerOptionValue(_customerTarification, 356);
                if (option != null && option.CustomerProspectOptionAttributeValue != null)
                    txt = GetCustomerOptionAttributeValue(option.CustomerProspectOptionAttributeValue.ToList(), 259);
                else
                    txt = string.Empty;
            }
            pdfGen.AddJustifyText(txt, y + 5, width, 282, 2);

            if (useDefaultTarification)
                opt = GetOptionValue(lstOptionValue, 112);
            else
                opt = GetCustomerOptionValue(_customerTarification, 358);
            PlotBooleanValue(pdfGen, opt, y += 282 + 10);
            // Tarification spécifique:
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_148")), y, width, height, 15);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 282);
            if (useDefaultTarification)
                txt = GetOptionAttributeValue(lstOptionAttributeValue, 84);
            else
            {
                var option = GetCustomerOptionValue(_customerTarification, 358);
                if (option != null && option.CustomerProspectOptionAttributeValue != null)
                    txt = GetCustomerOptionAttributeValue(option.CustomerProspectOptionAttributeValue.ToList(), 260);
                else
                    txt = string.Empty;
            }
            pdfGen.AddJustifyText(txt, y + 5, width, 282, 2);
            #endregion

            #region page 14

            pdfGen.CreatePage();
            y = 0;

            //Titre conflit d'interet
            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_148_0"), y, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_1"), y += (interligne * 2f), width, height * 2);
            pdfGen.AddReference(LanguageContentBL.Translate("PdfFirm_148_2"), y += (interligne * 3f) - 6, width, height);

            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_3"), y += interligneParagraph, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_4"), y += interligneParagraph, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_5"), y += interligneParagraph, width, height, 20);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_5_2"), y += interligne, width, height, 20);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_5_3"), y += interligne, width, height, 20);
            pdfGen.AddReference(LanguageContentBL.Translate("PdfFirm_148_6"), y += (interligne * 1.5f), width, height);

            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_7"), y += interligneParagraph, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_8"), y += interligneParagraph, width, height * 2);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_9"), y += (interligne * 3) - 10, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_10"), y += interligneParagraph, width, height, 20);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_10_2"), y += interligne, width, height, 20);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_10_3"), y += interligne, width, height, 20);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_10_4"), y += interligne, width, height, 20);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_10_5"), y += interligne, width, height, 20);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_148_10_6"), y += interligne, width, height, 20);
            pdfGen.AddReference(LanguageContentBL.Translate("PdfFirm_148_11"), y += (interligne * 1.5f), width, height * 2);

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfFirm_148_12"), y += (interligne * 1.5f), width, height);
            pdfGen.AddBlueBorder(y += interligneParagraph, 0, width, 6 * height);
            pdfGen.AddJustifyText(pFirm.ConflictOfInterstSystem, y + 5, width - 20, 6 * height, 5);
            #endregion

            #region page 15

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_149"), y, width, height);//Informations relatives au traitement des réclamations
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_150")), y += (interligne * 2f), width, height * 2);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_151")), y += (interligne * 2f), width, height * 3);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_152")), y += (interligne * 2), width, height);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_153")), y += (interligne), width, height, 10);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_154")), y += (interligne), width, height, 10);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_155")), y += (interligne), width, height, 10);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_156")), y += (interligne), width, height * 2, 10);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_157")), y += (interligne * 2), width, height, 10);//Liste des sites internet
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_158")), y += (interligne), width, height, 10);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_159")), y += (interligne), width, height, 10);
            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_160")), y += (interligne), width, height, 10);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfFirm_161")), y += (interligne * 2), width, height);

            pdfGen.AddTitle(LanguageContentBL.Translate("PdfFirm_162"), y += interligne * 2, width, height);//Clause de confidentialité
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfFirm_163"), y += interligne * 1.5f, width, height * 3);

            #endregion

            #region page 16
            pdfGen.CreatePage();

            //Signature
            pdfGen.AddTitle(LanguageContentBL.Translate("Pdf_Signature"), 0);

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("Pdf_Signature_Etabs"), 100, 500, 20, 80);


            pdfGen.AddBlueBorder(130, 35, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 40);//J'ai lu et j'accepte les conditions générales.
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 40);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 40);
            }

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("Pdf_Signature_Client"), 100, 500, 20, 340);
            pdfGen.AddBlueBorder(130, 280, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 285);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 285);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 285);
            }

            #endregion

            //Force download if pathFileName is not set
            if (forceDownload)
            {
                string fileName = string.Format("document_entree_en_relation_{0}.pdf", pFirm.idFirmInstitution);
                pdfGen.GeneratePdfToWeb(fileName);
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }

            return pdfGen.PageCount;
        }
コード例 #17
0
        public static int GeneratePMReport(Guid idReport, string pathFilename, bool forceDownload, bool pIsEmptyReport = false)
        {
            var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP");
            FirmInstitution firmInstitution = new FirmInstitution();
            Data.Model.Report report = new Data.Model.Report();
            Data.Model.CustomerProspect customerProspect = new Data.Model.CustomerProspect();
            // int tabCheck = 15;
            //  int tabYesNo = 20;

            Data.Model.Report tempReport = ReportBL.GetReportWithValues(idReport);
            Data.Model.CustomerProspect tempCustomerProspect = CustomerProspectBL.GetCustomerProspectById(tempReport.idCustomerProspect);
            FirmInstitution tempFirmInstitution = Upsilab.Business.Configuration.FirmInstitutionBL.GetFirmInstitutionByIdFirmInstitution(tempCustomerProspect.idFirmInstitution);

            if (!pIsEmptyReport)
            {
                report = tempReport;
                customerProspect = tempCustomerProspect;
                firmInstitution = tempFirmInstitution;
            }



            report.IsEmptyReport = pIsEmptyReport;
            bool isEmptyReport = pIsEmptyReport;

            var languageData = PageLanguageHelper.GetLanguageContent("User", "PDF_PM_Report");

            double somme = 0, d;

            //Title and footer document
            string documentTitle = "Recueil d'informations";
            string footerContent = tempFirmInstitution.DocumentFooterContent; //temp is ok for empty or not empty doc

            //  FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent);
            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle)

            string name = string.Empty;
            string date = string.Empty;
            if (!pIsEmptyReport)
            {
                name = customerProspect.CompanyName;
                date = DateTime.Now.ToShortDateString();
            }
            if (forceDownload)
                date = string.Empty;

            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent, name, string.Format("{0} {1}", string.IsNullOrEmpty(date) ? string.Empty : languageDataPP.GetContent("PdfReportPP_004"), date));


            #region Page 1 : Title & Logo

            pdfGen.AddBackgroungImage();
            //Logo
            string logoPathFileName = FileManager.BuildLogoPath(tempFirmInstitution.idFirmInstitution) + tempFirmInstitution.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName, tempFirmInstitution.LogoAlign);


            ////Title
            //float y = 240;
            //pdfGen.AddReceuil_Title_Center_CalibriBold_Label(languageData.GetContent("Report_Title"), y, 500, 20);
            //pdfGen.AddReceuil_Title_Center_CalibriBold_Label(languageData.GetContent("Report_Title2"), y += paddingAfterParagraph, 500, 20);
            //pdfGen.AddReceuil_SubTitle_Center_CalibriBold_Label(languageData.GetContent("Report_Subtitle"), y += (2 * interline), 500, 11);

            float y = 360;
            pdfGen.AddWhiteTitle(languageData.GetContent("Report_Title"), y, 240, 60, 260, 20);//Questionnaire relatif au recueil d’informations
            pdfGen.AddWhiteTitle(languageData.GetContent("Report_Title2"), y += (2 * interline + 15), 200, 20, 300, 20);//clients/prospects
            pdfGen.AddWhiteTitle(languageData.GetContent("Report_Subtitle"), y += (2 * interline + 15), max_width, 20, 0, 12);

            pdfGen.AddWhiteBorder(y += interline * 1.7f, 195, 305, 70);

            if (isEmptyReport)
            {
                //string[] rowContents = { languageData.GetContent("Report_Date"), languageData.GetContent("Report_Reference"), string.Empty };
                //pdfGen.AddTableTitle(rowContents, 110, y += (2 * interline));
            }
            else
            {
                //string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Date"), DateTime.Now.ToShortDateString())
                //                     , string.Format("{0}-{1}", languageData.GetContent("Report_Reference"), idReport)
                //                     , string.Format("{0}", customerProspect.CompanyName)
                //                   };
                //pdfGen.AddTableTitle(rowContents, 110, y += (2 * interline));
                if (!forceDownload)
                    pdfGen.AddWhiteTitleLeft(DateTime.Now.ToShortDateString(), y += 10, max_width, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(name, y += (interline), max_width, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(string.Format("{0}-{1}", languageDataPP.GetContent("PdfReportPP_005"), idReport), y += (interline), max_width, 11, 220, 10);

            }

            //pdfGen.AddBlueBorder(480, 108, 308, 30);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(string.Format("{0}", customerProspect.CompanyName), 490, 300, 20, 120);
            #endregion

            #region Page 2 : IDENTIFICATION DE L’ÉTABLISSEMENT
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddTitle(languageData.GetContent("Page1_Section1_Title"), y, 500, 20);
            /*pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page1_Section1_Paragraph1_Line1"), 20, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page1_Section1_Paragraph1_Line2"), 30, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page1_Section1_Paragraph1_Line3"), 40, 500, 20);
            */
            string stextLine1 = languageData.GetContent("Page1_Section1_Paragraph1_Line4");
            pdfGen.AddJustifyText(stextLine1, y += interline + 5, 500, 60);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page1_Section1_Paragraph2_Line1"), 60, 500, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page1_Section1_Paragraph2_Line2"), 70, 500, 20);

            string stextLine2 = languageData.GetContent("Page1_Section1_Paragraph2_Line3");
            pdfGen.AddJustifyText(stextLine2, y += interline * 2.8f, 500, 40, 0);

            pdfGen.AddDefaultText(languageData.GetContent("Page1_Section1_NameOfEstablishement"), y += interline * 2f, label_width, height);
            pdfGen.AddAnswer(firmInstitution.FirmInstitutionName, y, answer_width, height, answer_x);


            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.FR.ToString())
            {
                pdfGen.AddDefaultText(languageData.GetContent("Page1_Section1_Name"), y += interline, label_width, height);
                pdfGen.AddAnswer(firmInstitution.LeaderName, y, answer_width, height, answer_x);

                pdfGen.AddDefaultText(languageData.GetContent("Page1_Section1_FirstName"), y += interline, label_width, height);
                pdfGen.AddAnswer(firmInstitution.LeaderFirstName, y, answer_width, height, answer_x);

                pdfGen.AddDefaultText(languageData.GetContent("Page1_Section1_RCS"), y += interline, label_width, height);
                pdfGen.AddAnswer(firmInstitution.RCS, y, answer_width, height, answer_x);
                //y = 165;
            }
            else
            {
                //Numéro d'entreprise : 
                pdfGen.AddDefaultText(languageData.GetContent("Page1_Section1_RCS"), y += interline, label_width, height);
                pdfGen.AddAnswer(firmInstitution.RegisteredInRegister, y, answer_width, height, answer_x);

                //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format("{0} {1}", languageData.GetContent("Page1_Section1_769"), firmInstitution.RCS), 165, 600, 20, 300);//Numéro FSMA :
                var optionValue = Business.Configuration.FirmInstitutionOptionBL.GetFirmInstitutionOptionAttributeValueByFirmAndIdOptionAttribute(firmInstitution.idFirmInstitution, 1);
                var optFSMA = string.Empty;
                if (optionValue != null)
                    optFSMA = Convert.ToString(optionValue.Value);
                // pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format("{0} {1}", languageData.GetContent("Page1_Section1_769"), optFSMA), 165, 600, 20, 300);//Numéro FSMA :
                pdfGen.AddDefaultText(languageData.GetContent("Page1_Section1_769"), y += interline, label_width, height);
                pdfGen.AddAnswer(optFSMA, y, answer_width, height, answer_x);
                // y = 180;
            }
            //  pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page1_Section1_RCS"), firmInstitution.RCS), 165, 500, 20, 0, 10);
            // pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} {1}", languageData.GetContent("Page1_Section1_769"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 769))), 165, 600, 20, 300);
            // pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page1_Section1_StreetAddress"), firmInstitution.FirmStreet), 180, 500, 20, 0, 10);
            pdfGen.AddDefaultText(languageData.GetContent("Page1_Section1_StreetAddress"), y += interline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.FirmStreet, y, answer_width, height, answer_x);

            // pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page1_Section1_PostalCode"), firmInstitution.FirmPostCode), 195, 500, 20, 0, 10);
            pdfGen.AddDefaultText(languageData.GetContent("Page1_Section1_PostalCode"), y += interline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.FirmPostCode, y, answer_width, height, answer_x);

            //   pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page1_Section1_City"), firmInstitution.FirmCity), 210, 500, 20, 0, 10);
            pdfGen.AddDefaultText(languageData.GetContent("Page1_Section1_City"), y += interline, label_width, height);
            pdfGen.AddAnswer(firmInstitution.FirmCity, y, answer_width, height, answer_x);

            // y = 225;
            #region Conseiller signataire
            string signataireName = string.Empty;
            string signataireFirstName = string.Empty;

            if (!isEmptyReport)
            {
                Data.Model.User userAdviser = (report.User != null) ? report.User : customerProspect.User1;

                if (!string.IsNullOrEmpty(userAdviser.UserFirstName))
                {
                    signataireFirstName = userAdviser.UserFirstName;
                }

                if (!string.IsNullOrEmpty(userAdviser.UserName))
                {
                    signataireName = userAdviser.UserName;
                }
            }

            // pdfGen.AddJustifyText(String.Format(languageDataPP.GetContent("PdfReportPP_753"), signataireFirstName, signataireName), y, max_width, height);
            pdfGen.AddDefaultText(String.Format(languageDataPP.GetContent("PdfReportPP_753"), string.Empty, string.Empty), y += interline, label_width, height);
            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.FR.ToString())
                pdfGen.AddAnswer(String.Format("{0} {1} {2}", signataireFirstName, signataireName, " (signataire)"), y, answer_width, height, answer_x);
            else
                pdfGen.AddAnswer(String.Format("{0} {1}", signataireFirstName, signataireName), y, answer_width, height, answer_x);

            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(languageDataPP.GetContent("PdfReportPP_754"), signataireFirstName), y += 10, max_width, height);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(String.Format(languageDataPP.GetContent("PdfReportPP_755"), signataireName), y += 10, max_width, height);            
            #endregion

            pdfGen.AddOrangeTitle(languageData.GetContent("Page1_Section2_Title"), y += interline * 1.5f, 500, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page1_Section2_Paragraph1_Line1"), y += interline, 500, 20, 0);
            pdfGen.AddJustifyText(languageData.GetContent("Report_Symbol_Dash"), y += interline, 500 - 20, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page1_Section2_Paragraph1_Line2"), 245, 500 - 35, 20, 35,10);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page1_Section2_Paragraph1_Line3"), 230, 500 - 35, 20, 35,10);
            //string sText212 = string.Format(@"{0} {1}", languageData.GetContent("Page1_Section2_Paragraph1_Line2"), languageData.GetContent("Page1_Section2_Paragraph1_Line3"));
            string sText212 = languageData.GetContent("Page1_Section2_Paragraph1_Line8");
            pdfGen.AddJustifyText(sText212, y, 500 - 35, 40, 35);

            pdfGen.AddJustifyText(languageData.GetContent("Report_Symbol_Dash"), y += interline * 2, 500 - 20, 20, 20);
            //pdfGen.AddJustifyText(languageData.GetContent("Page1_Section2_Paragraph1_Line4"), 240, 500 - 35, 20, 35,10);
            //pdfGen.AddJustifyText(languageData.GetContent("Page1_Section2_Paragraph1_Line5"), 250, 500 - 35, 20, 35,10);
            //string sText214 = string.Format(@"{0} {1}", languageData.GetContent("Page1_Section2_Paragraph1_Line4"), languageData.GetContent("Page1_Section2_Paragraph1_Line5"));
            string sText214 = languageData.GetContent("Page1_Section2_Paragraph1_Line9");
            pdfGen.AddJustifyText(sText214, y, 500 - 35, 40, 35);
            pdfGen.AddJustifyText(languageData.GetContent("Report_Symbol_Dash"), y += interline * 2, 500 - 20, 20, 20);
            //pdfGen.AddJustifyText(languageData.GetContent("Page1_Section2_Paragraph1_Line6"), 260, 500 - 35, 20, 35,10);
            //pdfGen.AddJustifyText(languageData.GetContent("Page1_Section2_Paragraph1_Line7"), 270, 500 - 35, 20, 35,10);
            // string sText216 = string.Format(@"{0} {1}", languageData.GetContent("Page1_Section2_Paragraph1_Line6"), languageData.GetContent("Page1_Section2_Paragraph1_Line7"));
            string sText216 = languageData.GetContent("Page1_Section2_Paragraph1_Line10");
            pdfGen.AddJustifyText(sText216, y, 500 - 35, 40, 35);

            /*pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph2_Line1"), 290, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph2_Line2"), 300, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph2_Line3"), 310, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph2_Line4"), 320, 500, 20);
            */

            pdfGen.AddBlueBorder(y += 30, 0, max_width, 190);
            //string stext221 = string.Format(@"{0} {1} {2} {3}", languageData.GetContent("Page1_Section2_Paragraph2_Line1"), languageData.GetContent("Page1_Section2_Paragraph2_Line2"), languageData.GetContent("Page1_Section2_Paragraph2_Line3"), languageData.GetContent("Page1_Section2_Paragraph2_Line4"));
            string stext221 = languageData.GetContent("Page1_Section2_Paragraph2_Line5");
            pdfGen.AddJustifyText(stext221, y += 5, max_width - 20, 80, 10);

            /*pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph3_Line1"), 340, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph3_Line2"), 350, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph3_Line3"), 360, 500, 20);
            */
            string stext231 = string.Empty;
            float nextYPlus = 0;
            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.FR.ToString())
            {
                //stext231 = string.Format(@"{0} {1} {2}", languageData.GetContent("Page1_Section2_Paragraph3_Line1"), languageData.GetContent("Page1_Section2_Paragraph3_Line2"), languageData.GetContent("Page1_Section2_Paragraph3_Line3"));
                stext231 = languageData.GetContent("Page1_Section2_Paragraph3_Line4");
                pdfGen.AddJustifyText(stext231, y += interline * 3, max_width - 20, 60, 10);
                nextYPlus = interline * 2.8f;
            }
            else
            {
                stext231 = languageData.GetContent("Page1_Section2_Paragraph3_Line1");
                pdfGen.AddJustifyText(stext231, y += interline * 3, max_width - 20, 20, 10);
                nextYPlus = interline * 1.5f;
            }


            /*pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph4_Line1"), 380, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph4_Line2"), 390, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph4_Line3"), 400, 500, 20);
            */
            //string stext241 = string.Format(@"{0} {1} {2}", languageData.GetContent("Page1_Section2_Paragraph4_Line1"), languageData.GetContent("Page1_Section2_Paragraph4_Line2"), languageData.GetContent("Page1_Section2_Paragraph4_Line3"));
            string stext241 = languageData.GetContent("Page1_Section2_Paragraph4_Line4");
            pdfGen.AddJustifyText(stext241, y += nextYPlus, max_width - 20, 60, 10);

            /*pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph5_Line1"), 420, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph5_Line2"), 430, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph5_Line3"), 440, 500, 20);
            pdfGen.AddReceuil_DetailText_Justify_CalibriItalic_Label(languageData.GetContent("Page1_Section2_Paragraph5_Line4"), 450, 500, 20);
            */
            //string stext251 = string.Format(@"{0} {1} {2} {3}", languageData.GetContent("Page1_Section2_Paragraph5_Line1"), languageData.GetContent("Page1_Section2_Paragraph5_Line2"), languageData.GetContent("Page1_Section2_Paragraph5_Line3"), languageData.GetContent("Page1_Section2_Paragraph5_Line4"));
            string stext251 = languageData.GetContent("Page1_Section2_Paragraph5_Line5");
            pdfGen.AddJustifyText(stext251, y += interline * 2.8f, max_width - 20, 80, 10);
            #endregion

            #region Page 3 : IDENTIFICATION DU TITULAIRE :I- Identité de la personne morale
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddTitle(languageData.GetContent("Page2_Section1_Title"), y, 500, 20);

            if (isEmptyReport)
                ReportBL.PlotBooleanValue(pdfGen, string.Empty, y += interline + textInterline, 30, Boolean.FalseString);
            else
                ReportBL.PlotBooleanValue(pdfGen, customerProspect.IsCorporation.Value, y += interline + textInterline, 30, Boolean.FalseString);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section1_Line1"), y, 500, 20, 50);

            if (isEmptyReport)
                ReportBL.PlotBooleanValue(pdfGen, string.Empty, y += interline, 30, Boolean.TrueString);
            else
                ReportBL.PlotBooleanValue(pdfGen, customerProspect.IsCorporation.Value, y += interline, 30, Boolean.TrueString);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section1_Line2"), y, 500, 20, 50);

            //Present physiquement ?
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section1_Line3"), y += interline + textInterline, 500, 20);

            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 502), y += interline, 40);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes"), y, 500, 20, 40 + tabCheck);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 503), y, 80);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No"), y, 500, 20, 80 + tabCheck);

            //I. Identité de la personne morale
            pdfGen.AddSubtitle(languageData.GetContent("Page2_Section2_Title"), y += interline + textInterline, 500, 20);

            //Raison sociale
            // pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line1"), customerProspect.CompanyName), y += interline + textInterline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line1"), string.Empty), y += interline + textInterline, label_width, height);
            pdfGen.AddAnswer(customerProspect.CompanyName, y, answer_width, height, answer_x);
            //Sigle
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line2"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 382))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line2"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 382)), y, answer_width, height, answer_x);
            //RCS
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line3"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 383))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line3"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 383)), y, answer_width, height, answer_x);

            // Ne pas afficher pour BE
            if (SessionManager.GetHostCodeSession() != PageLanguageHelper.HostCode.BE.ToString())
            {
                //Ville
                //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line4"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 384))), y += interline, 500, 20);
                pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line4"), string.Empty), y += interline, label_width, height);
                pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 384)), y, answer_width, height, answer_x);

                //Siren
                //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line5"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 385))), y += interline, 500, 20);
                pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line5"), string.Empty), y += interline, label_width, height);
                pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 385)), y, answer_width, height, answer_x);

                //Date immatric
                //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line6"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 386))), y += interline, 500, 20);
                pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section2_Line6"), string.Empty), y += interline, label_width, height);
                pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 386)), y, answer_width, height, answer_x);
            }

            //Adresse
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(languageData.GetContent("Page2_Section5_Line7"), y += interline, 500, 20);
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 390)), y += interline, 480, 60, 10);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section5_Line7"), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 390)), y, answer_width, height * 3, answer_x);


            //CP
            //  pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section5_cp"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 743))), y += (interline * 3), 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section5_cp"), string.Empty), y += interline * 2.5f, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 743)), y, answer_width, height, answer_x);

            //Ville
            // pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section5_ville"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 744))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section5_ville"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 744)), y, answer_width, height, answer_x);

            //Tel
            // pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section5_Line8"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 391))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section5_Line8"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 391)), y, answer_width, height, answer_x);

            //Fax
            // pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_fax"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 745))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_fax"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 745)), y, answer_width, height, answer_x);

            //Mail
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section5_Line9"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 392))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section5_Line9"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 392)), y, answer_width, height, answer_x);


            #region Domiciliation
            //France / Hors France
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 556), y += interline + 2);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section5_Line1_Item1"), y, 500, 20, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 557), y, 140);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section5_Line1_Item2"), y, 500, 20, 160);

            //Pays de domiciliation
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section5_Line2"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 389))), y += interline, 500, 20);
            pdfGen.AddBlueBorder(y += 25, 70, 410, 85);
            //Gafi
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(languageData.GetContent("Page2_Section5_Line3"), y += interline, 500, 20, 100);
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(languageData.GetContent("Page2_Section5_Line4"), y += interline, 500, 20, 100);
            //string sText253 = string.Format(@"{0} {1}", languageData.GetContent("Page2_Section5_Line3"), languageData.GetContent("Page2_Section5_Line4"));
            string sText253 = languageData.GetContent("Page2_Section5_Line3_1");
            pdfGen.AddJustifyText(sText253, y += 5, 380, 40, 90);

            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 559), y += interline * 1.7f, 100);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, 500, 20, 115);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 560), y, 140);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, 500, 20, 155);

            //Offshore
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(languageData.GetContent("Page2_Section5_Line5"), y += interline + textInterline, 500, 20, 100);
            //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(languageData.GetContent("Page2_Section5_Line6"), y += interline, 500, 20, 100);

            //string sText255 = string.Format(@"{0} {1}", languageData.GetContent("Page2_Section5_Line5"), languageData.GetContent("Page2_Section5_Line6"));
            string sText255 = languageData.GetContent("Page2_Section5_Line5_1");
            pdfGen.AddJustifyText(sText255, y += interline, 380, 40, 90);

            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 562), y += interline * 1.7f, 100);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, 500, 20, 115);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 563), y, 140);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, 500, 20, 155);
            #endregion

            #region Forme juridique
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line1"), y += interline + textInterline, 500, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 542), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line2"), y, 500, 20, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 543), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line3"), y, 500, 20, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 544), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line4"), y, 500, 20, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 545), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line5"), y, 500, 20, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 546), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line6"), y, 500, 20, 20);
            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 547), y, 320);
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line6_Item1"), y, 500, 20, 340);
                ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 548), y, 360);
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line6_Item2"), y, 500, 20, 380);
            }

            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 549), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line7"), y, 500, 20, 20);

            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 550), y, 320);
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line7_Item1"), y, 500, 20, 340);
                ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 551), y, 360);
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line7_Item2"), y, 500, 20, 380);
            }

            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 552), y += interline);
            pdfGen.AddDefaultText(string.Format("{0} {1}", languageData.GetContent("Page2_Section3_Line8"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 387))), y, 500, 20, 20);
            //pdfGen.AddDefaultText(string.Format("{0} {1}", languageData.GetContent("Page2_Section3_Line8"), customerProspect.LegalForm_Autre), 355, 500, 20, 20);

            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 553), y, 320);
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line8_Item1"), y, 500, 20, 340);
                ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 554), y, 360);
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line8_Item2"), y, 500, 20, 380);
            }

            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 555), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line9"), y, 500, 20, 20);
            pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, "LABPM_Client_0100")), y, 500, 20, 190); // A maintenir !!

            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(languageData.GetContent("Page2_Section3_Line10"), y += interline, 500, 20, 20);
                ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 1258), y);
            }

            #endregion

            #region Societe cotee
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddDefaultText(languageData.GetContent("Page2_Section4_Line1"), y, 500, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 565), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 566), y, 40);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, 500, 20, 55);

            //Sur quel marché
            pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page2_Section4_Line2"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 393))), y += interline + textInterline, 500, 20);

            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section4_Line3"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 394))), y += interline, 500, 20);
            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section4_Line4"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 395))), y += interline, 500, 20);
            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page2_Section4_Line5"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 396))), y += interline, 500, 20);
            #endregion

            #endregion

            #region II.     Secteur d’activité
            pdfGen.AddSubtitle(languageData.GetContent("Page3_Section1_Title"), y += (2 * paddingAfterParagraph), 500, 20);

            pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 397)), y += (2 * interline), 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section1_Line1"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 398))), y += interline, 500, 20);

            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line2"), y += paddingAfterParagraph, 500, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 570), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 571), y, 40);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, 500, 20, 55);

            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line3"), y += paddingAfterParagraph, 500, 20);
            pdfGen.AddBlueBorder(y + interline);
            pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 388)), y += paddingAfterParagraph, 480, 65, 10);

            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section1_Line4"), y += 75, 500, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 573), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 574), y, 40);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, 500, 20, 55);
            #endregion

            #region III.     Dirigeant/ mandataire social / représentant
            //Civilité
            pdfGen.AddSubtitle(languageData.GetContent("Page3_Section2_Title"), y += (2 * paddingAfterParagraph), 500, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section2_Line1"), y += (2 * interline), 500, 20);

            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 577), y, 40);
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section2_Line1_Item1"), y, 500, 20, 55);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 578), y, 110);
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section2_Line1_Item2"), y, 500, 20, 125);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 1231), y, 180);
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section2_Line1_Item3"), y, 500, 20, 195);

            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line2"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 399))), y += paddingAfterParagraph, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line2"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 399)), y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line3"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 400))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line3"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 400)), y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_telPortable"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 401))), y += interline, 500, 20);//tel 
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_telPortable"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 401)), y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_telPro"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 402))), y += interline, 500, 20);//tel
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_telPro"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 402)), y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_fax"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 746))), y += interline, 500, 20);//fax
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_fax"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 746)), y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_email"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 747))), y += interline, 500, 20);//email
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_email"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 747)), y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(languageData.GetContent("PDFPM_adresse"), y += interline, 500, 20);//adresse
            // pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 748)), y, 400, 60, 50);//adresse
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_adresse"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 748)), y, answer_width, height * 3, answer_x);

            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_cp"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 749))), y += (2.8f * interline), 500, 20);//cp
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_cp"), string.Empty), y += interline * 2.8f, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 749)), y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_ville"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 750))), y += interline, 500, 20);//ville
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_ville"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 750)), y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line4"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 403))), y, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line4"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 403)), y, answer_width, height, answer_x);
            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.BE.ToString())
            {
                //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line4_767"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 767))), y, 500, 20, 150);
                pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line4_767"), string.Empty), y += interline, label_width, height);
                pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 767)), y, answer_width, height, answer_x);

                //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line4_768"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 768))), y, 500, 20, 300);
                pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line4_768"), string.Empty), y += interline, label_width, height);
                pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 768)), y, answer_width, height, answer_x);
            }
            // pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line5"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 404))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line5"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 404)), y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line6"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 405))), y, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section2_Line6"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 405)), y, answer_width, height, answer_x);

            if (SessionManager.GetHostCodeSession() == PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(languageData.GetContent("Page3_Section2_Line7_Item1_1244"), y += interline + 5, 500, 20);
                ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 580), y, 200);
                pdfGen.AddDefaultText(languageData.GetContent("Page3_Section2_Line7_Item1_1245"), y, 500, 20, 215);
                ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 581), y, 240);
                pdfGen.AddDefaultText(languageData.GetContent("Page3_Section2_Line7_Item2_1246"), y, 500, 20, 255);
            }

            #region Resident
            pdfGen.CreatePage();
            y = 0;

            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 580), y);
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section2_Line7_Item1"), y, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 581), y, 80);
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section2_Line7_Item2"), y, 500, 20, 95);

            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page3_Section3_Line1"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 406))), y += interline, 500, 20);
            //pdfGen.AddDefaultText(languageData.GetContent("Page3_Section3_Line2"), y += interline, 500, 20, 100);
            //pdfGen.AddDefaultText(languageData.GetContent("Page3_Section3_Line3"), y += interline, 500, 20, 100);

            pdfGen.AddBlueBorder(y += 20, 70, 400, 95);
            // string sText332 = string.Format(@"{0} {1}", languageData.GetContent("Page3_Section3_Line2"), languageData.GetContent("Page3_Section3_Line3"));
            string sText332 = languageData.GetContent("Page3_Section3_Line3_1");
            pdfGen.AddDefaultText(sText332, y = y + interline, 350, height, 90);

            float x = 90;


            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 584), y = y + interline * 1.5f, x);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, max_width, height, x += tabCheck);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 585), y, x += tabYesNo);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, max_width, height, x += tabCheck);

            /*pdfGen.AddDefaultText(languageData.GetContent("Page3_Section3_Line4"), y += interline, 500, 20, 100);
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section3_Line5"), y += interline, 500, 20, 100);
            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section3_Line6"), y += interline, 500, 20, 100);
            */

            //            string sText334 = string.Format(@"{0} {1} {2}", languageData.GetContent("Page3_Section3_Line4"), languageData.GetContent("Page3_Section3_Line5"), languageData.GetContent("Page3_Section3_Line6"));
            string sText334 = languageData.GetContent("Page3_Section3_Line4_1");
            pdfGen.AddDefaultText(sText334, y = y + interline, 350, height, 90);

            x = 90;
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 587), y = y + interline * 1.5f, x);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, max_width, height, x += tabCheck);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 588), y, x += tabYesNo);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, max_width, height, x += tabCheck);

            pdfGen.AddDefaultText(languageData.GetContent("Page3_Section3_Line7"), y += interline * 1.8f, 500, 20);
            pdfGen.AddReference(languageData.GetContent("Page3_Section3_Line8"), y += interline, 500, 20);
            // pdfGen.AddReference(languageData.GetContent("Page3_Section3_Line9"), y += interline, 500, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 590), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 591), y, 40);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, 500, 20, 55);
            #endregion

            #endregion

            #region IV- Personnes habilitées

            pdfGen.CreatePage();

            pdfGen.AddSubtitle(languageData.GetContent("Page4_Section1_Title"), 0, 500, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line1"), 20, 500, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 594), 20, 180);
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line1_Item1"), 20, 500, 20, 195);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 595), 20, 205);
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line1_Item2"), 20, 500, 20, 220);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 596), 20, 230);
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line1_Item3"), 20, 500, 20, 245);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 597), 20, 255);
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line1_Item4"), 20, 500, 20, 270);
            ReportBL.PlotBooleanValue(pdfGen, ReportBL.GetReportOptionValueFromReportInstance(report, 598), 20, 280);
            pdfGen.AddDefaultText(languageData.GetContent("Page4_Section1_Line1_Item5"), 20, 500, 20, 295);

            int repeat = 0;

            if (ReportBL.GetReportOptionValueFromReportInstance(report, 594) != null)
                repeat = 1;
            else if (ReportBL.GetReportOptionValueFromReportInstance(report, 595) != null)
                repeat = 2;
            else if (ReportBL.GetReportOptionValueFromReportInstance(report, 596) != null)
                repeat = 3;
            else if (ReportBL.GetReportOptionValueFromReportInstance(report, 597) != null)
                repeat = 4;
            else if (ReportBL.GetReportOptionValueFromReportInstance(report, 598) != null)
                repeat = 5;
            else repeat = 0;

            float currentPosition = 20;

            if (repeat > 0)
            {
                List<ReportOptionAttributeValue> personnes = new List<ReportOptionAttributeValue>();
                switch (repeat)
                {
                    case 1:
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 407).FirstOrDefault());
                        break;
                    case 2:
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 407).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 408).FirstOrDefault());
                        break;
                    case 3:
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 407).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 408).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 409).FirstOrDefault());
                        break;
                    case 4:
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 407).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 408).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 409).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 410).FirstOrDefault());
                        break;

                    case 5:
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 407).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 408).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 409).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 410).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 411).FirstOrDefault());
                        break;

                }



                for (int r = 1; r <= repeat; r++)
                {
                    currentPosition = ReportBL.GeneratePMRLesPersonnesHabilitées(pdfGen, personnes[r - 1], languageData, currentPosition);
                }
            }
            #endregion

            #region V. Origine de la relation

            pdfGen.CreatePage();

            pdfGen.AddSubtitle(languageData.GetContent("Page5_Section1_Title"), 0, 500, 20);

            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(600, idReport), 25);
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line1_Item1"), 25, 500, 20, 20);

            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(601, idReport), 25, 250);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page5_Section1_Line1_Item2"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(422, idReport))), 25, 500, 20, 270);

            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line2"), 40, 500, 20, 250);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(603, idReport), 40, 350);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), 40, 500, 20, 365);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(604, idReport), 40, 400);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), 40, 500, 20, 415);

            //pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line3"), 55, 500, 20, 200);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 55, 300);
            //pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), 55, 500, 20, 320);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 55, 350);
            //pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), 55, 500, 20, 370);

            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(605, idReport), 40);
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line4"), 40, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(606, idReport), 55);
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line5"), 55, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(607, idReport), 70);
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line6"), 70, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(608, idReport), 85);
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line7"), 85, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(609, idReport), 100);
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line8"), 100, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(610, idReport), 115);
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line9"), 115, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(611, idReport), 130);
            pdfGen.AddDefaultText(languageData.GetContent("Page5_Section1_Line10"), 130, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(612, idReport), 145);
            pdfGen.AddDefaultText(String.Format(@"{0}: {1}", languageData.GetContent("Page5_Section1_Line11"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(423, idReport))), 145, 500, 20, 20);
            #endregion

            #region VI.     Le client/prospect a-t-il été démarché ?
            if (SessionManager.GetHostCodeSession() != PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddSubtitle(languageData.GetContent("Page5_Section2_Title"), 180, 500, 20);

                ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(614, idReport), 215);
                pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line1"), 215, 500, 20, 15);
                ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(615, idReport), 230);
                /*pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line2"), 230, 500, 20, 20);
                pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line3"), 245, 500, 20);
                pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line4"), 260, 500, 20);
                pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line5"), 275, 500, 20);
                pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line6_Item1"), 290, 500, 20);
                pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(languageData.GetContent("Page5_Section2_Line6_Item2"), 290, 500, 20, 247);
                pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line6_Item3"), 290, 500, 20, 432);
                pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line7"), 305, 500, 20);
                pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line8"), 320, 500, 20);
                pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line9"), 335, 500, 20);
                */
                //pdfGen.AddDefaultText(String.Format(@"{0} {1} {2} {3} {4} {5} {6} {7} {8} {9}", languageData.GetContent("Page5_Section2_Line2"), languageData.GetContent("Page5_Section2_Line3"), languageData.GetContent("Page5_Section2_Line4"), languageData.GetContent("Page5_Section2_Line5"), languageData.GetContent("Page5_Section2_Line6_Item1"), languageData.GetContent("Page5_Section2_Line6_Item2"), languageData.GetContent("Page5_Section2_Line6_Item3"), languageData.GetContent("Page5_Section2_Line7"), languageData.GetContent("Page5_Section2_Line8"), languageData.GetContent("Page5_Section2_Line9")), 230, 500 - 20, 160, 20);
                pdfGen.AddDefaultText(languageData.GetContent("Page5_Section2_Line2_1"), 230, 500 - 20, 160, 20);
            }
            #endregion

            #region VII.     Relations à diligences accrues

            pdfGen.CreatePage();

            y = 0;
            pdfGen.AddSubtitle(languageData.GetContent("Page6_Section1_Title"), y, 500, 20);
            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(languageData.GetContent("Page6_Section1_Line1"), y += interline, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(618, idReport), y += interline, 35);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, 500, 20, 50);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(619, idReport), y, 80);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, 500, 20, 95);

            pdfGen.AddBlueBorder(y += interline, 20, max_width - 10, 130);
            pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page6_Section1_Line2"), y += 10, max_width - 30, 60, 30);

            pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page6_Section1_Line3"), y += interline * 4f, max_width - 30, 60, 30);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(languageData.GetContent("Page6_Section1_Line4"), y += interline * 5.5f, 500 - 15, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(621, idReport), y += interline, 35);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, 500, 20, 50);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(622, idReport), y, 80);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, 500, 20, 95);
            pdfGen.AddReference(languageData.GetContent("Page6_Section1_Line5"), y += interline, 500, 20, 35);
            #endregion

            #region VIII.     Bénéficiaire effectif
            pdfGen.AddSubtitle(languageData.GetContent("Page6_Section2_Title"), y += interline * 1.5f, 500, 20);
            pdfGen.AddReference(languageData.GetContent("Page6_Section2_Line1"), y += interline, 500, 20);

            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section2_Line2"), y += interline, 500, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(625, idReport), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), y, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(626, idReport), y, 40);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), y, 500, 20, 55);

            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section2_Line3"), y += interline * 1.3f, 500, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(628, idReport), y, 140);
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section2_Line3_Item1"), y, 500, 20, 155);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(629, idReport), y, 165);
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section2_Line3_Item2"), y, 500, 20, 180);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(630, idReport), y, 190);
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section2_Line3_Item3"), y, 500, 20, 205);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(631, idReport), y, 215);
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section2_Line3_Item4"), y, 500, 20, 230);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(632, idReport), y, 240);
            pdfGen.AddDefaultText(languageData.GetContent("Page6_Section2_Line3_Item5"), y, 500, 20, 255);
            //TODO: value not correct ?????
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 330, 265);
            //TODO: value not correct ???????????
            // pdfGen.AddDefaultText(String.Format(@"Autre: {0}", ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(423, idReport))), 330, 500, 20, 280);

            int repeat2 = 0;

            if (ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(628, idReport) != null)
                repeat2 = 1;
            else if (ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(629, idReport) != null)
                repeat2 = 2;
            else if (ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(630, idReport) != null)
                repeat2 = 3;
            else if (ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(631, idReport) != null)
                repeat2 = 4;
            else if (ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(632, idReport) != null)
                repeat2 = 5;
            else repeat2 = 0;

            float currentPosition2 = 330;

            if (repeat2 > 0)
            {
                List<ReportOptionAttributeValue> personnes = new List<ReportOptionAttributeValue>();
                switch (repeat2)
                {
                    case 1:
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 424).FirstOrDefault());
                        break;
                    case 2:
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 424).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 425).FirstOrDefault());
                        break;
                    case 3:
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 424).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 425).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 426).FirstOrDefault());
                        break;
                    case 4:
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 424).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 425).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 426).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 427).FirstOrDefault());
                        break;
                    case 5:
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 424).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 425).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 426).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 427).FirstOrDefault());
                        personnes.Add(report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 428).FirstOrDefault());
                        break;

                }

                for (int r = 1; r <= repeat2; r++)
                {
                    currentPosition2 = ReportBL.GeneratePMRLesBénéficiaireEffectif(pdfGen, personnes[r - 1], languageData, currentPosition2);
                }
            }

            //if (currentPosition2 + 123 >= 700)
            //{
            //    pdfGen.CreatePage();
            //    currentPosition2 = 0;
            //}

            //TODO: no data yet. can't find in UI
            //pdfGen.AddLabelNote("Notes", currentPosition2 + 15, 500, 20);
            //pdfGen.AddBlueBorder(currentPosition2 + 30);
            //pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(0, idReport)), currentPosition2 + 40, 480, 65, 10);
            #endregion

            #region RESULTATS FINANCIERS ET REVENUS
            #region I.     Résultats financiers
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddTitle(languageData.GetContent("Page7_Section1_Title"), y, 500, 20);

            /*pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line1"), y += (2 * interline), 500, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line2"), y += interline, 500, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section1_Line3"), y += interline, 500, 20);
            */
            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode ==
                Upsilab.Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                //string str = String.Format(@"{0} {1} {2}", languageData.GetContent("Page7_Section1_Line1"),
                //    languageData.GetContent("Page7_Section1_Line2"), languageData.GetContent("Page7_Section1_Line3"));
                string str = languageData.GetContent("Page7_Section1_Line2_1");
                pdfGen.AddDefaultText(str, y += (2 * interline), 500, 60);
            }
            else
                pdfGen.AddDefaultText(String.Format(@"{0}", languageData.GetContent("Page7_Section1_Line1")),
                    y += (2 * interline), 500, 60);

            #endregion

            #region II.     L’actif
            pdfGen.AddSubtitle(languageData.GetContent("Page7_Section2_Title"), y += (4 * interline), 500, 20);

            // pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page7_Section2_Line1"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(352, idReport))), y += paddingAfterParagraph, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page7_Section2_Line1"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(352, idReport)), y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page7_Section2_Line2"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(353, idReport))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page7_Section2_Line2"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(353, idReport)), y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page7_Section2_Line3"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(354, idReport))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page7_Section2_Line3"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(354, idReport)), y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page7_Section2_Line4"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(355, idReport))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page7_Section2_Line4"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(355, idReport)), y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page7_Section2_Line5"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(356, idReport))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page7_Section2_Line5"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(356, idReport)), y, answer_width, height, answer_x);


            pdfGen.AddSubtitle(languageData.GetContent("Page7_Section3_Title"), y += (2 * interline), 500, 20);

            pdfGen.AddDefaultText(languageData.GetContent("Page7_Section3_Line1"), y += paddingAfterParagraph, 500, 20, 50);

            pdfGen.AddDefaultText(GetReportOptionAttributeValueByIdOptionAttribute(725, report), y, 500, 20, 200);


            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(507, idReport), 285);
            //pdfGen.AddDefaultText(languageData.GetContent("Page7_Section3_Line2_Item1"), 285, 500, 20, 20);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(508, idReport), 285, 70);
            //pdfGen.AddDefaultText(languageData.GetContent("Page7_Section3_Line2_Item2"), 285, 500, 20, 90);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(509, idReport), 285, 180);
            //pdfGen.AddDefaultText(languageData.GetContent("Page7_Section3_Line2_Item3"), 285, 500, 20, 200);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(510, idReport), 285, 295);
            //pdfGen.AddDefaultText(languageData.GetContent("Page7_Section3_Line2_Item4"), 285, 500, 20, 315);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(511, idReport), 285, 415);
            //pdfGen.AddDefaultText(languageData.GetContent("Page7_Section3_Line2_Item5"), 285, 500, 20, 435);

            Dictionary<int, string[]> rowData = new Dictionary<int, string[]>();
            somme = 0;
            string presentValue = "";
            var data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(358, idReport);
            presentValue = ReportBL.GetStringValue(data, "PresentValue");
            if (Double.TryParse(presentValue.Replace(".", ","), out d))
                somme += d;
            rowData.Add(0, new string[] {languageData.GetContent("Page7_Section3_Table1_Row1_Column1"), 
                                       presentValue,
                                        ReportBL.GetStringValue(data, "Source"),
                                        ReportBL.GetStringValue(data, "Description"),
                                        ReportBL.GetStringValue(data, "Country")});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(359, idReport);
            presentValue = ReportBL.GetStringValue(data, "PresentValue");
            if (Double.TryParse(presentValue.Replace(".", ","), out d))
                somme += d;
            rowData.Add(1, new string[] { languageData.GetContent("Page7_Section3_Table1_Row2_Column1"), 
                                       presentValue,
                                        ReportBL.GetStringValue(data, "Source"),
                                        ReportBL.GetStringValue(data, "Description"),
                                        ReportBL.GetStringValue(data, "Country")});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(360, idReport);
            presentValue = ReportBL.GetStringValue(data, "PresentValue");
            if (Double.TryParse(presentValue.Replace(".", ","), out d))
                somme += d;
            rowData.Add(2, new string[] { languageData.GetContent("Page7_Section3_Table1_Row3_Column1"),
                                        presentValue,
                                        ReportBL.GetStringValue(data, "Source"),
                                        ReportBL.GetStringValue(data, "Description"),
                                        ReportBL.GetStringValue(data, "Country")});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(361, idReport);
            presentValue = ReportBL.GetStringValue(data, "PresentValue");
            if (Double.TryParse(presentValue.Replace(".", ","), out d))
                somme += d;
            rowData.Add(3, new string[] { languageData.GetContent("Page7_Section3_Table1_Row4_Column1"), 
                                       presentValue,
                                        ReportBL.GetStringValue(data, "Source"),
                                        ReportBL.GetStringValue(data, "Description"),
                                        ReportBL.GetStringValue(data, "Country")});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(362, idReport);
            presentValue = ReportBL.GetStringValue(data, "PresentValue");
            if (Double.TryParse(presentValue.Replace(".", ","), out d))
                somme += d;
            rowData.Add(4, new string[] { languageData.GetContent("Page7_Section3_Table1_Row5_Column1"), 
                                       presentValue,
                                        ReportBL.GetStringValue(data, "Source"),
                                        ReportBL.GetStringValue(data, "Description"),
                                        ReportBL.GetStringValue(data, "Country")});

            rowData.Add(5, new string[] {  languageData.GetContent("Total"), 
                                       isEmptyReport?string.Empty: somme.ToString(),
                                       "",
                                       "",
                                       ""});

            pdfGen.AddTable(new string[] {  languageData.GetContent("Page7_Section3_Table1_Column1"), 
                                                    languageData.GetContent("Page7_Section3_Table1_Column2"), 
                                                    languageData.GetContent("Page7_Section3_Table1_Column3"), 
                                                    languageData.GetContent("Page7_Section3_Table1_Column4"), 
                                                    languageData.GetContent("Page7_Section3_Table1_Column5") },
                                                    rowData, 0, y += paddingAfterParagraph, 600, 220);
            data = null;
            rowData = null;

            pdfGen.AddReference(languageData.GetContent("Page7_Section3_Line3"), y += 220, 500, 20); //525
            pdfGen.AddReference(languageData.GetContent("Page7_Section3_Line4"), y += 10, 500, 20, 10);
            pdfGen.AddReference(languageData.GetContent("Page7_Section3_Line5"), y += 10, 500, 20, 10);
            pdfGen.AddReference(languageData.GetContent("Page7_Section3_Line6"), y += 10, 500, 20, 10);
            pdfGen.AddReference(languageData.GetContent("Page7_Section3_Line7"), y += 10, 500, 20, 10);
            pdfGen.AddReference(languageData.GetContent("Page7_Section3_Line8"), y += 10, 500, 20, 10);
            pdfGen.AddReference(languageData.GetContent("Page7_Section3_Line9"), y += 10, 500, 20, 10);
            pdfGen.AddReference(languageData.GetContent("Page7_Section3_Line10"), y += 10, 500, 20, 10);

            pdfGen.AddLabelNote(languageData.GetContent("Page7_Section3_Line11"), y += (2 * interline), 500, 20);
            pdfGen.AddBlueBorder(y += interline);
            pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(357, idReport)), y += 5, 480, 65, 10);
            #endregion

            #region III.     Le passif
            pdfGen.CreatePage();

            pdfGen.AddSubtitle(languageData.GetContent("Page8_Section1_Title"), 0, 500, 20);

            pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line1") + " : ", 30, 500, 20, 50);

            pdfGen.AddDefaultText(GetReportOptionAttributeValueByIdOptionAttribute(726, report), 30, 500, 20, 210);

            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(507, idReport), 60);
            //pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line2_Item1"), 60, 500, 20, 20);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(508, idReport), 60, 70);
            //pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line2_Item2"), 60, 500, 20, 90);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(509, idReport), 60, 180);
            //pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line2_Item3"), 60, 500, 20, 200);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(510, idReport), 60, 295);
            //pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line2_Item4"), 60, 500, 20, 315);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(511, idReport), 60, 415);
            //pdfGen.AddDefaultText(languageData.GetContent("Page8_Section1_Line2_Item5"), 60, 500, 20, 435);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(languageData.GetContent("Page8_Section1_Line3"), 90, 500, 20, 50);

            rowData = new Dictionary<int, string[]>();

            somme = 0;
            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(363, idReport);
            var AnnualAmount = ReportBL.GetStringValue(data, "AnnualAmount");
            if (Double.TryParse(AnnualAmount.Replace(".", ","), out d))
                somme += d;
            rowData.Add(0, new string[] {languageData.GetContent("Page8_Section1_Table1_Row1_Column1"), 
                                        AnnualAmount ,
                                        ReportBL.GetStringValue(data, "Term"),
                                        ReportBL.GetStringValue(data, "AdditionalInfo")});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(364, idReport);
            AnnualAmount = ReportBL.GetStringValue(data, "AnnualAmount");
            if (Double.TryParse(AnnualAmount.Replace(".", ","), out d))
                somme += d;
            rowData.Add(1, new string[] { languageData.GetContent("Page8_Section1_Table1_Row2_Column1"), 
                                         AnnualAmount,
                                        ReportBL.GetStringValue(data, "Term"),
                                        ReportBL.GetStringValue(data, "AdditionalInfo")});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(365, idReport);
            AnnualAmount = ReportBL.GetStringValue(data, "AnnualAmount");
            if (Double.TryParse(AnnualAmount.Replace(".", ","), out d))
                somme += d;
            rowData.Add(2, new string[] { languageData.GetContent("Page8_Section1_Table1_Row3_Column1"),
                                       AnnualAmount,
                                        ReportBL.GetStringValue(data, "Term"),
                                        ReportBL.GetStringValue(data, "AdditionalInfo")});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(366, idReport);
            AnnualAmount = ReportBL.GetStringValue(data, "AnnualAmount");
            if (Double.TryParse(AnnualAmount.Replace(".", ","), out d))
                somme += d;
            rowData.Add(3, new string[] { languageData.GetContent("Page8_Section1_Table1_Row4_Column1"), 
                                       AnnualAmount,
                                        ReportBL.GetStringValue(data, "Term"),
                                        ReportBL.GetStringValue(data, "AdditionalInfo")});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(367, idReport);
            AnnualAmount = ReportBL.GetStringValue(data, "AnnualAmount");
            if (Double.TryParse(AnnualAmount.Replace(".", ","), out d))
                somme += d;
            rowData.Add(4, new string[] { languageData.GetContent("Page8_Section1_Table1_Row5_Column1"), 
                                       AnnualAmount,
                                        ReportBL.GetStringValue(data, "Term"),
                                        ReportBL.GetStringValue(data, "AdditionalInfo")});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(368, idReport);
            AnnualAmount = ReportBL.GetStringValue(data, "AnnualAmount");
            if (Double.TryParse(AnnualAmount.Replace(".", ","), out d))
                somme += d;
            rowData.Add(5, new string[] { languageData.GetContent("Page8_Section1_Table1_Row6_Column1"), 
                                         AnnualAmount,
                                        ReportBL.GetStringValue(data, "Term"),
                                        ReportBL.GetStringValue(data, "AdditionalInfo")});

            rowData.Add(6, new string[] { languageData.GetContent("Total"), 
                                       isEmptyReport?string.Empty:somme.ToString(),
                                        "",
                                       ""});

            pdfGen.AddTable(new string[] { languageData.GetContent("Page8_Section1_Table1_Column1"), 
                                                    languageData.GetContent("Page8_Section1_Table1_Column2"), 
                                                    languageData.GetContent("Page8_Section1_Table1_Column3"), 
                                                    languageData.GetContent("Page8_Section1_Table1_Column4") }, rowData, 0, 80, 600, 400);
            data = null;
            rowData = null;

            pdfGen.AddLabelNote(languageData.GetContent("Page8_Section1_Line4"), 400, 500, 20);
            pdfGen.AddBlueBorder(415);
            pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(369, idReport)), 420, 480, 65, 10);
            #endregion

            #endregion

            #region VOS ORIENTATIONS PATRIMONIALES
            pdfGen.CreatePage();

            pdfGen.AddTitle(languageData.GetContent("Page9_Section1_Title"), 0);

            #region Hiérarchisation des priorités
            pdfGen.AddSubtitle(languageData.GetContent("Page9_Section1_Subtitle"), 30);

            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section1_Line1"), 60);

            rowData = new Dictionary<int, string[]>();

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(595, idReport);
            rowData.Add(0, new string[] { data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                        languageData.GetContent("Page9_Section1_Table1_Row1_Column2"),
                                        data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(596, idReport);
            rowData.Add(1, new string[] { data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                        languageData.GetContent("Page9_Section1_Table1_Row2_Column2"),
                                        data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(597, idReport);
            rowData.Add(2, new string[] {  data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                        languageData.GetContent("Page9_Section1_Table1_Row3_Column2"),
                                       data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(598, idReport);
            rowData.Add(3, new string[] { data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                        languageData.GetContent("Page9_Section1_Table1_Row4_Column2"),
                                        data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(599, idReport);
            rowData.Add(4, new string[] { data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                         languageData.GetContent("Page9_Section1_Table1_Row5_Column2"),
                                        data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(600, idReport);
            rowData.Add(5, new string[] {  data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                         languageData.GetContent("Page9_Section1_Table1_Row6_Column2"),
                                        data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(601, idReport);
            rowData.Add(6, new string[] {  data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                         languageData.GetContent("Page9_Section1_Table1_Row7_Column2"),
                                        data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(602, idReport);
            rowData.Add(7, new string[] { data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                         languageData.GetContent("Page9_Section1_Table1_Row8_Column2"),
                                       data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(603, idReport);
            rowData.Add(8, new string[] { data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                         languageData.GetContent("Page9_Section1_Table1_Row9_Column2"),
                                       data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(604, idReport);
            rowData.Add(9, new string[] {  data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                         languageData.GetContent("Page9_Section1_Table1_Row10_Column2"),
                                        data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            data = ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(605, idReport);
            rowData.Add(10, new string[] { data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.Priority), 5):"",
                                         string.Format("{0} : {1}", languageData.GetContent("Page9_Section1_Table1_Row11_Column2"), data!=null?ReportBL.GetStringValue(data.CustomObjectValue.Object):""),
                                        data!=null?GetEnumValue(Convert.ToString(data.CustomObjectValue.YearImmediate), 6):""});

            pdfGen.AddRecueil_Table_HiérarchisationDesPriorités(new string[] { languageData.GetContent("Page9_Section1_Table1_Column1"), 
                                                                               languageData.GetContent("Page9_Section1_Table1_Column2"), 
                                                                               languageData.GetContent("Page9_Section1_Table1_Column3") }, rowData, 45, 90, 500, 400, 8, false);
            data = null;
            rowData = null;

            pdfGen.AddLabelNote(languageData.GetContent("Page9_Section1_Line2"), 450, 500, 20, 45);
            pdfGen.AddBlueBorder(465, 45, 400);
            pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(594, idReport)), 470, 500, 65, 55);
            #endregion

            #region a)  Transmettre votre entreprise

            y = 530;
            pdfGen.AddDefaultBoldText(languageData.GetContent("Page9_Section2_Line1"), y += interline, 500, 20, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line2"), y += paddingAfterParagraph);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1014, idReport), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line3_Item1"), y, 500, 20, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1015, idReport), y, 100);
            pdfGen.AddDefaultText(languageData.GetContent("Page9_Section2_Line3_Item2"), y, 500, 20, 120);

            pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page9_Section2_Line4"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(606, idReport))), y += interline);
            pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page9_Section2_Line5"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(607, idReport))), y += interline);
            pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page9_Section2_Line6"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(608, idReport))), y += interline);
            pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page9_Section2_Line7"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(609, idReport))), y += interline);
            #endregion

            #region b)  Céder votre entreprise
            pdfGen.CreatePage();

            pdfGen.AddDefaultBoldText(languageData.GetContent("Page10_Section1_Line1"), 0, 500, 20, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section1_Line2"), 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1019, idReport), 35);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section1_Line3_Item1"), 35, 500, 20, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1020, idReport), 35, 100);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section1_Line3_Item2"), 35, 500, 20, 120);

            y = 55;
            //pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page10_Section1_Line4"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(610, idReport))), 55);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section1_Line4"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(610, idReport)), y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page10_Section1_Line5"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(611, idReport))), 70);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section1_Line5"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(611, idReport)), y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page10_Section1_Line6"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(612, idReport))), 85);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section1_Line6"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(612, idReport)), y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page10_Section1_Line7"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(613, idReport))), 100);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section1_Line7"), string.Empty), y += interline, label_width, height);
            pdfGen.AddAnswer(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(613, idReport)), y, answer_width, height, answer_x);

            #endregion

            #region c)  Réduire vos impôts
            pdfGen.AddDefaultBoldText(languageData.GetContent("Page10_Section2_Line1"), 130, 500, 20, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section2_Line2"), 145);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1024, idReport), 160, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section2_Line3_Item1"), 160, 500, 20, 40);
            y = 160;
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1025, idReport), y += interline, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section2_Line3_Item2"), y, 500, 20, 40);

            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section2_Line4"), y += interline);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1027, idReport), y += interline, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section2_Line5_Item1"), y, 500, 20, 40);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1028, idReport), y, 200);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section2_Line5_Item2"), y, 500, 20, 220);

            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section2_Line6"), y += interline);
            pdfGen.AddDefaultText(String.Format(@" {0} {1} {2}    {3} ",
                isEmptyReport ? "      " : ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(614, idReport)),
                languageData.GetContent("Page10_Section2_Line6_Item1"),
                isEmptyReport ? "      " : ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(615, idReport)),
                languageData.GetContent("Page10_Section2_Line6_Item2"))
                , y, 500, 20, 200);
            #endregion

            #region d)  Gérer votre trésorerie
            pdfGen.AddDefaultBoldText(languageData.GetContent("Page10_Section3_Line1"), y += interline + 5, 500, 20, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page10_Section3_Line2"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(617, idReport))), y += interline);

            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1034, idReport), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section3_Line3"), y, 500, 20, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section3_Line4"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(619, idReport))), y += interline, 500, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1035, idReport), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section3_Line5"), y, 500, 20, 15);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section3_Line6"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(620, idReport))), y += interline, 500, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1036, idReport), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section3_Line7"), y, 500, 20, 15);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section3_Line8"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(621, idReport))), y += interline, 500, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section3_Line9"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(618, idReport))), y += interline, 500, 20);

            pdfGen.AddLabelNote(languageData.GetContent("Page10_Section3_Line10"), y += interline, 500, 20);
            pdfGen.AddBlueBorder(y += interline, 0, 510, 65);
            pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(616, idReport)), y += interline, 500, 35);
            #endregion

            #region e)  Autres placements
            y = 520;
            pdfGen.AddDefaultBoldText(languageData.GetContent("Page10_Section4_Line1"), y, 500, 20, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page10_Section4_Line2"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(622, idReport))), y += interline);
            pdfGen.AddDefaultText(String.Format(@"{0} {1}", languageData.GetContent("Page10_Section4_Line3"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(623, idReport))), y += interline);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1042, idReport), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section4_Line4"), y, 500, 20, 15);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section4_Line5"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(624, idReport))), y += interline, 500, 20, 20);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1043, idReport), y += interline);
            pdfGen.AddDefaultText(languageData.GetContent("Page10_Section4_Line6"), y, 500, 20, 15);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section4_Line7"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(625, idReport))), y += interline, 500, 20, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page10_Section4_Line8"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(626, idReport))), y += interline);
            #endregion

            #region f) Acquérir un bien immobilier
            pdfGen.CreatePage();

            pdfGen.AddDefaultBoldText(languageData.GetContent("Page11_Section1_Line1"), 0, 500, 20, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} {1} {2}", languageData.GetContent("Page11_Section1_Line2_Item1"), isEmptyReport ? "       " : ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(627, idReport)), languageData.GetContent("Page11_Section1_Line2_Item2")), 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section1_Line3"), 35);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section1_Line4"), 50);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1050, idReport), 50, 250);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), 50, 500, 20, 265);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1051, idReport), 50, 290);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), 50, 500, 20, 305);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section1_Line5"), 65);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1053, idReport), 65, 250);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), 65, 500, 20, 265);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1054, idReport), 65, 290);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), 65, 500, 20, 305);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section1_Line6"), 80);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1056, idReport), 80, 250);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), 80, 500, 20, 265);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1057, idReport), 80, 290);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), 80, 500, 20, 305);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section1_Line7"), 95);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1059, idReport), 95, 250);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), 95, 500, 20, 265);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1060, idReport), 95, 290);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), 95, 500, 20, 305);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section1_Line8"), 110);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1062, idReport), 110, 250);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), 110, 500, 20, 265);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1063, idReport), 110, 290);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), 110, 500, 20, 305);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section1_Line9"), 125);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1065, idReport), 125, 250);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), 125, 500, 20, 265);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1066, idReport), 125, 290);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), 125, 500, 20, 305);
            pdfGen.AddDefaultText(String.Format("{0} : {1}", languageData.GetContent("Page11_Section1_Line10"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(628, idReport))), 140);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(languageData.GetContent("Page11_Section2_Line1"), 165, 500, 20, 20);
            pdfGen.AddDefaultText(String.Format(@"{0} {1} {2}", languageData.GetContent("Page11_Section2_Line2_Item1"), isEmptyReport ? "       " : ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(629, idReport)), languageData.GetContent("Page11_Section2_Line2_Item2")), 185);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section2_Line3"), 200);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1072, idReport), 200, 160);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section2_Line3_Item1"), 200, 500, 20, 175);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1073, idReport), 200, 250);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section2_Line3_Item2"), 200, 500, 20, 265);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 200, 355);
            pdfGen.AddDefaultText(string.Format("{0} : {1}", languageData.GetContent("Page11_Section2_Line3_Item3"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(630, idReport))), 200, 500, 20, 370);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(languageData.GetContent("Page11_Section3_Line1"), 225, 500, 20, 20);
            pdfGen.AddDefaultText(String.Format("{0} {1}", languageData.GetContent("Page11_Section3_Line2"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(631, idReport))), 245);
            pdfGen.AddDefaultText(String.Format("{0} {1}", languageData.GetContent("Page11_Section3_Line3"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(632, idReport))), 260);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(languageData.GetContent("Page11_Section4_Line1"), 285, 500, 20, 20);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section4_Line2"), 305);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1080, idReport), 320);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section4_Line2_Item1"), 320, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1081, idReport), 335);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section4_Line2_Item2"), 335, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1082, idReport), 350);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section4_Line2_Item3"), 350, 500, 20, 15);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1083, idReport), 365);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section4_Line2_Item4"), 365, 500, 20, 15);
            pdfGen.AddDefaultText(String.Format("{0} {1}", languageData.GetContent("Page11_Section4_Line3"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(633, idReport))), 395);
            pdfGen.AddDefaultText(String.Format("{0} {1}", languageData.GetContent("Page11_Section4_Line4"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(634, idReport))), 425);

            pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(languageData.GetContent("Page11_Section5_Line1"), 450, 500, 20, 20);
            pdfGen.AddDefaultText(String.Format("{0} {1}", languageData.GetContent("Page11_Section5_Line2"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(636, idReport))), 480);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section5_Line3"), 495);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1088, idReport), 495, 280);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), 495, 500, 20, 295);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1089, idReport), 495, 325);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), 495, 500, 20, 340);
            pdfGen.AddDefaultText(String.Format("{0} {1}", languageData.GetContent("Page11_Section5_Line4"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(637, idReport))), 515);
            pdfGen.AddDefaultText(languageData.GetContent("Page11_Section5_Line5"), 530);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1092, idReport), 530, 280);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), 530, 500, 20, 295);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1093, idReport), 530, 325);
            pdfGen.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), 530, 500, 20, 340);
            pdfGen.AddDefaultText(String.Format("{0} {1}", languageData.GetContent("Page11_Section5_Line6"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(638, idReport))), 545);

            pdfGen.AddLabelNote(languageData.GetContent("Page11_Section5_Line7"), 575);
            pdfGen.AddBlueBorder(590);
            pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(635, idReport)), 595, 500, 65, 55);

            #endregion

            #endregion

            #region PROFIL ET OBJECTIF D'INVESTISSEMENT
            pdfGen.CreatePage();
            y = 0;

            //Titre : PROFIL ET OBJECTIFS D’INVESTISSEMENTS
            pdfGen.AddTitle(languageData.GetContent("Page12_Section1_Title"), y);

            //Questionnaire autre UPSIDE0
            y = y + paddingAfterParagraph;
            float yCheckbox = y + paddingAfterParagraph;
            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1207, report), yCheckbox);
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_756"), yCheckbox, 500, 2 * height, 20);

            pdfGen.AddDefaultText(string.Format("{0} {1}", languageData.GetContent("PDF_PM_Report_1207"), ReportBL.GetStringValue(ReportBL.GetReportOptionAttributeValueFromReportInstance(report, 753))), y += paddingAfterParagraph + interline, 500, 2 * height);
            pdfGen.AddDefaultText(languageData.GetContent("PDF_PM_Report_753"), y += paddingAfterParagraph + 5, max_width, 2 * height);

            //Questionnaire UPSIDEO
            yCheckbox = y += (2 * paddingAfterParagraph);
            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1208, report), yCheckbox);
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_757"), yCheckbox, 500, 2 * height, 20);

            pdfGen.AddDefaultText(languageData.GetContent("PDF_PM_Report_1208"), y += interline, 500, 2 * height);

            #region I.  Niveau de connaissance ou d’intervention sur les instruments financiers et les marchés
            pdfGen.AddSubtitle(languageData.GetContent("Page12_Section1_Subtitle"), y += interline + 10, max_width, height, ChapiterPaddingLeft);

            rowData = new Dictionary<int, string[]>();

            pdfGen.AddRecueil_Table_PROFILETOBJECTIFSDINVESTISSEMENTS_Columns(50, y + paddingAfterParagraph, 450, new List<string>()
            {
                  languageData.GetContent("Page12_Section1_Table1_Column1"),
                  languageData.GetContent("Page12_Section1_Table1_Column2"),
                  languageData.GetContent("Report_Symbol_Yes"),
                  languageData.GetContent("Report_Symbol_No"),
                  languageData.GetContent("Page12_Section1_Table1_Column2_SubColumn1"),
                  
                  languageData.GetContent("Page12_Section1_Table1_Column2_SubColumn2"),
                  languageData.GetContent("Page12_Section1_Table1_Column2_SubColumn3"),
                  languageData.GetContent("Page12_Section1_Table1_Column2_SubColumn1_Item1"),
                  languageData.GetContent("Page12_Section1_Table1_Column2_SubColumn1_Item2"),
                  languageData.GetContent("Page12_Section1_Table1_Column2_SubColumn2_Item1"),
                  languageData.GetContent("Page12_Section1_Table1_Column2_SubColumn2_Item2"),
                  languageData.GetContent("Page12_Section1_Table1_Column2_SubColumn3_Item1"),
                  languageData.GetContent("Page12_Section1_Table1_Column2_SubColumn3_Item2"),
                  languageData.GetContent("Page12_Section1_Table1_Column2_SubColumn3_Item3")
            });
            List<List<String>> list = new List<List<string>>();
            list.Add(new List<string>() { 
                languageData.GetContent("Page12_Section1_Table2_Row1_Column1"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(370, idReport),"3", "TransactionVolume").ToString()
            });
            list.Add(new List<string>() { 
                languageData.GetContent("Page12_Section1_Table2_Row2_Column1"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(371, idReport),"3", "TransactionVolume").ToString()
            });
            list.Add(new List<string>() { 
                languageData.GetContent("Page12_Section1_Table2_Row3_Column1"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(372, idReport),"3", "TransactionVolume").ToString()
            });
            list.Add(new List<string>() { 
                languageData.GetContent("Page12_Section1_Table2_Row4_Column1"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(373, idReport),"3", "TransactionVolume").ToString()
            });
            list.Add(new List<string>() { 
                languageData.GetContent("Page12_Section1_Table2_Row5_Column1"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(374, idReport),"3", "TransactionVolume").ToString()
            });
            list.Add(new List<string>() { 
                languageData.GetContent("Page12_Section1_Table2_Row6_Column1"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(375, idReport),"3", "TransactionVolume").ToString()
            });

            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.BE.ToString())
            {
                list.Add(new List<string>() { 
                languageData.GetContent("ClientPM_Profile_Produits_structures"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(777, idReport),"3", "TransactionVolume").ToString()
            });
                list.Add(new List<string>() { 
                languageData.GetContent("ClientPM_Profile_Produits_derives"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(778, idReport),"3", "TransactionVolume").ToString()
            });
            }

            pdfGen.AddRecueil_Table_PROFILETOBJECTIFSDINVESTISSEMENTS_Body(0, y + paddingAfterParagraph + 140 /*195*/, 500, languageData.GetContent("Page12_Section1_Table2_Column1"), list);

            list = new List<List<string>>();

            list.Add(new List<string>() { 
                languageData.GetContent("Page12_Section1_Table3_Row1_Column1"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(376, idReport),"3", "TransactionVolume").ToString()
            });
            list.Add(new List<string>() { 
                languageData.GetContent("Page12_Section1_Table3_Row2_Column1"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(377, idReport),"3", "TransactionVolume").ToString()
            });
            list.Add(new List<string>() { 
                languageData.GetContent("Page12_Section1_Table3_Row3_Column1"),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport), "1", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport), "2", "HasKnowledge").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport), "1", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport), "2", "HasTransaction").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport),"1", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport),"2", "TransactionFrequency").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport),"1", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport),"2", "TransactionPeriod").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport),"1", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport),"2", "TransactionVolume").ToString(),
                ReportBL.GetBooleanValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(378, idReport),"3", "TransactionVolume").ToString()
            });

            pdfGen.AddRecueil_Table_PROFILETOBJECTIFSDINVESTISSEMENTS_Body(0, y + paddingAfterParagraph + 330 /*368*/, 500, languageData.GetContent("Page12_Section1_Table3_Column1"), list);
            list = null;

            //pdfGen.AddBlueBorder(477, 0, 500, 40);
            //pdfGen.AddReceuil_DetailText_Center_Calibri_Label(@"Quels sont les marchés sur lesquels le mandant est intervenu ?", 482);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 497, 60);
            //pdfGen.AddDefaultText(@"je l’ignore", 497, 500, 20, 80);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 497, 135);
            //pdfGen.AddDefaultText(@"Marché réglementé", 497, 500, 20, 155);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 497, 250);
            //pdfGen.AddDefaultText(@"Marché dérivé", 497, 500, 20, 270);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 497, 340);
            //pdfGen.AddDefaultText(@"Marché de gré à gré", 497, 500, 20, 360);

            //pdfGen.AddLabelNote("Notes", 550);
            //pdfGen.AddBlueBorder(565);
            //pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(380, idReport)), 570, 500, 65, 55);
            #endregion

            #region II. Expérience en matière de services d’investissements
            bool showFooterContent = false;
            pdfGen.CreatePage(showFooterContent);
            y = 0;

            pdfGen.AddSubtitle(languageData.GetContent("Page13_Section1_Line1"), 0);

            pdfGen.AddBlueBorder(20, 0, 500, 20);
            pdfGen.AddReceuil_DetailText_Center_Calibri_Label(languageData.GetContent("Page13_Section1_Line2"), 23);


            //Bottom Section : Oui
            pdfGen.AddRecueil_Table_PROFILETOBJECTIFSDINVESTISSEMENTS_2_BottomSection(0, 278 /*222*/, 500, new List<string>() {
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(525, idReport)),
                languageData.GetContent("Report_Symbol_Yes"),
                languageData.GetContent("Page13_Section1_Table2_Row1_Column2"),                
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(949, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row2_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(950, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row2_Column3"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(951, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row2_Column4"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(952, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row2_Column5"),
               
                languageData.GetContent("Page13_Section1_Table2_Row4_Column2") + ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(590, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row5_Column2"),
                 GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1003, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row6_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1004, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row6_Column3"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(1005, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row6_Column4"),

                 languageData.GetContent("Page13_Section1_Table2_Row7_Column2")  + ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(592, idReport)),

                languageData.GetContent("Page13_Section1_Table2_Row8_Column2"),
                 GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(955, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row9_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(956, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row9_Column3"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(957, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row9_Column4"),
                
                languageData.GetContent("Page13_Section1_Table2_Row10_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(959, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row11_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(960, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row11_Column3"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(961, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row11_Column4"),

                languageData.GetContent("Page13_Section1_Table2_Row12_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(964, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row13_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(965, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row13_Column3"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(966, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row13_Column4"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(967, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row13_Column5"),

                /*languageData.GetContent("Page13_Section1_Table2_Row14_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(970, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row15_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(971, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row15_Column3"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(972, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row15_Column4"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(973, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row15_Column5"),*/

                languageData.GetContent("Page13_Section1_Table2_Row16_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(976, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row17_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(977, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row17_Column3"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(978, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row17_Column4"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(979, idReport)),
                languageData.GetContent("Page13_Section1_Table2_Row17_Column5"),

                languageData.GetContent("PDF_PM_Report_1210"),
                GetBooleanString(GetReportOptionValueByIdOption(1211, report)),
                languageData.GetContent("PDF_PM_Report_1211"),
                GetBooleanString(GetReportOptionValueByIdOption(1212, report)),
                languageData.GetContent("PDF_PM_Report_1212"),
                GetBooleanString(GetReportOptionValueByIdOption(1213, report)),
                languageData.GetContent("PDF_PM_Report_1213")
            });

            pdfGen.AddRecueil_Table_PROFILETOBJECTIFSDINVESTISSEMENTS_2_TopSection(0, 40, 600, new List<string>() { 
                //Top Section
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(526, idReport)),
                languageData.GetContent("Report_Symbol_No"),

                languageDataPP.GetContent("Page13_Section1_Table1_Row1_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(982, idReport)),
                languageData.GetContent("Report_Symbol_Yes"),
               
                languageData.GetContent("Page13_Section1_Table1_Row3_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(986, idReport)),
                languageData.GetContent("Page13_Section1_Table1_Row4_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(987, idReport)),
                languageData.GetContent("Page13_Section1_Table1_Row4_Column3"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(988, idReport)),
                languageData.GetContent("Page13_Section1_Table1_Row4_Column4"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(989, idReport)),
                languageData.GetContent("Page13_Section1_Table1_Row4_Column5"),

                languageData.GetContent("Page13_Section1_Table1_Row5_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(991, idReport)),
                languageData.GetContent("Page13_Section1_Table1_Row6_Column2"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(992, idReport)),
                languageData.GetContent("Page13_Section1_Table1_Row6_Column3"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(993, idReport)),
                languageData.GetContent("Page13_Section1_Table1_Row6_Column4"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(994, idReport)),
                languageData.GetContent("Page13_Section1_Table1_Row6_Column5"),
                GetBooleanString(ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(983, idReport)),
                languageData.GetContent("Report_Symbol_No"),
                String.Format("{0} : {1}", languageData.GetContent("Page13_Section1_Table1_Row8_Column2"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(593, idReport))),

                languageData.GetContent("PDF_PM_Report_1215"),
                GetBooleanString(GetReportOptionValueByIdOption(1216, report)),
                languageData.GetContent("PDF_PM_Report_1216"),
                GetBooleanString(GetReportOptionValueByIdOption(1217, report)),
                languageData.GetContent("PDF_PM_Report_1217"),
                GetBooleanString(GetReportOptionValueByIdOption(1218, report)),
                languageData.GetContent("PDF_PM_Report_1218")
            });
            #endregion

            #endregion

            pdfGen.CreatePage();

            //TODO : texte

            pdfGen.AddReference(languageData.GetContent("PDF_PM_Report_Description_1"), 0, 500, 40);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line2_Item1"), 0);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line2"), 0, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line3"), 13, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line4"), 28, 500, 20, 20);

            pdfGen.AddReference(languageData.GetContent("PDF_PM_Report_Description_2"), 30, 500, 60);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line5_Item1"), 48);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line5"), 48, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line6"), 63, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line7"), 78, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line8"), 93, 500, 20, 20);

            pdfGen.AddReference(languageData.GetContent("PDF_PM_Report_Description_3"), 70, 500, 80);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line9_Item1"), 113);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line9"), 113, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line10"), 128, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line11"), 143, 500, 20, 20);

            pdfGen.AddReference(languageData.GetContent("PDF_PM_Report_Description_4"), 100, 500, 80);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line12_Item1"), 163);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line12"), 163, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line13"), 178, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line14"), 193, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line15"), 208, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page14_Section1_Line16"), 223, 500, 20, 20);

            pdfGen.AddImage(FileManager.AssemblyDirectory + "\\PDF\\PM_Graph.gif", 50, 250, 350, 200);

            pdfGen.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("Page14_Section1_Line17"), ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(379, idReport))), 470);

            pdfGen.AddLabelNote(languageData.GetContent("Page14_Section1_Line18"), 500);
            pdfGen.AddBlueBorder(515);
            pdfGen.AddDefaultText(ReportBL.GetStringValue(ReportOptionBL.GetReportOptionAttributeValueByIdOptionAttributeAndIdReport(380, idReport)), 520, 500, 65, 55);

            #region Catégorisation client
            pdfGen.CreatePage();

            pdfGen.AddTitle(languageData.GetContent("Page15_Section1_Title"), 0);

            pdfGen.AddDefaultBoldText(languageData.GetContent("Page15_Section1_Line1"), 30);
            pdfGen.AddDefaultBoldText(languageData.GetContent("Page15_Section1_Line2"), 45);
            //  pdfGen.AddDefaultBoldText(languageData.GetContent("Page15_Section1_Line3"), 60);

            pdfGen.AddDefaultText(languageData.GetContent("Page15_Section1_Line4"), 90);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(529, idReport), 90, 100);
            pdfGen.AddDefaultText(languageData.GetContent("Page15_Section1_Line4_Item1"), 90, 500, 20, 115);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(530, idReport), 105, 100);
            pdfGen.AddDefaultText(languageData.GetContent("Page15_Section1_Line5_Item1"), 105, 500, 20, 115);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(531, idReport), 120, 140);
            pdfGen.AddDefaultText(languageData.GetContent("Page15_Section1_Line6_Item1"), 120, 500, 20, 155);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(532, idReport), 120, 220);
            pdfGen.AddDefaultText(languageData.GetContent("Page15_Section1_Line6_Item2"), 120, 500, 20, 235);
            ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(533, idReport), 135, 100);
            pdfGen.AddDefaultText(languageData.GetContent("Page15_Section1_Line7_Item1"), 135, 500, 20, 115);


            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Utility.PageLanguageHelper.HostCode.FR.ToString())
            {
                pdfGen.AddReference(languageData.GetContent("Page15_Section1_Line8"), 160);
                pdfGen.AddReference(languageData.GetContent("Page15_Section1_Line9"), 190);
                pdfGen.AddReference(languageData.GetContent("Page15_Section1_Line10"), 205);
                pdfGen.AddReference(languageData.GetContent("Page15_Section1_Line11"), 220);
                pdfGen.AddReference(languageData.GetContent("Page15_Section1_Line12"), 235);
            }
            else
            {
                pdfGen.AddFormatttedReference(languageData.GetContent("categorie_ref_pm"), 160, max_width, height * 10);

            }

            //pdfGen.CreatePage();

            //pdfGen.AddTitle(languageData.GetContent("Page16_Section1_Title"), 0);

            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 75);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page16_Section1_Line1"), 75, 500, 20, 20);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 100);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page16_Section1_Line2"), 100, 500, 20, 20);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 125);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page16_Section1_Line3"), 125, 500, 20, 20);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page16_Section1_Line4"), 140);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 165);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page16_Section1_Line5"), 165, 500, 20, 20);
            //pdfGen.AddRecueil_Line(190);
            //pdfGen.AddRecueil_Line(215);
            //pdfGen.AddRecueil_Line(240);
            //pdfGen.AddRecueil_Line(265);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 290);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page16_Section1_Line6"), 290, 500, 20, 20);
            //pdfGen.AddRecueil_Line(315);
            //pdfGen.AddRecueil_Line(340);
            //pdfGen.AddRecueil_Line(365);
            //pdfGen.AddRecueil_Line(390);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 415);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page16_Section1_Line7"), 415, 500, 20, 20);
            //ReportBL.PlotBooleanValue(pdfGen, ReportOptionBL.GetReportOptionValueByIdOptionAndIdReport(0, idReport), 440);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(languageData.GetContent("Page16_Section1_Line8"), 440, 500, 20, 20);

            #endregion

            pdfGen.CreatePage();

            pdfGen.AddTitle(languageData.GetContent("Page17_Section1_Title"), 0);

            var reportAlerts = ReportAlertBL.GetReportNonBlockingAlertsByIdReport(idReport);
            List<List<String>> reportAlertArray = new List<List<string>>();
            var alertLanguageData = PageLanguageHelper.GetLanguageContent("User", "AlertPanel");
            foreach (var reportAlert in reportAlerts)
            {
                var tempList = new List<String>();
                tempList.Add(alertLanguageData.GetContent(AlertBL.GetAlertById(reportAlert.idAlert).NameKey));
                tempList.Add(reportAlert.JustifyingReason);
                reportAlertArray.Add(tempList);
            }

            pdfGen.AddRecueil_Table_Remarques(reportAlertArray, 0, 40, 500, new List<string>()
            {
                languageData.GetContent("Report_Remarques"),
                languageData.GetContent("Report_Reason")
            });

            pdfGen.CreatePage();

            pdfGen.AddTitle(languageData.GetContent("Page18_Section1_Title"), 0);

            pdfGen.AddDefaultBoldText(languageData.GetContent("Page18_Section1_Line1"), 100, 500, 20, 80);
            pdfGen.AddBlueBorder(130, 35, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(languageData.GetContent("Page18_Section1_Line2"), 135, 200, 20, 45);
                pdfGen.AddDefaultText(languageData.GetContent("Page18_Section1_Line3"), 145, 145, 20, 45);
                pdfGen.AddDefaultText(languageData.GetContent("Page18_Section1_Line4"), 160, 145, 20, 45);
            }

            pdfGen.AddDefaultBoldText(languageData.GetContent("Page18_Section1_Line5"), 100, 500, 20, 340);
            pdfGen.AddBlueBorder(130, 280, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(languageData.GetContent("Page18_Section1_Line6"), 135, 200, 20, 290);
                pdfGen.AddDefaultText(languageData.GetContent("Page18_Section1_Line7"), 145, 145, 20, 290);
                pdfGen.AddDefaultText(languageData.GetContent("Page18_Section1_Line8"), 160, 145, 20, 290);
            }

            // Generate pdf
            if (forceDownload)
            {
                string fileName = string.Format("PM_QuestionnaireRecueil_{0}.pdf", idReport);
                pdfGen.GeneratePdfToWeb(fileName);
            }
            else
            {
                pdfGen.GeneratePdf(pathFilename);
            }

            Int32 pageCount = pdfGen.PageCount;
            pdfGen = null;
            return pageCount;
        }
コード例 #18
0
        private static void GeneratePPCredit(FoxitPDFGenerator pdfGen, Data.Model.Report report,ref float y, bool pIsEmptyReport)
        {
            var languageDataCredit = PageLanguageHelper.GetLanguageContent("User", "ClientPP_Credit");
            var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP");

            Func<float, float, int, int, string, bool> BlockQuestion = (yp, x1, yes, no, t) =>
            {
                var reportAnyYes = GetReportOptionValueByIdOption(yes, report);
                var reportAnyNo = GetReportOptionValueByIdOption(no, report);
                if (reportAnyYes != null && reportAnyNo != null)
                    reportAnyNo = null;

                pdfGen.AddDefaultText(languageDataCredit.GetContent(t), yp, max_width, 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, reportAnyNo, 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("&euro;", "€"), yp, max_width, 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 montantCredit = GetReportOptionAttributeValueByIdOptionAttribute(idx, report);
                if (!pIsEmptyReport)
                {
                    if (!string.IsNullOrEmpty(montantCredit) && !montantCredit.Equals("0"))
                    {
                        pdfGen.AddDefaultText(languageDataCredit.GetContent(t).Replace("&euro;", "€"), yp, max_width, height, xt += padding_left);
                        pdfGen.AddAnswer(montantCredit, yp, 100, 20, xt += 270);
                    }
                }
                else
                {
                    pdfGen.AddDefaultText(languageDataCredit.GetContent(t).Replace("&euro;", "€"), yp, max_width, height, xt += padding_left);
                    pdfGen.AddAnswer(string.Empty, yp, 100, 20, xt += 270);
                }
                return string.Empty;
            };

            var dataCredits = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 215).OrderBy(roav => roav.idReportOptionAttributeValue).ToList();
            dataCredits = dataCredits.Where(dc => !string.IsNullOrEmpty(dc.CustomObjectValue.Borrower)).ToList();

            var hasCredit = GetReportOptionValueByIdOption(1307, report) != null;
            var hasDetailCredit = GetReportOptionValueByIdOption(1309, report) != null;

            if (y ==0)
            {
                if (dataCredits.Count + 2 >= 7)
                {
                    pdfGen.CreatePage(true, false, true, string.Empty, true);
                }
                else
                    pdfGen.CreatePage(); 
            }



            //CREDITS
            pdfGen.AddTitle(languageDataPP.GetContent("PdfReportPP_127"), y, max_width, 20);
            var isAnyDataCredit = dataCredits.Count > 0; //report.ReportOptionAttributeValue.Any(roav => roav.idOptionAttribute == 215);

            var x = 0;
            float yTmp = 0;
            if (!pIsEmptyReport)
            {
                if (hasCredit)
                {
                    if (!isAnyDataCredit)
                    {
                        y += interline + 5;
                        yTmp = y;
                        pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2f * height);
                        if (y > 0) y = yTmp;
                        BlockQuestion(y, x, 1307, 1308, "ClientPP_Credit_020");

                        //Credits (en K€)
                        y += interline;
                        BlockMontant(y, x, 729, "ClientPP_Credit_023");
                    }
                    else
                    {
                        y += interline;
                        GenerateCreditsTable2(pdfGen, report, ref y, pIsEmptyReport);

                        //y += interline;
                        //pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 60);
                    }
                }
                else
                {
                    //Credits (en K€)
                    y += interline;
                    yTmp = y;
                    pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 1f * height);
                    if (y > 0) y = yTmp;
                    BlockQuestion(y, x, 1307, 1308, "ClientPP_Credit_020");
                }
            }
            else
            {
                y += interline + 5;
                yTmp = y;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2f * height);
                if (y > 0) y = yTmp;
                BlockQuestion(y, x, 1307, 1308, "ClientPP_Credit_020");

                //Credits (en K€)
                y += interline;
                BlockMontant(y, x, 729, "ClientPP_Credit_023");

                y += interline;
                GenerateCreditsTable2(pdfGen, report, ref y, pIsEmptyReport);
            }

            if (dataCredits.Any())
            {
                y += interline;
                yTmp = y;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 60);
                if (y > 0) y = yTmp;

                pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_131"), ref y, max_width, height, 20);
                y += textInterline;
                pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_129"), ref y, max_width, height, 20);
                y += textInterline;
                pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_130"), ref y, max_width, height, 20); 
            }

            /*if ((!hasCredit || !hasDetailCredit) && !psIsEmptyReport)
            {
                y += interline + 5;
                var yTmp = y;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y,2f*height);
                if (y > 0) y = yTmp;
                BlockQuestion(y, x, 1307, 1308, "ClientPP_Credit_020");

                if (hasCredit)
                {
                    //Patrimoine divers (en €)
                    y += interline;
                    BlockMontant(y, x, 729, "ClientPP_Credit_023");
                }
            }*/

            //Endettement estimes
            //pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_128"), y , max_width, height);
            //pdfGen.AddAnswer(GetReportOptionAttributeValueByIdOptionAttribute(729, report), y, 75, 20, 250);

            /*if (hasDetailCredit || psIsEmptyReport)
            {
                y += interline;
                GenerateCreditsTable2(pdfGen, report, ref y, psIsEmptyReport);

                y += interline;
                var yTmp = y ;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 60);
                if (y > 0) y = yTmp;

                pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_131"), ref y, max_width, height, 20);
                y += textInterline;
                pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_129"), ref y, max_width, height, 20);
                y += textInterline;
                pdfGen.AddReferenceWithZone(languageDataPP.GetContent("PdfReportPP_130"), ref y, max_width, height, 20);
            }*/
        }
コード例 #19
0
        private static void GeneratePPIdentificationTitulaire(FoxitPDFGenerator pdfGen, Upsilab.Data.Model.CustomerProspect customerProspect, Upsilab.Data.Model.Report report, ref float y,bool pIsEmptyReport)
        {
            var languageDataPM = PageLanguageHelper.GetLanguageContent("User", "PDF_PM_Report");
            var languageDataPP = PageLanguageHelper.GetLanguageContent("User", "PDFReportPP");
            var languageData = PageLanguageHelper.GetLanguageContent("User", "ClientPP_Titulaire");
            var languageDataPatFin = PageLanguageHelper.GetLanguageContent("User", "ClientPP_ParimoineFinancier");
            pdfGen.CreatePage();
            pdfGen.AddTitle(languageDataPP.GetContent("PdfReportPP_038"), y, max_width, 20);//IDENTIFICATION DU TITULAIRE",

            float x = 0;

            #region I. Identité

            x += 20;
            pdfGen.AddSubtitle(string.Format("I. {0}", languageDataPP.GetContent("PdfReportPP_244").Replace("I.",string.Empty)), y += interline * 1.5f, max_width, height, x);//I. Identité

            /*--------------------------------------------- FIX ISSUE 9985 ----------------------------- */
            #region II Origine de la relation (Become n°I fix issue 9985)

            var repoClientNew = GetReportOptionValueByIdOption(232, report);
            ReportBL.PlotBooleanValue(pdfGen, repoClientNew, y += paddingAfterParagraph, x);
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_276"), y += CheckBoxPosition, 130, height, x += 15);

            var repoClientDepuis = GetReportOptionValueByIdOption(233, report);
            x += AbscisseRef;
            ReportBL.PlotBooleanValue(pdfGen, repoClientDepuis, y -= CheckBoxPosition, x);
            string dateOrigineDeLaRelation = GetReportOptionAttributeValueByIdOptionAttribute(158, report);
            pdfGen.AddDefaultText(string.Format(languageDataPP.GetContent("PdfReportPP_277"), string.Empty), y += CheckBoxPosition, 250, height, x += 15);
            pdfGen.AddAnswer(dateOrigineDeLaRelation, y, (307 * 31 / 50), 20, x += 60);


            //Contact par recommandation
            y += textInterline * 1.5f;
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_280"), y, max_width, height);


            string libelle = string.Empty;
            var tab = new int[] { 1194, 247, 248, 249, 250, 251, 252, 253 };
            var tablib = new string[] { "PdfReportPP_2801", "PdfReportPP_281", "PdfReportPP_282", "PdfReportPP_283", "PdfReportPP_284", "PdfReportPP_285", "PdfReportPP_286", "PdfReportPP_287" };
            for (var i = 0; i < tab.Length; i++)
            {
                var rOpValue = GetReportOptionValueByIdOption(tab[i], report);
                if (rOpValue != null)
                {
                    if (tab[i] != 253) libelle = languageDataPP.GetContent(tablib[i]);
                    else libelle = GetStringValue(GetReportOptionAttributeValueByIdOptionAttribute(159, report));
                    break;
                }
            }
            pdfGen.AddAnswer(libelle, y, 350, height, 130);

            y += textInterline * 2f;

            /*--------------------------------------------- FIX ISSUE 9985 ----------------------------- */

            #endregion

            #region "IDENTITE DU TITULAIRE"
            // civilité
            x = 0;
            pdfGen.AddDefaultText(LanguageContentBL.Translate("ClientPP_Titulaire_1219"), y, max_width, height, x);
            x = height + 40;

            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1220, report), y, x);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("ClientPP_Titulaire_1220"), y += CheckBoxPosition, max_width, height, x = x + tabCheck);//Monsieur
            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1221, report), y -= CheckBoxPosition, x = x + tabCheck + 40);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("ClientPP_Titulaire_1221"), y += CheckBoxPosition, max_width, height, x = x + tabCheck);//Madame
            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1222, report), y -= CheckBoxPosition, x = x + tabCheck + 40);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("ClientPP_Titulaire_1222"), y += CheckBoxPosition, max_width, height, x = x + tabCheck);//Mademoiselle

            // Nom
            x = 20;
            y += interline /*+ 5*/;
            string nom = string.Format(languageDataPP.GetContent("PdfReportPP_245"), string.Empty);
            string nomV = GetReportOptionAttributeValueByIdOptionAttribute(142, report);

            //Prénom
            x = 240;
            string prenom = string.Format(languageDataPP.GetContent("PdfReportPP_246"), string.Empty);
            string prenomV = GetReportOptionAttributeValueByIdOptionAttribute(143, report);

            GenerateDoubleColonne(pdfGen, nom, nomV, prenom, prenomV, ref y);

            y += interline/* + 5*/;
            // Nom de jeune fille
            string nomJeuneFille = String.Format(languageDataPP.GetContent("PdfReportPP_247"), string.Empty);
            string nomJeuneFilleV = GetReportOptionAttributeValueByIdOptionAttribute(144, report);

            x = 0;
            const float LNPX = 225;
            //float lnpx1 = pdfGen.GetWidthOfString(nomJeuneFille);
            float lnpx1 = LNPX;
            float wdth1 = lnpx1 * 31 / 50;
            float wdthAnswer = 500 - (10 + wdth1);
            pdfGen.AddDefaultText(nomJeuneFille, y, label_width, height, x);
            pdfGen.AddAnswer(nomJeuneFilleV, y, wdthAnswer, 20, x += 135);

            // Date de naissance
            y += interline /*+ 5*/;
            string dateNaissance = String.Format(languageDataPP.GetContent("PdfReportPP_248"), string.Empty);
            string dateNaissanceV = GetReportOptionAttributeValueByIdOptionAttribute(145, report);

            // Lieu de naissance
            string lieuNaissance = String.Format(languageDataPP.GetContent("PdfReportPP_249"), string.Empty);
            string lieuNaissanceV = GetReportOptionAttributeValueByIdOptionAttribute(147, report);

            GenerateDoubleColonne(pdfGen, dateNaissance, dateNaissanceV, lieuNaissance, lieuNaissanceV, ref y);

            string hostCode = Upsilab.Business.Utility.SessionManager.GetHostCodeSession();
            if (!string.IsNullOrEmpty(hostCode) && hostCode == "BE")
            {
                y += interline/* + 5*/;

                string numRegNat = String.Format(languageDataPP.GetContent("PdfReportPP_NumReg"), string.Empty);
                string numRegNatV = GetReportOptionAttributeValueByIdOptionAttribute(772, report);

                x = 0;
                // float lnpx2 = pdfGen.GetWidthOfString(numRegNat);
                float lnpx2 = LNPX;
                float wdth2 = lnpx2 * 31 / 50;
                float wdth2nswer = 490 - (10 + wdth2);
                pdfGen.AddDefaultText(numRegNat, y, label_width, height, x);
                pdfGen.AddAnswer(numRegNatV, y, wdth2nswer, 20, x += 135);
            }

            // Tél privé
            y += interline/* + 5*/;
            string telPrive = String.Format(languageDataPP.GetContent("PdfReportPP_250"), string.Empty);
            string telPriveV = GetReportOptionAttributeValueByIdOptionAttribute(148, report);

            // Tél prof
            string telProf = String.Format(languageDataPP.GetContent("PdfReportPP_252"), string.Empty);
            string telProfV = GetReportOptionAttributeValueByIdOptionAttribute(150, report);

            GenerateDoubleColonne(pdfGen, telPrive, telPriveV, telProf, telProfV, ref y);

            // Tél port
            y += interline/* + 5*/;
            string telPort = String.Format(languageDataPP.GetContent("PdfReportPP_253"), string.Empty);
            string telPortV = GetReportOptionAttributeValueByIdOptionAttribute(151, report);

            // addresse e-mail
            string email = String.Format(languageDataPP.GetContent("PdfReportPP_254"), string.Empty);
            string emailV = GetReportOptionAttributeValueByIdOptionAttribute(152, report);

            GenerateDoubleColonne(pdfGen, telPort, telPortV, email, emailV, ref y);


            // addresse courrier
            x = 0;
            y += interline/* + 5*/;
            string adCour = String.Format(languageDataPP.GetContent("PdfReportPP_255"), string.Empty);
            string adCourV = GetReportOptionAttributeValueByIdOptionAttribute(153, report);

            //            float lnpx4 = pdfGen.GetWidthOfString(adCour);
            float lnpx4 = LNPX;
            float wdth4 = lnpx4 * 31 / 50;
            float wdth4nswer = 500 - (10 + wdth4);
            pdfGen.AddDefaultText(adCour, y, label_width, height, x);            
            //pdfGen.AddAnswer(adCourV, y, wdth4nswer, height * 3, x += 135);
            y = pdfGen.AddMultiLineAnswer(adCourV, y, wdth4nswer, height * 3, x += 135);
            //**[06_01_2016]**pdfGen.AddBlueLine(y-10, wdth4nswer, 1.3f, 135); 

            // code postale
            y += interline/* + 5*/;
            string codePostale = String.Format(languageDataPP.GetContent("PdfReportPP_256"), string.Empty);
            string codePostaleV = GetReportOptionAttributeValueByIdOptionAttribute(539, report);

            // ville
            string ville = String.Format(languageDataPP.GetContent("PdfReportPP_257"), string.Empty);
            string villeV = GetReportOptionAttributeValueByIdOptionAttribute(540, report);

            GenerateDoubleColonne(pdfGen, codePostale, codePostaleV, ville, villeV, ref y);

            // adresse fiscale
            y += interline/* + 5*/;
            x = 0;
            string adfisc = String.Format(languageDataPP.GetContent("PdfReportPP_258"), string.Empty);
            string adfiscV = GetReportOptionAttributeValueByIdOptionAttribute(154, report);

            //float lnpx5 = pdfGen.GetWidthOfString(adfisc);
            float lnpx5 = LNPX;
            float wdth5 = lnpx5 * 31 / 50;
            float wdth5nswer = 490 - (10 + wdth5);
            pdfGen.AddDefaultText(adfisc, y, label_width, height, x);
            //pdfGen.AddAnswer(adfiscV, y, wdth5nswer, height * 3, x += 135);
            y = pdfGen.AddMultiLineAnswer(adfiscV, y, wdth5nswer, height * 3, x += 145);


            // code postale
            y += interline/* + 5*/;
            string cPostal = String.Format(languageDataPP.GetContent("PdfReportPP_259"), string.Empty);
            string cPostalV = GetReportOptionAttributeValueByIdOptionAttribute(541, report);

            // ville
            string vil = String.Format(languageDataPP.GetContent("PdfReportPP_260"), string.Empty);
            string vilV = GetReportOptionAttributeValueByIdOptionAttribute(542, report);

            GenerateDoubleColonne(pdfGen, cPostal, cPostalV, vil, vilV, ref y);

            //Etes vous ?
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_261"), y += paddingAfterParagraph, max_width, height);

            if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Language.LanguageContentBL.HostCode.FR.ToString())
            {

                x = 77;
                /* fix issue 9985 */
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(218, report), y -= CheckBoxPosition, x);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_262"), y += CheckBoxPosition, 200, 20, x += tabCheck);
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(219, report), y -= CheckBoxPosition, x += 130/*answer_x*/);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_263"), y += CheckBoxPosition, 400, height, x += tabCheck);
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(220, report), y -= CheckBoxPosition, x += 130);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_264"), y += CheckBoxPosition, 200, height, x += tabCheck);

                x = 77;
                y += interline;
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(221, report), y -= CheckBoxPosition, x);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_265"), y += CheckBoxPosition, 200, height, x += tabCheck);
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByNamekey("ClientPP_Titulaire_022_Mineur", report), y -= CheckBoxPosition, x += 130);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_266"), y += CheckBoxPosition, 200, 20, x += tabCheck);
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1149, report), y -= CheckBoxPosition, x += 130);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_486"), y += CheckBoxPosition, 200, 20, x += tabCheck);
            }
            else
            {

                /* fix issue 9985 */
                x = 77;
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(218, report), y -= CheckBoxPosition, x);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_262"), y += CheckBoxPosition, 200, 20, x += tabCheck);
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1255, report), y -= CheckBoxPosition, x+=130);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Majeur_Incapable"), y += CheckBoxPosition, 200, 20, x += tabCheck);
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByNamekey("ClientPP_Titulaire_022_Mineur", report), y -= CheckBoxPosition, x += 130);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_266"), y += CheckBoxPosition, 200, 20, x + tabCheck);

                x = 77;
                y += interline;
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1149, report), y -= CheckBoxPosition, x);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_486"), y += CheckBoxPosition, 200, 20, x += tabCheck);
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(218, report), y -= CheckBoxPosition, x +=130);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_262"), y += CheckBoxPosition, 400, 20, x += tabCheck);
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1255, report), y -= CheckBoxPosition, x += 130);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Majeur_Incapable"), y += CheckBoxPosition, 200, 20, x += tabCheck);
            }

            //Representant legal
            y += interline;
            string repLegal = String.Format(languageDataPP.GetContent("PdfReportPP_487"), string.Empty);
            string repLegalV = GetReportOptionAttributeValueByIdOptionAttribute(739, report);

            //Nationalite
            string nationalite = String.Format(languageDataPP.GetContent("PdfReportPP_267"), string.Empty);
            string nationaliteV = GetReportOptionAttributeValueByIdOptionAttribute(155, report);

            GenerateDoubleColonne(pdfGen, repLegal, repLegalV, nationalite, nationaliteV, ref y);

            //Auter nationalite
            x = 0;
            y += interline/* + 5*/;
            string oNationalite = String.Format(languageDataPP.GetContent("PdfReportPP_268"), string.Empty);
            string oNationaliteV = GetReportOptionAttributeValueByIdOptionAttribute(156, report);

            //float lnpx6 = pdfGen.GetWidthOfString(oNationalite);
            float lnpx6 = LNPX;
            float wdth6 = lnpx6 * 31 / 50;
            float wdth6nswer = 490 - (10 + wdth6);
            pdfGen.AddDefaultText(oNationalite, y, label_width, height, x);
            pdfGen.AddAnswer(oNationaliteV, y, wdth6nswer, 20, x += 135);

            #region RESIDENT


            //Resident
            ReportOptionValue residentReport = GetReportOptionValueByIdOption(223, report);
            x = 0;
            y += interline + 3;

            float lnpx9 = LNPX;
            float wdth9 = lnpx9 * 31 / 50;
            float wdth9nswer = 240 - (10 + wdth9);
            pdfGen.AddDefaultText(string.Format("{0} :", languageDataPP.GetContent("PdfReportPP_269")), y, label_width, height, x);
            ReportBL.PlotBooleanValue(pdfGen, residentReport, y -= CheckBoxPosition, x += 89);
            pdfGen.AddDefaultText(languageData.GetContent("ClientPP_Titulaire_030"), y += CheckBoxPosition, 200, height, x += tabCheck);
            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(224, report), y -= CheckBoxPosition, x += tabYesNo * 1.5f);
            pdfGen.AddDefaultText(languageData.GetContent("ClientPP_Titulaire_031"), y += CheckBoxPosition, 200, height, x += tabCheck);

            string pays = GetReportOptionAttributeValueByIdOptionAttribute(157, report);
            if (residentReport != null && string.IsNullOrEmpty(pays))
            {
                pays = languageDataPP.GetContent("Country_Enum_064");
            }

            // Pays de residence
            string paysres = String.Format(languageDataPP.GetContent("PdfReportPP_271"), string.Empty);

            // colonne B
            //float lnpx7 = pdfGen.GetWidthOfString(paysres);
            float lnpx7 = LNPX;
            float wdth7 = lnpx7 * 31 / 50;
            float wdth7nswer = 240 - (10 + wdth7);

            x = 250;
            pdfGen.AddDefaultText(paysres, y, label_width, height, x);
            pdfGen.AddAnswer(pays, y, wdth7nswer, 20, x += 135);

            #endregion 
            #endregion

            #region "CONJOINT"
            y += interline * 1.5f;
            x = 0;
            // Le client a-t-il un(e) conjoint(e)?
            string conjoint = languageData.GetContent("ClientPP_Titulaire_conjoint_290");
            float lnpxCjt = pdfGen.GetWidthOfString(conjoint);
            float wdthCjt = lnpxCjt * 31 / 50;
            wdthCjt = wdthCjt <= 100 ? 100 : 100 + (wdthCjt/10);
            pdfGen.AddDefaultTextWithAutomaticNewPage(conjoint, ref y, max_width, x);

            var reportConjointOui = GetReportOptionValueByIdOption(1304, report);
            var optConjointOui = OptionBL.GetOptionLiteById(1304);
            ReportBL.PlotBooleanValueWithAutomaticNewPage(pdfGen, reportConjointOui, ref y, x += tabCheck + wdthCjt);
            pdfGen.AddDefaultTextWithAutomaticNewPage(languageDataPatFin.GetContent(optConjointOui.NameKey), ref y, max_width, height, x += tabCheck);
            var optConjointNon = OptionBL.GetOptionLiteById(1305);
            ReportBL.PlotBooleanValueWithAutomaticNewPage(pdfGen, GetReportOptionValueByIdOption(1305, report), ref y, x += tabCheck + 30);
            pdfGen.AddDefaultTextWithAutomaticNewPage(languageDataPatFin.GetContent(optConjointNon.NameKey), ref y, max_width, height, x += tabCheck);


            if (reportConjointOui != null || pIsEmptyReport)
            {
                // civilité
                y += interline/* +5*/;
                x = 0;
                pdfGen.AddDefaultTextWithAutomaticNewPage(LanguageContentBL.Translate("ClientPP_Titulaire_1223"), ref y, max_width, height, x);
                x = height + 40;

                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1224, report), y, x);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("ClientPP_Titulaire_1224"), y += CheckBoxPosition, max_width, height, x = x + tabCheck);//Monsieur
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1225, report), y -= CheckBoxPosition, x = x + tabCheck + 40);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("ClientPP_Titulaire_1225"), y += CheckBoxPosition, max_width, height, x = x + tabCheck);//Madame
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1225, report), y -= CheckBoxPosition, x = x + tabCheck + 40);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("ClientPP_Titulaire_1226"), y += CheckBoxPosition, max_width, height, x = x + tabCheck);//Mademoiselle

                
                // Nom conjoint
                y += interline;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
                string nomCjt = String.Format(languageDataPP.GetContent("PdfReportPP_245"), string.Empty);
                string nomCjtV = GetReportOptionAttributeValueByIdOptionAttribute(180, report);
                
                // prénom conjoint
                string prenomCjt = String.Format(languageDataPP.GetContent("PdfReportPP_246"), string.Empty);
                string prenomCjtV = GetReportOptionAttributeValueByIdOptionAttribute(182, report);
                 GenerateDoubleColonne(pdfGen,nomCjt,nomCjtV,prenomCjt,prenomCjtV, ref y);

                // Nom de jeune fille conjoint
                y += interline + 5;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
                string nomJeuneFilleCjt = String.Format(languageDataPP.GetContent("PdfReportPP_247"), string.Empty);
                string nomJeuneFilleCjtV = GetReportOptionAttributeValueByIdOptionAttribute(181, report);
                x = 0;
                float wdthNjf = LNPX * 31 / 50;
                float wdthNjfnswer = 500 - (10 + wdthNjf);
                pdfGen.AddDefaultText(nomJeuneFilleCjt, y, label_width, height, x);
                pdfGen.AddAnswer(nomJeuneFilleCjtV, y, wdthNjfnswer, 20, x += 135);

                // Date de naissance
                y += interline;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
                string dateNaissanceCjt = String.Format(languageDataPP.GetContent("PdfReportPP_248"), string.Empty);
                string dateNaissanceCjtV = GetReportOptionAttributeValueByIdOptionAttribute(183, report);

                // Lieu de naissance
                string lieuNaissanceCjt = String.Format(languageDataPP.GetContent("PdfReportPP_249"), string.Empty);
                string lieuNaissanceCjtV = GetReportOptionAttributeValueByNamekey("ClientPP_Titulaire_187", report);

                GenerateDoubleColonne(pdfGen, dateNaissanceCjt, dateNaissanceCjtV, lieuNaissanceCjt, lieuNaissanceCjtV, ref y);

                if (!string.IsNullOrEmpty(hostCode) && hostCode == "BE")
                {
                    y += interline;
                    pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
                    string numRegNatCjt = String.Format(languageDataPP.GetContent("PdfReportPP_NumReg"), string.Empty);
                    string numRegNatCjtV = GetReportOptionAttributeValueByIdOptionAttribute(773, report);
                    pdfGen.AddDefaultText(numRegNatCjt, y, label_width, height, x);
                    pdfGen.AddAnswer(numRegNatCjtV, y, wdthNjfnswer, 20, x += 135);
                }

                // Tél privé
                y += interline;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
                string telPrivCjt = String.Format(languageDataPP.GetContent("PdfReportPP_250"), string.Empty);
                string telPrivCjtV = GetReportOptionAttributeValueByIdOptionAttribute(897, report);


                // Tél prof
                string telProfCjt = String.Format(languageDataPP.GetContent("PdfReportPP_252"), string.Empty);
                string telProfCjtV = GetReportOptionAttributeValueByIdOptionAttribute(184, report);

                GenerateDoubleColonne(pdfGen, telPrivCjt, telPrivCjtV, telProfCjt, telProfCjtV, ref y);

                y += interline;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2.5f*height);
                // Tél port
                string telPortCjt = String.Format(languageDataPP.GetContent("PdfReportPP_253"), string.Empty);
                string telPortCjtV = GetReportOptionAttributeValueByIdOptionAttribute(185, report);

                // addresse e-mail
                string emailCjt = String.Format(languageDataPP.GetContent("PdfReportPP_254"), string.Empty);
                string emailCjtV = GetReportOptionAttributeValueByIdOptionAttribute(186, report);

                GenerateDoubleColonne(pdfGen, telPortCjt, telPortCjtV, emailCjt, emailCjtV, ref y);

                // addresse courrier
                x = 0;
                y += interline;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height);
                string adCourCjt = String.Format(languageDataPP.GetContent("PdfReportPP_255"), string.Empty);
                string adCourCjtV = GetReportOptionAttributeValueByIdOptionAttribute(187, report);

                lnpx4 = LNPX;
                wdth4 = lnpx4 * 31 / 50;
                wdth4nswer = 500 - (10 + wdth4);
                pdfGen.AddDefaultText(adCourCjt, y, label_width, height, x);
                y = pdfGen.AddMultiLineAnswer(adCourCjtV, y, wdth4nswer, height * 3, x += 135);

                // code postale
                y += interline;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2.5f * height);
                string codePostaleCjt = String.Format(languageDataPP.GetContent("PdfReportPP_256"), string.Empty);
                string codePostaleCjtV = GetReportOptionAttributeValueByIdOptionAttribute(898, report);

                // ville
                string villeCjt = String.Format(languageDataPP.GetContent("PdfReportPP_257"), string.Empty);
                string villeCjtV = GetReportOptionAttributeValueByIdOptionAttribute(899, report);

                GenerateDoubleColonne(pdfGen, codePostaleCjt, codePostaleCjtV, villeCjt, villeCjtV, ref y);

                // adresse fiscale
                y += interline;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height);
                x = 0;
                string adfiscCjt = String.Format(languageDataPP.GetContent("PdfReportPP_258"), string.Empty);
                string adfiscCjtV = GetReportOptionAttributeValueByIdOptionAttribute(900, report);

                lnpx5 = LNPX;
                wdth5 = lnpx5 * 31 / 50;
                wdth5nswer = 490 - (10 + wdth5);
                pdfGen.AddDefaultText(adfiscCjt, y, label_width, height, x);
                y = pdfGen.AddMultiLineAnswer(adfiscCjtV, y, wdth5nswer, height * 3, x += 145);

                // code postale
                y += interline;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2.5f * height);
                string cPostalCjt = String.Format(languageDataPP.GetContent("PdfReportPP_259"), string.Empty);
                string cPostalCjtV = GetReportOptionAttributeValueByIdOptionAttribute(901, report);

                // ville
                string vilCjt = String.Format(languageDataPP.GetContent("PdfReportPP_260"), string.Empty);
                string vilCjtV = GetReportOptionAttributeValueByIdOptionAttribute(902, report);

                GenerateDoubleColonne(pdfGen, cPostalCjt, cPostalCjtV, vilCjt, vilCjtV, ref y);

                // Votre conjoint est-il

                y += (interline*2f);
                var yTmp = y;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2*height);
                if (y > 0)
                    y = yTmp;
                pdfGen.AddDefaultTextWithAutomaticNewPage(languageDataPP.GetContent("PdfReportPP_sit_conj"), ref y, max_width, height);

                if (Upsilab.Business.Utility.ConfigurationManager.ExtranetHostCode == Upsilab.Business.Language.LanguageContentBL.HostCode.FR.ToString())
                {
                    x = 77;
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1152, report), y -= CheckBoxPosition, x);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_262"), y += CheckBoxPosition, 200, height, x += tabCheck);
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1153, report), y -= CheckBoxPosition, x += 130);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_263"), y += CheckBoxPosition, 200, height, x += tabCheck);
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1154, report), y -= CheckBoxPosition, x += 130);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_264"), y += CheckBoxPosition, 200, height, x += tabCheck);

                    x = 77;
                    y += interline;
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1155, report), y -= CheckBoxPosition, x);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_265"), y += CheckBoxPosition, 200, height, x += tabCheck);
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1156, report), y -= CheckBoxPosition, x += 130);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_266"), y += CheckBoxPosition, 200, 20, x += tabCheck);
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1157, report), y -= CheckBoxPosition, x += 130);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_486"), y += CheckBoxPosition, 200, 20, x += tabCheck);
                }
                else
                {
                    x = 77;
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1152, report), y /*= y + interline*/, x);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_262"), y += CheckBoxPosition, 400, 20, x += tabCheck);
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1256, report), y -= CheckBoxPosition, x += answer_x);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Majeur_Incapable"), y += CheckBoxPosition, 200, 20, x += tabCheck);

                    x = 77;
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1156, report), y = y + interline, x);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_266"), y += CheckBoxPosition, 200, 20, x += tabCheck);
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1157, report), y -= CheckBoxPosition, x += answer_x);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_486"), y += CheckBoxPosition, 200, 20, x += tabCheck);

                }

                // profession
                y += interline;
                yTmp = y;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
                if (y > 0) y = yTmp;
                string profession = String.Format(languageDataPP.GetContent("PdfReportPP_353"), string.Empty);
                string professionV = GetReportOptionAttributeValueByIdOptionAttribute(188, report);

                // statut sociale
                //string statutSociale = String.Format(languageDataPP.GetContent("PdfReportPP_354"), string.Empty);
                //string statutSocialeV = GetReportOptionAttributeValueByIdOptionAttribute(189, report);

                //Nationalite
                string nationaliteCjt = String.Format(languageDataPP.GetContent("PdfReportPP_267"), string.Empty);
                string nationaliteCjtV = GetReportOptionAttributeValueByIdOptionAttribute(190, report);

                GenerateDoubleColonne(pdfGen, profession, professionV, nationaliteCjt, nationaliteCjtV, ref y);


                // autre nationalité
                y += interline;
                yTmp = y;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
                if (y > 0) y = yTmp;
                string oNationaliteCjt = String.Format(languageDataPP.GetContent("PdfReportPP_268"), string.Empty);
                string oNationaliteCjtV = GetReportOptionAttributeValueByNamekey("ClientPP_Titulaire_188", report);

                Func<string, string, string, string, float,string> GenerateDoubleColonneDelegate = (colonneATitleDlg, colonneAValueDlg, colonneBTitleDlg, colonneBValueDlg,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;
                    float wdthBBnswer = maxColWidth - (10 + wdthBB);

                    pdfGen.AddDefaultText(colonneATitleDlg, y1, label_width, height, x);
                    pdfGen.AddAnswer(colonneAValueDlg, y1, wdthAAnswer, 20, x += 89);

                    x = 250;
                    pdfGen.AddDefaultText(colonneBTitleDlg, y1, label_width, height, x);
                    pdfGen.AddAnswer(colonneBValueDlg, y1, wdthBBnswer, 20, x += 110);
                    return string.Empty;
                };

                GenerateDoubleColonneDelegate(nationaliteCjt, nationaliteCjtV, oNationaliteCjt, oNationaliteCjtV,y);

                // résident
                x = 0;
                y += interline + 3;
                yTmp = y;
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
                pdfGen.AddDefaultText(string.Format("{0} :", languageDataPP.GetContent("PdfReportPP_269")), y, label_width, height, x);
                var residentConjointReport = GetReportOptionValueByNamekey("ClientPP_Titulaire_167", report);
                ReportBL.PlotBooleanValue(pdfGen, residentConjointReport, y -= CheckBoxPosition, x += 89);
                pdfGen.AddDefaultText(languageData.GetContent("ClientPP_Titulaire_030"), y += CheckBoxPosition, 200, height, x += tabCheck);
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByNamekey("ClientPP_Titulaire_168", report), y -= CheckBoxPosition, x += tabYesNo * 1.5f);
                pdfGen.AddDefaultText(languageData.GetContent("ClientPP_Titulaire_031"), y += CheckBoxPosition, 200, height, x += tabCheck);

                string paysConjoint = GetReportOptionAttributeValueByNamekey("ClientPP_Titulaire_169", report);
                if (residentConjointReport != null && string.IsNullOrEmpty(paysConjoint))
                    paysConjoint = languageDataPP.GetContent("Country_Enum_064");

                x = 250;
                pdfGen.AddDefaultText(String.Format(languageDataPP.GetContent("PdfReportPP_271"), string.Empty), y, label_width, height, x);
                pdfGen.AddAnswer(paysConjoint, y, 130, 20, x += 110);

            }

            #endregion
            #endregion

            #region II. Vie professionnelle

            bool isretraite = false;
            bool is2libeormore = false;

            y += interline * 2f;
            x = 20;
            pdfGen.AddSubtitleWithAutomaticNewPage(string.Format("II. {0}", languageDataPP.GetContent("PdfReportPP_297").Replace("IV.", string.Empty)), ref y, max_width, height, x);

            y += interline;
            x = 0;

            // En activités
            var enactivites = languageData.GetContent("ClientPP_Titulaire_enactivites");
            var enactivitesV = GetReportOptionValueByIdOption(261, report);

            // retraités
            var retraites = languageData.GetContent("ClientPP_Titulaire_retraites");
            var retraitesV = GetReportOptionValueByIdOption(263, report);

            // Sans activités
            var sansactivites = languageData.GetContent("ClientPP_Titulaire_sansactivites");
            var sansactivitesV = GetReportOptionValueByIdOption(259, report);

            // Autres activites
            var autresactivites = languageData.GetContent("ClientPP_Titulaire_autresactivites");
            var autresactivitesV = GetReportOptionValueByIdOption(262, report);

            ReportBL.PlotBooleanValue(pdfGen, enactivitesV, y += 10, x);
            pdfGen.AddDefaultText(enactivites, y += CheckBoxPosition, 200, height, x += tabCheck);

            ReportBL.PlotBooleanValue(pdfGen, retraitesV, y -= CheckBoxPosition, x += tabCheck + 50);
            pdfGen.AddDefaultText(retraites, y += CheckBoxPosition, 200, height, x += tabCheck);


            ReportBL.PlotBooleanValue(pdfGen, sansactivitesV, y -= CheckBoxPosition, x += tabCheck + 50);
            pdfGen.AddDefaultText(sansactivites, y += CheckBoxPosition, 200, height, x += tabCheck);

            ReportBL.PlotBooleanValue(pdfGen, autresactivitesV, y -= CheckBoxPosition, x += tabCheck + 50);
            pdfGen.AddDefaultText(autresactivites, y += CheckBoxPosition, 200, height, x += tabCheck);

            #region "Métier et secteur d'activité"
            string metierOuAncienneProfessionLbl = languageData.GetContent("ClientPP_Titulaire_072");
            if (enactivitesV != null)
            {
                metierOuAncienneProfessionLbl = languageData.GetContent("ClientPP_Titulaire_072").Replace(":", string.Empty);
            }
            else if (retraitesV != null)
            {
                metierOuAncienneProfessionLbl = languageData.GetContent("ClientPP_Titulaire_079").Replace(":", string.Empty);
            }
            else if (sansactivitesV != null)
            {
                metierOuAncienneProfessionLbl = languageData.GetContent("ClientPP_Titulaire_082").Replace(":", string.Empty);
            }
            else if (autresactivitesV != null)
            {
                metierOuAncienneProfessionLbl = languageData.GetContent("ClientPP_Titulaire_075").Replace(":", string.Empty);
            }

            /*if (retraitesV != null || sansactivitesV != null)
            {
                metierOuAncienneProfessionLbl = languageData.GetContent("ClientPP_Titulaire_079");
                x = 0;
                y += interline;
                string depuisle = languageData.GetContent("ClientPP_Titulaire_depuisle");
                //float lnpx8 = pdfGen.GetWidthOfString(depuisle);
                float lnpx8 = LNPX;
                float wdth8 = lnpx8 * 31 / 50;
                float wdth8nswer = 490 - (10 + wdth8);

                float additive8 = lnpx8 >= 150 ? (lnpx8 / 100) : 10;

                pdfGen.AddDefaultText(depuisle, y, label_width, height, x);
                int value = retraitesV != null ? 166 : 169;
                pdfGen.AddAnswer(GetReportOptionAttributeValueByIdOptionAttribute(value, report), y, wdth8nswer, 20, x += 135);
            }*/

            string metierOuAncienneProfessionLblV = string.Empty;
            if (enactivitesV != null)
                metierOuAncienneProfessionLblV = GetReportOptionAttributeValueByIdOptionAttribute(160, report);
            else if (retraitesV != null)
                metierOuAncienneProfessionLblV = GetReportOptionAttributeValueByIdOptionAttribute(167, report);
            else if (sansactivitesV != null)
                metierOuAncienneProfessionLblV = GetReportOptionAttributeValueByIdOptionAttribute(170, report);
            else if (autresactivitesV != null)
                metierOuAncienneProfessionLblV = GetReportOptionAttributeValueByIdOptionAttribute(163, report);

            string dateAct = languageData.GetContent("ClientPP_Titulaire_en_activite_depuis_le").Replace(":", string.Empty);
            string dateValue = string.Empty;
            
            string sectAct = string.Format(languageDataPP.GetContent("PdfReportPP_300"), string.Empty);
            string sectActV = string.Empty;
            if (enactivitesV != null)
            {
                sectActV = GetReportOptionAttributeValueByIdOptionAttribute(161, report);
                dateAct = languageData.GetContent("ClientPP_Titulaire_en_activite_depuis_le").Replace(":", string.Empty);
                dateValue = GetReportOptionAttributeValueByIdOptionAttribute(903, report);
            }
            else if (retraitesV != null)
            {
                sectActV = GetReportOptionAttributeValueByIdOptionAttribute(168, report);
                dateAct = languageData.GetContent("ClientPP_Titulaire_078").Replace(":", string.Empty);
                dateValue = GetReportOptionAttributeValueByIdOptionAttribute(166, report);
            }
            else if (sansactivitesV != null)
            {
                sectActV = GetReportOptionAttributeValueByIdOptionAttribute(171, report);
                dateAct = languageData.GetContent("ClientPP_Titulaire_081").Replace(":", string.Empty);
                dateValue = GetReportOptionAttributeValueByIdOptionAttribute(169, report);
            }
            else if (autresactivitesV != null)
            {
                sectActV = GetReportOptionAttributeValueByIdOptionAttribute(164, report);
                dateAct = languageData.GetContent("ClientPP_Titulaire_autre_activite_depuis_le").Replace(":", string.Empty);
                dateValue = GetReportOptionAttributeValueByIdOptionAttribute(904, report);
            }

            y += interline;
            GenerateDoubleColonne(pdfGen, metierOuAncienneProfessionLbl, metierOuAncienneProfessionLblV, sectAct, sectActV, ref y);
            #endregion

            y += interline;
            var yTp3 = y;
            pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
            if (y > 0) y = yTp3;
            x = 0;
            pdfGen.AddDefaultText(dateAct, y, label_width, height, x);
            pdfGen.AddAnswer(dateValue, y, wdthAnswer, 20, x += 92);

            // mandataires
            x = 0;
            y += interline;
            pdfGen.AddDefaultText(languageData.GetContent("ClientPP_Titulaire_mandataire_1146"), y, label_width, height, x);
            x = 50;
            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1299, report), y, x);
            pdfGen.AddDefaultText(languageData.GetContent("ClientPP_Titulaire_030"), y += CheckBoxPosition, 200, height, x += tabCheck);
            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1300, report), y -= CheckBoxPosition, x += tabYesNo * 1.5f);
            pdfGen.AddDefaultText(languageData.GetContent("ClientPP_Titulaire_031"), y += CheckBoxPosition, 200, height, x += tabCheck);

            var precisionsMandataire = GetReportOptionValueByIdOption(1301, report);
            if (precisionsMandataire!=null || pIsEmptyReport)
            {
                y += interline;
                string notes = languageData.GetContent("ClientPP_Titulaire_notes_1146");
                pdfGen.AddTextAreaNote(notes, y);

                y += 10;
                x = 0;
                float lstY = y;
                pdfGen.AddBlueBorderWithAutomaticNewPage(ref y, x, 500, 50);
                lstY += 7;
                x += 5;
                pdfGen.AddJustifyTextWithAutomaticNewPage(GetReportOptionAttributeValueByIdOptionAttribute(795, report), ref lstY, 480, 46,
                    x);
            }

            #endregion

            #region         III.	Situation familiale

            y = y + (interline*1.25f);
            var yTmp2 = y;
            pdfGen.CalculeZoneWithAutomaticNewPage(ref y, (2*height));
            if (y > 0)
                y = yTmp2;
            x = 20;
            var reportMarried = GetReportOptionValueByIdOption(278, report); // married
            var reportCelibatire = GetReportOptionValueByIdOption(280, report);
            var reportDivorce = GetReportOptionValueByIdOption(282, report);
            var reportSepare = GetReportOptionValueByIdOption(283, report);
            var reportPACS = GetReportOptionValueByIdOption(279, report);
            var reportVeuf = GetReportOptionValueByIdOption(281, report);
            var reportConcubine = GetReportOptionValueByIdOption(284, report);


            pdfGen.AddSubtitle(string.Format("III. {0}", languageDataPP.GetContent("PdfReportPP_333").Replace("VI.", string.Empty)), y, max_width, height, x);

            x = 0;

            var tabLib = new string[] { "PdfReportPP_334", "PdfReportPP_336", "PdfReportPP_338", "PdfReportPP_340", "PdfReportPP_335", "PdfReportPP_337", "PdfReportPP_339" };

            int cpt = -1;
            if (reportMarried != null) cpt = 0;
            else if (reportCelibatire != null) cpt = 1;
            else if (reportDivorce != null) cpt = 2;
            else if (reportSepare != null) cpt = 3;
            else if (reportPACS != null) cpt = 4;
            else if (reportVeuf != null) cpt = 5;
            else if (reportConcubine != null) cpt = 6;

            y += interline ;

            ReportBL.PlotBooleanValue(pdfGen, reportMarried, y, x);
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_334"), y += CheckBoxPosition, max_width, height, x += tabCheck);

            //if (!string.IsNullOrEmpty(hostCode) && hostCode == "BE")
            //{
            //    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1252, report), y -= CheckBoxPosition, (padding_left * 4) + 15);
            //    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_340_2"), y += CheckBoxPosition, max_width, height, (padding_left * 4) + 15 + tabCheck);
            //}

            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(280, report), y -= CheckBoxPosition, x += 40);
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_336"), y += CheckBoxPosition, max_width, height, x += tabCheck);

            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(282, report), y -= CheckBoxPosition, x += 43);
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_338"), y += CheckBoxPosition, max_width, height, x += tabCheck);

            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(283, report), y -= CheckBoxPosition, x += 40);
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_340"), y += CheckBoxPosition, max_width, height, x += tabCheck);
            //if (!string.IsNullOrEmpty(hostCode) && hostCode == "BE")
            //{
            //    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1253, report), y -= CheckBoxPosition, padding_left * 2);
            //    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_340_1"), y += CheckBoxPosition, max_width, height, (padding_left * 2) + tabCheck);
            //}

            if (!string.IsNullOrEmpty(hostCode) && hostCode == "BE")
                x += 75;
            else x += 40;
            ReportBL.PlotBooleanValue(pdfGen, reportPACS, y -= CheckBoxPosition, x);
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_335"), y += CheckBoxPosition, max_width, height, x += tabCheck);

            if (!string.IsNullOrEmpty(hostCode) && hostCode == "BE")
                x += 82;
            else x += 40;
            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(281, report), y -= CheckBoxPosition, x);
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_337"), y += CheckBoxPosition, max_width, height, x += tabCheck);

            ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(284, report), y -= CheckBoxPosition, x += 40);
            pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_339"), y += CheckBoxPosition, max_width, height, x += tabCheck);

            // TODO à activer si OK en front
            //if (!string.IsNullOrEmpty(hostCode) && hostCode == "BE")
            //{
            //    y += interline;
            //    x = 0;
            //    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1252, report), y -= CheckBoxPosition, x);
            //    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_340_2"), y += CheckBoxPosition, max_width, height, x += tabCheck);

            //    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1253, report), y -= CheckBoxPosition, x+= 75);
            //    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_340_1"), y += CheckBoxPosition, max_width, height, x += tabCheck);
            //}

            if (reportMarried != null || reportPACS != null || pIsEmptyReport)
            {
                y += interline;
                x = tabCheck;
                string dateEv = string.Format(languageDataPP.GetContent("PdfReportPP_341"), string.Empty);
                string dateEvV = GetReportOptionAttributeValueByIdOptionAttribute(178, report);

                float lnpxA2 = pdfGen.GetWidthOfString(string.Format(languageDataPP.GetContent("PdfReportPP_341"), string.Empty));
                float wdthA2 = lnpxA2 * 31 / 50;
                float wdthA2nswer = 500 - (10 + wdthA2);
                float additiveA2 = lnpxA2 >= 150 ? (lnpxA2 / 10) : 10;

                pdfGen.AddDefaultText(dateEv, y, label_width, height, x);
                pdfGen.AddAnswer(dateEvV, y, wdthA2nswer, 20, x += wdthA2 + additiveA2);
            }

            #endregion

            #region IV.	Régime matrimonial


            x = 20;
            var yTmp3 = y + (interline * 2f);
            y += interline * 2f; // subtitle
            if (reportMarried!=null)
            {
                y += 4 * (interline);
            }
            pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 5*height);

            if (y > 0)
                y = yTmp3;

            pdfGen.AddSubtitle(string.Format("IV. {0}", languageDataPP.GetContent("PdfReportPP_342").Replace("VII.", string.Empty)), y, max_width, height, x);
            #region "Is married Or Empty Report"
            if (reportMarried != null || pIsEmptyReport)
            {
                Func<string, ReportOptionValue, string, ReportOptionValue, float, bool, string> TwiceColonneCheckbox = (colonneA, colonneAValue, colonneB, colonneBValue, y1, isIndent) =>
                {
                    x = isIndent ? 50 : 0;
                    ReportBL.PlotBooleanValue(pdfGen, colonneAValue, y1 -= CheckBoxPosition, x);
                    pdfGen.AddDefaultText(colonneA, y1 += CheckBoxPosition, label_width, height, x += tabCheck);

                    if (!string.IsNullOrEmpty(colonneB))
                    {
                        x = isIndent ? 300 : 250;
                        ReportBL.PlotBooleanValue(pdfGen, colonneBValue, y1 -= CheckBoxPosition, x);
                        pdfGen.AddDefaultText(colonneB, y1 += CheckBoxPosition, label_width, height, x += tabCheck);
                    }
                    return string.Empty;
                };

                #region "Row 1"
                // Sépartation des biens
                string sepBien = languageDataPP.GetContent("PdfReportPP_344");
                var sepBienV = GetReportOptionValueByIdOption(287, report);

                // Communauté universelle
                string comUniv = languageDataPP.GetContent("PdfReportPP_346");
                var comUnivV = GetReportOptionValueByIdOption(289, report);

                y += interline;
                TwiceColonneCheckbox(sepBien, sepBienV, comUniv, comUnivV, y, false);
                #endregion

                #region "Row 2"
                // dilemne
                string dilemne = string.Empty;
                ReportOptionValue dilemneV = null;
                if (!string.IsNullOrEmpty(hostCode) && hostCode == "BE")
                {
                    // Régime légal
                    dilemne = languageDataPP.GetContent("PdfReportPP_Regime_Leg");
                    dilemneV = GetReportOptionValueByIdOption(1250, report);
                }
                else
                {
                    // Participation aux acquêts
                    dilemne = languageDataPP.GetContent("PdfReportPP_345");
                    dilemneV = GetReportOptionValueByIdOption(288, report);
                }

                // Séparation de biens avec société d’acquêts
                var sepBienAcq = languageDataPP.GetContent("PdfReportPP_346_1");
                var sepBienAcqV = GetReportOptionValueByIdOption(1159, report);

                y += interline;
                TwiceColonneCheckbox(dilemne, dilemneV, sepBienAcq, sepBienAcqV, y, false);
                #endregion

                #region "Row 3"
                // Communauté réduite aux acquêts (régime légal après 1966)
                string comRed = languageDataPP.GetContent("PdfReportPP_Com_Reduite");
                var comRedV = GetReportOptionValueByIdOption(1148, report);

                // Communauté meubles et acquêts (régime légal avant 1966)
                string comMeuAcq = languageDataPP.GetContent("PdfReportPP_343");
                var comMeuAcqV = GetReportOptionValueByIdOption(1158, report);

                y += interline;
                TwiceColonneCheckbox(comRed, comRedV, comMeuAcq, comMeuAcqV, y, false);
                #endregion

                #region "Row 4"
                // autres
                var othersV = GetReportOptionValueByIdOption(1160, report);
                string others = languageData.GetContent("ClientPP_Titulaire_1258");


                y += interline;
                TwiceColonneCheckbox(others, othersV, string.Empty, null, y, false);
                #endregion

                var yTmp4 = y + interline + 5;
                y += 3 * (interline);
                pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * height);
                if (y > 0)
                    y = yTmp4;

                #region "Row 5"
                x = 20;
                //Avez-vous mis en place des procédures de protection pour votre conjoint
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_347_1"), y, max_width, height);

                // Oui
                x = 375;
                var procOui = GetReportOptionValueByIdOption(1162, report);
                ReportBL.PlotBooleanValue(pdfGen, procOui, y -= CheckBoxPosition, x);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_Yes"), y += CheckBoxPosition, max_width, height, x += tabCheck);

                // Non
                ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1163, report), y -= CheckBoxPosition, x += tabYesNo);
                pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_No"), y += CheckBoxPosition, max_width, height, x += tabCheck);
                #endregion

                if (procOui != null || pIsEmptyReport)
                {
                    #region "Row 6"
                    x = 20;
                    y += interline;
                    // Les clauses d’avantages matrimoniaux
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1164, report), y, x);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_347_2"), y += CheckBoxPosition, max_width, height, x += tabCheck);
                    #endregion

                    #region "Row 7"
                    // Clause de préciput
                    string clausePreciput = languageDataPP.GetContent("PdfReportPP_347_2_1");
                    var clausePreciputV = GetReportOptionValueByIdOption(1168, report);

                    // Clause de partage inégal de la communauté
                    string clausePartageInegal = languageDataPP.GetContent("PdfReportPP_347_2_2");
                    var clausePartageInegalV = GetReportOptionValueByIdOption(1169, report);

                    y += interline;
                    TwiceColonneCheckbox(clausePreciput, clausePreciputV, clausePartageInegal, clausePartageInegalV, y, true);
                    #endregion

                    #region "Row 8"
                    // Clause d’attribution intégrale de la communauté 
                    string clauseAttributionIntegrale = languageDataPP.GetContent("PdfReportPP_347_2_3");
                    var clauseAttributionIntegraleV = GetReportOptionValueByIdOption(1170, report);

                    // Clause de main commune 
                    string clauseMainCommune = languageDataPP.GetContent("PdfReportPP_347_2_5");
                    var clauseMainCommuneV = GetReportOptionValueByIdOption(1172, report);

                    y += interline;
                    TwiceColonneCheckbox(clauseAttributionIntegrale, clauseAttributionIntegraleV, clauseMainCommune, clauseMainCommuneV, y, true);
                    #endregion

                    #region "Row 9"
                    // Clause de prélèvement moyennant indemnité (clause commerciale)    
                    string clauseCom = languageDataPP.GetContent("PdfReportPP_347_2_4");
                    var clauseComV = GetReportOptionValueByIdOption(1171, report);

                    y += interline;
                    TwiceColonneCheckbox(clauseCom, clauseComV, null, null, y, true);
                    #endregion

                    #region "Row 10"
                    x = 20;
                    y += interline;
                    yTmp4 = y;
                    pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
                    if (y > 0)
                        y = yTmp4;
                    // Les clauses d’attribution intégrale de la communauté 
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1165, report), y, x);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_347_3"), y += CheckBoxPosition, max_width, height, x += tabCheck);
                    #endregion

                    #region "Row 11"
                    x = 20;
                    y = y + interline;
                   // y += 2 * (interline + 5);
                    yTmp4 = y;
                    pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 2 * height);
                    if (y > 0)
                        y = yTmp4;
                    // Donations entre époux (élargir les quotités) :
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1166, report), y, x);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_347_4"), y += CheckBoxPosition, max_width, height, x += tabCheck);
                    #endregion

                    #region "Row 12"
                    //  Donation du vivant
                    string donVivant = languageDataPP.GetContent("PdfReportPP_347_4_1");
                    var donVivantV = GetReportOptionValueByIdOption(1173, report);

                    // Donation au dernier des vivants
                    string donDernVivant = languageDataPP.GetContent("PdfReportPP_347_4_2");
                    var donDernVivantV = GetReportOptionValueByIdOption(1174, report);

                    y += interline;
                    TwiceColonneCheckbox(donVivant, donVivantV, donDernVivant, donDernVivantV, y, true);
                    #endregion

                    #region "Row 13"
                    x = 20;
                    y += interline;
                    yTmp4 = y;
                    pdfGen.CalculeZoneWithAutomaticNewPage(ref y, height);
                    if (y > 0)
                        y = yTmp4;
                    // Testament
                    ReportBL.PlotBooleanValue(pdfGen, GetReportOptionValueByIdOption(1167, report), y, x);
                    pdfGen.AddDefaultText(languageDataPP.GetContent("PdfReportPP_347_5"), y += CheckBoxPosition, max_width, height, x += tabCheck);
                    #endregion
                }
            } 
            #endregion

            #endregion

            #region V.	Liberalites

            y += (interline*2f);
            yTmp2 = y;
            pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3*16);
            if (y > 0)
                y = yTmp2;
            
            //Title
            x = 20;
            pdfGen.AddSubtitle(string.Format("V. {0}", languageDataPP.GetContent("PdfReportPP_Liberalite").Replace("VIII.", string.Empty)), y, max_width, height, x);

            y += paddingAfterParagraph;
            GenerateLiberaliteTable(pdfGen, report, ref y,pIsEmptyReport);

            #endregion

            #region VI.	Composition du foyer

            y += interline;
            yTmp2 = y;
            pdfGen.CalculeZoneWithAutomaticNewPage(ref y, 3 * 16);
            if (y > 0)
                y = yTmp2;

            x = 20;
            pdfGen.AddSubtitle(string.Format("VI. {0}", languageDataPP.GetContent("PdfReportPP_358").Replace("X.", string.Empty)), y, max_width, height, x);
            List<ReportOptionAttributeValue> enfants = report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 192)
           .OrderBy(roav => roav.idReportOptionAttributeValue)
           .ToList();


            #region "a) Enfants"
            x += 20;
            y += interline;
            pdfGen.AddTextBoldSubtitle(string.Format("a) {0}", languageDataPP.GetContent("PdfReportPP_359")), y, max_width, height, x);
           // if ((enfants != null && enfants.Any()) || pIsEmptyReport) --> always show header
            {
                y += interline;
                GeneratePersonneAChargeEnfantTable(pdfGen, report, ref y,pIsEmptyReport);
            } 
            #endregion

            #region "b) Autres personnes à charge"
            List<ReportOptionAttributeValue> autres =
           report.ReportOptionAttributeValue.Where(roav => roav.idOptionAttribute == 193)
               .OrderBy(roav => roav.idReportOptionAttributeValue)
               .ToList();
            y += interline + 5;
            pdfGen.AddTextBoldSubtitle(string.Format("b) {0}", languageDataPP.GetContent("PdfReportPP_360")), y, max_width, height, x);
            //   if ((autres != null && autres.Any()) || pIsEmptyReport) --> always show header
            {
                y += interline;
                GenerateAutresPersonnesAChargeTable(pdfGen, report, ref y, pIsEmptyReport);
            } 
            #endregion

            #endregion
        }
コード例 #20
0
        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

        }
コード例 #21
0
        public static int Generate_MissionReport(Upsilab.Data.Model.MissionDocument pMissionDoc, string pathFileName, bool forceDownload, bool pIsEmptyDocument = false)
        {
            float y = 260;
            int height = 20;
            int width = 500;
            int interligne = 15;
            float label_width = 200;
            float answer_width = 280;
            float answer_x = 200;
            // int paddingLeft = 50;
            FirmInstitution firmInstitution = pMissionDoc.CustomerProspect.FirmInstitution;

            //Title and footer document
            string documentTitle = "Rapport de mission";
            string footerContent = firmInstitution.DocumentFooterContent;

            string name = string.Empty;
            string date = string.Empty;
            string idDocument = string.Empty;

            if (!pIsEmptyDocument)
            {
                if (pMissionDoc.CustomerProspect.IsCorporation.HasValue && pMissionDoc.CustomerProspect.IsCorporation.Value)
                    name = pMissionDoc.CustomerProspect.CompanyName;
                else
                    name = string.Format("{0} {1}", pMissionDoc.CustomerProspect.User.UserName, pMissionDoc.CustomerProspect.User.UserFirstName);

                date = DateTime.Now.ToShortDateString();
                idDocument = pMissionDoc.idMissionDocument.ToString();
            }
            if (forceDownload)
                date = string.Empty;
            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent, name, string.Format("{0} {1}", string.IsNullOrEmpty(date) ? string.Empty : LanguageContentBL.Translate("PdfReportPP_004"), date));

            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent);

            #region page 1
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo;
            pdfGen.AddBackgroungImage();
            pdfGen.AddLogoOnFirstPage(logoPathFileName, firmInstitution.LogoAlign);



            y = 380;
            pdfGen.AddWhiteTitle(LanguageContentBL.Translate("PdfRapportMission_001"), y, 240, 60, 260, 20);

            pdfGen.AddWhiteTitle((pMissionDoc.CustomerProspect.IsCorporation.HasValue && pMissionDoc.CustomerProspect.IsCorporation.Value) ? LanguageContentBL.Translate("PdfLM_134") : LanguageContentBL.Translate("PdfReportPP_003"), y += (2 * interligne + 15), 500, 20, 0, 12);//PERSONNE PHYSIQUE ou PERSONNE MORALE

            pdfGen.AddWhiteBorder(y += interligne * 1.7f, 210, 290, 70);

            if (pIsEmptyDocument)
            {
            }
            else
            {
                if (!forceDownload)
                    pdfGen.AddWhiteTitleLeft(DateTime.Now.ToShortDateString(), y += 10, 500, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(name, y += (interligne), 500, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(string.Format("{0}-{1}", LanguageContentBL.Translate("PdfRapportMission_003"), idDocument), y += (interligne), 500, 11, 220, 10);
            }

            #endregion

            #region page 2

            Data.Model.CustomerProspect cust = new Data.Model.CustomerProspect();
            Data.Model.User userAdviser = new Data.Model.User();
            List<CustomerProspectOptionValue> data = new List<CustomerProspectOptionValue>();

            if (!pIsEmptyDocument)
            {
                cust = pMissionDoc.CustomerProspect;
                data = Upsilab.Business.CustomerProspect.CustomerProspectOptionBL.GetOptionValueListWithIdCustomerProspectAndIdParentOptionPlus(cust.idCustomer, Upsilab.Business.CustomerProspect.CustomerProspectBL.MissionParentQuestionId);
                userAdviser = (pMissionDoc.User != null) ? pMissionDoc.User : pMissionDoc.CustomerProspect.User1;
            }

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfMissionClient"), y, width, height);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionNom"), (pIsEmptyDocument) ? string.Empty : (cust.IsCorporation.HasValue && cust.IsCorporation.Value) ? cust.CompanyName : cust.User.UserName), y += interligne * 1.5f, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionNom"), string.Empty), y += interligne * 1.5f, label_width, height);
            pdfGen.AddAnswer((pIsEmptyDocument) ? string.Empty : (cust.IsCorporation.HasValue && cust.IsCorporation.Value) ? cust.CompanyName : cust.User.UserName, y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionPrenom"), (pIsEmptyDocument) ? string.Empty : (cust.IsCorporation.HasValue && cust.IsCorporation.Value) ? LanguageContentBL.Translate("PdfMission") : cust.User.UserFirstName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionPrenom"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer((pIsEmptyDocument) ? string.Empty : (cust.IsCorporation.HasValue && cust.IsCorporation.Value) ? string.Empty : cust.User.UserFirstName, y, answer_width, height, answer_x);

            //  pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionAdresse"), (pIsEmptyDocument) ? string.Empty : cust.Adress), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionAdresse"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer((pIsEmptyDocument) ? string.Empty : cust.Adress, y, answer_width, height * 3, answer_x);

            // pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionCP"), (pIsEmptyDocument) ? string.Empty : cust.ZipCode), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionCP"), string.Empty), y += interligne * 2.8f, label_width, height);
            pdfGen.AddAnswer((pIsEmptyDocument) ? string.Empty : cust.ZipCode, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionVille"), (pIsEmptyDocument) ? string.Empty : cust.City), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionVille"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer((pIsEmptyDocument) ? string.Empty : cust.City, y, answer_width, height, answer_x);

            FirmInstitution firm = new FirmInstitution();
            if (!pIsEmptyDocument)
            {
                firm = cust.FirmInstitution;
            }
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfMissionConseiller"), y += interligne * 1.5f, width, height);
            // pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionNomEtabs"), firm.FirmInstitutionName), y += interligne * 1.5f, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionNomEtabs"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.FirmInstitutionName, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionNomCons"), userAdviser.UserName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionNomCons"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(userAdviser.UserName, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionPrenomCons"), userAdviser.UserFirstName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionPrenomCons"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(userAdviser.UserFirstName, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionNomDir"), firm.LeaderName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionNomDir"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.LeaderName, y, answer_width, height, answer_x);

            // pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionPrenomDir"), firm.LeaderFirstName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionPrenomDir"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.LeaderFirstName, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionAdrssSiege"), firm.FirmStreet), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionAdrssSiege"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.FirmStreet, y, answer_width, height * 3, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionCP"), firm.FirmPostCode), y += interligne*2.8f, width, height);//CP
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionCP"), string.Empty), y += interligne * 2.8f, label_width, height);
            pdfGen.AddAnswer(firm.FirmPostCode, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionVille"), firm.FirmCity), y += interligne, width, height);//Ville
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionVille"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.FirmCity, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionRCS"), firm.RCS), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionRCS"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.RCS, y, answer_width, height, answer_x);


            if (SessionManager.GetHostCodeSession() != PageLanguageHelper.HostCode.BE.ToString())
            {
                //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionRegistre"), firm.RegisteredInRegister), y += interligne, width, height);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionRegistre"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer(firm.RegisteredInRegister, y, answer_width, height, answer_x);

                //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionAgregateur"), ""), y += interligne, width, height);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfMissionAgregateur"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer("", y, answer_width, height, answer_x);

            }

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfMmeMsieur"), y += interligne * 2f, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_004"), y += interligne * 2f, width, height * 3);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_005"), y += interligne * 2f, width, height * 3);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_006"), y += interligne * 3f, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_007"), y += interligne * 1.5f, width, height * 2);

            #endregion

            #region page 3

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRapportmission_008"), y, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_009"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_010"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddBlueBorder(y += interligne, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue("Client_Mission_008", data), y + 5 * 1.5f, width, height, 5);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_011"), y += interligne * 3f, width, height);

            pdfGen.AddBlueBorder(y += interligne * 1.5f, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(192, 126, data), y + 2 * 1.5f, width, height, 5);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(192, 127, data), y + 2 * 1.5f, width, height, 5);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(192, 128, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(192, 129, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(192, 130, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(192, 131, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(192, 132, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(192, 133, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(192, 134, data), y + 2 * 2.6f, width, height, 5);
            pdfGen.AddBlueBorder(y += interligne * 3f, 0, width, height * 2);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(192, 135, data), y + 2 * 2.6f, width, height, 5);

            #endregion

            #region page 4

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRapportmission_012"), y, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_013"), y += interligne * 1.5f, width, height * 3);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_012", data), y += interligne * 3, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_014"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_013", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_015"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_014", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_016"), y, width, height, 15);

            if (SessionManager.GetHostCodeSession() != PageLanguageHelper.HostCode.BE.ToString())
            {
                PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_015", data), y += interligne, 0, "1");
                pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_017"), y, width, height, 15);
                PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_016", data), y += interligne, 0, "1");
                pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_018"), y, width, height, 15);
            }
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_017", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_019"), y, width, height, 15);

            if (SessionManager.GetHostCodeSession() != PageLanguageHelper.HostCode.BE.ToString())
            {
                PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_1241", data), y += interligne, 0, "1");
                pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_1241"), y, width, height, 15);
            }

            // PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue("Client_Mission_018", data), y += interligne, 0, "1"); --> pas de checkbox sur le formulaire
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_020"), y += interligne, width, height);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue("Client_Mission_018", data), y, 480, height * 2, 40);




            if (SessionManager.GetHostCodeSession() != PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddLabelNote(LanguageContentBL.Translate("PdfReportPP_Notes"), y += interligne * 2, 500, 20);
                pdfGen.AddBlueBorder(y += interligne, 0, width, 280);
                pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue("Client_Mission_019", data), y + 5, 480, 280, 10);
            }

            #endregion

            #region page 5
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRapportmission_021"), y, width, height);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_020", data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_022"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_021", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_023"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_022", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_024"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_023", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_025"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_024", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_026"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_025", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_027"), y, width, height, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Mission_026", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_028"), y, width, height, 15);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(208, 138, data), y += interligne, 480, height * 2, 15);

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddLabelNote(LanguageContentBL.Translate("PdfReportPP_Notes"), y += interligne, 500, 20);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 600);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(194, 139, data), y + 5, 480, 600, 10);

            #endregion

            #region page 6
            pdfGen.CreatePage();
            y = 0;

            //Analyse de la situation
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRapportmission_029"), y, width, height);
            pdfGen.AddLabelNote(LanguageContentBL.Translate("PdfReportPP_Notes"), y += interligne * 2, 500, 20);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 600);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(195, 140, data), y + 5, 480, 600, 10);
            #endregion

            #region page 7

            pdfGen.CreatePage();
            y = 0;

            //Rappel de la remuneration
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRapportmission_029_0"), y, width, height);
            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfRapportmission_029_1"), y += interligne * 2, 500, 20);

            //From LM
            //Le mode de facturation et de rémunération
            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_072"), y += (interligne * 2) - 5, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_073"), y += interligne * 2, width, 20);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_074"), y += interligne, width, 20 * 3);

            pdfGen.AddBlueBorder(y += interligne * 3, 0, 30, 20);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(1234, 756, data), y + 5, 50, 20, 5);
            pdfGen.AddDefaultText("X", y + 8, 20, 20, 40);
            pdfGen.AddBlueBorder(y, 60, 30, 20);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(1234, 757, data), y + 5, 50, 30, 65);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_075"), y + 8, width, height, 110);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_076"), y += interligne * 3, width, height * 2);
            // pdfGen.AddDefaultText("Au titre de l’accompagnement du client, une information plus précise sera fournie ultérieurement sur simple demande une fois connus les supports choisis par le client.", y += interligne * 3, width, height * 2, 15);
            pdfGen.AddReference(LanguageContentBL.Translate("PdfLM_077"), y += interligne * 2, width, height * 2, 15);

            //Les honoraires : n'afficher que les honoraires fournis
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_078"), y += interligne * 3, width, height);

            string honoraire_1_Value = CustomerProspectOptionBL.GetOptionValue(1236, data);
            string honoraire_2_Value = CustomerProspectOptionBL.GetOptionValue(1237, data);
            string honoraire_3_Value = CustomerProspectOptionBL.GetOptionValue(1238, data);
            string honoraire_4_Value = CustomerProspectOptionBL.GetOptionValue(1240, data);

            //1-
            if (honoraire_1_Value == "1" || pIsEmptyDocument)
            {
                PlotBooleanValue(pdfGen, honoraire_1_Value, y += (interligne * 1.5f) + 10, 0, "1");
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_079")
                    , (pIsEmptyDocument) ? Espace : CustomerProspectOptionBL.GetAttributeValue(1236, 760, data)
                    , (pIsEmptyDocument) ? Espace : CustomerProspectOptionBL.GetAttributeValue(1236, 761, data)
                    , (pIsEmptyDocument) ? Espace : CustomerProspectOptionBL.GetAttributeValue(1236, 762, data))
                    , y - 10, 480, height * 4, 20);
            }

            //Ou
            if (pIsEmptyDocument)
                pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_080"), y += interligne * 3f, width, height);

            //2-
            if (honoraire_2_Value == "1" || pIsEmptyDocument)
            {
                PlotBooleanValue(pdfGen, honoraire_2_Value, y += (interligne * 1.5f) + 10, 0, "1");
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_081")
                    , (pIsEmptyDocument) ? Espace : CustomerProspectOptionBL.GetAttributeValue(1237, 763, data)), y - 10, width, height * 3, 20);
            }

            if (pIsEmptyDocument)
                pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_080"), y += interligne * 2.5f, width, height);

            //3-
            if (honoraire_3_Value == "1" || pIsEmptyDocument)
            {
                PlotBooleanValue(pdfGen, honoraire_3_Value, y += (interligne * 1.5f) + 20, 0, "1");
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_082")
                    , (pIsEmptyDocument) ? Espace : CustomerProspectOptionBL.GetAttributeValue(1238, 764, data)), y - 20, width, height * 5, 20);
            }

            if (honoraire_4_Value == "0" || pIsEmptyDocument)
            {
                //Nous sommes convenus d'un règlement d'un montant de {0} Euros HT à l'acceptation de la lettre de mission et le solde lors du rendez-vous de synthèse de la mission.
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_083")
                    , (pIsEmptyDocument) ? Espace : CustomerProspectOptionBL.GetAttributeValue(1235, 758, data)), y += interligne * 4, width, height * 2);

                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_084")
                   , CustomerProspectOptionBL.GetAttributeValue(1235, 759, data)), y += interligne * 2, width, height);
            }

            //Ou
            if (pIsEmptyDocument)
                pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_080"), y += interligne * 2.5f, width, height);


            //4- Autre ?
            if (honoraire_4_Value == "1" || pIsEmptyDocument)
            {
                PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(1240, data), y += (interligne * 1.5f) + 10, 0, "1");
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_084_1")), y, 480, 20, 20);
                //pdfGen.AddDefaultText(string.Format(CustomerProspectOptionBL.GetAttributeValue(1240, 766, data)), y += interligne, width, 280, 20);
                pdfGen.AddBlueBorder(y += interligne, 20, width - 20, 100);
                pdfGen.AddDefaultText(pIsEmptyDocument ? Espace : CustomerProspectOptionBL.GetAttributeValue(1240, 766, data), y + 5, width - 30, 100, 25);

            }

            #endregion

            #region page 8

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfRapportmission_030"), y, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_031"), y += interligne * 2, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_032"), y += interligne, width, height);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_033"), y += interligne * 2, width, height * 2);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_034"), y += interligne * 2, width, height * 2);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfRapportmission_035"), y += interligne * 2, width, height * 2);

            #endregion

            #region page 9

            pdfGen.CreatePage();
            y = 0;
            //Signature
            pdfGen.AddTitle(@"Signatures", 0);

            pdfGen.AddDefaultBoldText(@"Signature de l'Etablissement", 100, 500, 20, 80);


            pdfGen.AddBlueBorder(130, 35, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(@"J'ai lu et j'accepte les conditions générales.", 135, 200, 20, 40);
                pdfGen.AddDefaultText(@"Lu et approuvé.", 145, 145, 20, 40);
                pdfGen.AddDefaultText(@"Date:", 160, 145, 20, 40);
            }

            pdfGen.AddDefaultBoldText(@"Signature du Client", 100, 500, 20, 340);
            pdfGen.AddBlueBorder(130, 280, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(@"J'ai lu et j'accepte les conditions générales.", 135, 200, 20, 285);
                pdfGen.AddDefaultText(@"Lu et approuvé.", 145, 145, 20, 285);
                pdfGen.AddDefaultText(@"Date:", 160, 145, 20, 285);
            }

            #endregion

            //Force download if pathFileName is not set
            if (forceDownload)
            {
                string fileName = string.Format("RapportDeMission_{0}.pdf", pMissionDoc.idMissionDocument);
                pdfGen.GeneratePdfToWeb(fileName);
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }
            return pdfGen.PageCount;
        }
コード例 #22
0
        private static float GeneratePMRLesPersonnesHabilitées(FoxitPDFGenerator instance, ReportOptionAttributeValue data, PageLanguageHelper languageData, float yStartPoint = 0)
        {
            if (data != null)
            {

                if (yStartPoint + 310 >= 700)
                {
                    instance.CreatePage();
                    yStartPoint = 0;
                }

                yStartPoint = yStartPoint + 20; //spacing

                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line1"), yStartPoint, 500, 20);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.Title, yStartPoint, 40, "2");
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line1_Item3"), yStartPoint, 500, 20, 60);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.Title, yStartPoint, 110, "1");
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line1_Item2"), yStartPoint, 500, 20, 130);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.Title, yStartPoint, 200, "3");
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line1_Item4"), yStartPoint, 500, 20, 220);

                //instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PersonnesHabiliteesSection_Line2"), data.CustomObjectValue.Name), yStartPoint + 20, 500, 20);
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line2"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Name, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PersonnesHabiliteesSection_Line3"), data.CustomObjectValue.FirstName), yStartPoint + 35, 500, 20);
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line3"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.FirstName, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_telPortable"), data.CustomObjectValue.Phone), yStartPoint + 50, 500, 20);//tel
                instance.AddDefaultText(languageData.GetContent("PDFPM_telPortable"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Phone, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_fax"), data.CustomObjectValue.Fax), yStartPoint + 65, 500, 20);//fax
                instance.AddDefaultText(languageData.GetContent("PDFPM_fax"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Fax, yStartPoint, answer_width, 20, answer_x);

                //instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_email"), data.CustomObjectValue.Email), yStartPoint + 80, 500, 20);//email
                instance.AddDefaultText(languageData.GetContent("PDFPM_email"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Email, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(languageData.GetContent("PDFPM_adresse"), yStartPoint + 95, 500, 20);//adresse
                //instance.AddDefaultText(data.CustomObjectValue.Address, yStartPoint + 95, 400, 60, 50);//adresse
                instance.AddDefaultText(languageData.GetContent("PDFPM_adresse"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.MaidenName, yStartPoint, answer_width, 60, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_cp"), data.CustomObjectValue.ZipCode), yStartPoint + 140, 500, 20);//cp
                instance.AddDefaultText(languageData.GetContent("PDFPM_cp"), yStartPoint += interline * 2.8f, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.ZipCode, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PDFPM_ville"), data.CustomObjectValue.City), yStartPoint + 155, 500, 20);//ville
                instance.AddDefaultText(languageData.GetContent("PDFPM_ville"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.City, yStartPoint, answer_width, 20, answer_x);

                //instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PersonnesHabiliteesSection_Line4"), data.CustomObjectValue.DateOfBirth), yStartPoint + 170, 500, 20);
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line4"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.DateOfBirth, yStartPoint, answer_width, 20, answer_x);

                // instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PersonnesHabiliteesSection_Line5"), data.CustomObjectValue.Function), yStartPoint + 185, 500, 20);
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line5"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Function, yStartPoint, answer_width, 20, answer_x);

                //instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PersonnesHabiliteesSection_Line6"), data.CustomObjectValue.Nationality), yStartPoint + 200, 500, 20);
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line6"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Nationality, yStartPoint, answer_width, 20, answer_x);

                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsResident, yStartPoint += interline, 0, "1");
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line7_Item1"), yStartPoint, 500, 20, 15);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsResident, yStartPoint, 80, "2");
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line7_Item2"), yStartPoint, 500, 20, 95);

                //   instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PersonnesHabiliteesSection_Line8"), data.CustomObjectValue.Country), yStartPoint + 230, 500, 20);
                //instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line9"), yStartPoint + 245, 500, 20, 100);
                //instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line10"), yStartPoint + 260, 500, 20, 100);
                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line8"), yStartPoint += interline, label_width, height);
                instance.AddAnswer(data.CustomObjectValue.Country, yStartPoint, answer_width, 20, answer_x);

                instance.AddBlueBorder(yStartPoint += 25, 70, 400, 92);
                instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PersonnesHabiliteesSection_Line9"), languageData.GetContent("PersonnesHabiliteesSection_Line10")), yStartPoint += 10, 380, 40, 80);

                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsFATF, yStartPoint += interline * 1.5f, 100, "1");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), yStartPoint, 500, 20, 120);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsFATF, yStartPoint, 150, "2");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), yStartPoint, 500, 20, 170);


                //instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line11"), yStartPoint + 290, 500, 20, 100);
                //instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line12"), yStartPoint + 305, 500, 20, 100);
                instance.AddDefaultText(String.Format(@"{0} : {1}", languageData.GetContent("PersonnesHabiliteesSection_Line11"), languageData.GetContent("PersonnesHabiliteesSection_Line12")), yStartPoint += interline, 380, 40, 80);

                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsOffshore, yStartPoint += interline * 1.5f, 100, "1");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), yStartPoint, 500, 20, 115);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsOffshore, yStartPoint, 150, "2");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), yStartPoint, 500, 20, 165);

                instance.AddDefaultText(languageData.GetContent("PersonnesHabiliteesSection_Line13"), yStartPoint += interline * 1.8f, 500, 20);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsOwner, yStartPoint += interline, 0, "1");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_Yes_Caps"), yStartPoint, 500, 20, 15);
                ReportBL.PlotBooleanValue(instance, data.CustomObjectValue.IsOwner, yStartPoint, 50, "2");
                instance.AddDefaultText(languageData.GetContent("Report_Symbol_No_Caps"), yStartPoint, 500, 20, 65);
                instance.AddReference(languageData.GetContent("PersonnesHabiliteesSection_Line14"), yStartPoint += interline * 1.3f, 500, 20);

                return yStartPoint + 380;
            }
            //added spacing
            return yStartPoint;
        }
コード例 #23
0
        public static int GeneratePM_EngagementLetter(Upsilab.Data.Model.MissionDocument pMissionDoc, string pathFileName, bool forceDownload, bool pIsEmptyDocument = false)
        {
            float y = 240;
            int height = 20;
            int width = 500;
            int interligne = 15;
            int paddingLeft = 50;
            float label_width = 200;
            float answer_width = 280;
            float answer_x = 200;

            FirmInstitution firmInstitution = pMissionDoc.CustomerProspect.FirmInstitution;
            string footerContent = pMissionDoc.CustomerProspect.FirmInstitution.DocumentFooterContent;
            Data.Model.User userAdviser = (pMissionDoc.User != null) ? pMissionDoc.User : pMissionDoc.CustomerProspect.User1;


            //Title and footer document
            string documentTitle = "Lettre de mission";
            string name = string.Empty;
            string date = string.Empty;
            string idDocument = string.Empty;

            if (!pIsEmptyDocument)
            {
                name = pMissionDoc.CustomerProspect.CompanyName;
                date = DateTime.Now.ToShortDateString();
                idDocument = pMissionDoc.idMissionDocument.ToString();
            }

            if (forceDownload)
                date = string.Empty;
            //FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent);
            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(documentTitle, footerContent, name, string.Format("{0} {1}", string.IsNullOrEmpty(date) ? string.Empty : LanguageContentBL.Translate("PdfReportPP_004"), date));

            #region page 1
            //Logo
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo;
            pdfGen.AddBackgroungImage();
            pdfGen.AddLogoOnFirstPage(logoPathFileName, firmInstitution.LogoAlign);


            if (pIsEmptyDocument)
            {
                firmInstitution = new FirmInstitution();
                userAdviser = new Data.Model.User();
            }

            //pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_001"), y, width, 100);
            //pdfGen.AddReceuil_SubTitle_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfLM_134"), y += 50, width, height);

            //if (pIsEmptyDocument)
            //{
            //    string[] rowContents = { LanguageContentBL.Translate("PdfRapportMission_002") //Date de maj ou Date de création
            //                         , LanguageContentBL.Translate("PdfFirm_082")
            //                         , string.Empty
            //                       };
            //    pdfGen.LM_AddTableTitle(rowContents, 90, y += 50);
            //}
            //else
            //{
            //    string[] rowContents = { string.Format(LanguageContentBL.Translate("PdfRapportMission_002"), DateTime.Now.ToShortDateString()) //Date de maj ou Date de création
            //                         , string.Format("{0} LM-{1}",LanguageContentBL.Translate("PdfFirm_082"),pMissionDoc.idMissionDocument)
            //                         , string.Format("{0}", pMissionDoc.CustomerProspect.CompanyName)
            //                       };
            //    pdfGen.LM_AddTableTitle(rowContents, 90, y += 50);
            //}

            y = 380;
            pdfGen.AddWhiteTitle(LanguageContentBL.Translate("PdfLM_001"), y, 240, 60, 260, 20);

            pdfGen.AddWhiteTitle(LanguageContentBL.Translate("PdfLM_134"), y += (2 * interligne + 15), 500, 20, 0, 12);//PERSONNE MORALE

            pdfGen.AddWhiteBorder(y += interligne * 1.7f, 210, 290, 70);

            if (pIsEmptyDocument)
            {
            }
            else
            {
                if (!forceDownload)
                    pdfGen.AddWhiteTitleLeft(DateTime.Now.ToShortDateString(), y += 10, 500, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(name, y += (interligne), 500, 11, 220, 10);
                pdfGen.AddWhiteTitleLeft(string.Format("LM-{0}", pMissionDoc.idMissionDocument), y += (interligne), 500, 11, 220, 10);
            }


            //pdfGen.AddBlueBorder(y += 100, 105, 375, 30);
            //pdfGen.AddReceuil_DetailText_Justify_Calibri_Label(string.Format("{0}", pMissionDoc.CustomerProspect.CompanyName), y + 5, 300, 20, 120);
            #endregion

            #region page 2

            Data.Model.CustomerProspect cust = new Data.Model.CustomerProspect();
            cust.User = new Data.Model.User();
            List<CustomerProspectOptionValue> data = new List<CustomerProspectOptionValue>();
            if (!pIsEmptyDocument)
            {
                cust = pMissionDoc.CustomerProspect;
                data = Upsilab.Business.CustomerProspect.CustomerProspectOptionBL.GetOptionValueListWithIdCustomerProspectAndIdParentOption(cust.idCustomer,
                    Upsilab.Business.CustomerProspect.CustomerProspectBL.EngagementLetterParentQuestionId);
            }

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_003"), y, width, height);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_004"), cust.CompanyName), y += interligne * 1.5f, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_004"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(cust.CompanyName, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format("Prénom : {0}", "XXX"), y += interligne, width, height);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_006"), cust.Adress), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_006"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(cust.Adress, y, answer_width, height * 3, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_007"), cust.ZipCode), y += interligne*2.8f, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_007"), string.Empty), y += interligne * 2.8f, label_width, height);
            pdfGen.AddAnswer(cust.ZipCode, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_008"), cust.City), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_008"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(cust.City, y, answer_width, height, answer_x);


            FirmInstitution firm = new FirmInstitution();
            if (!pIsEmptyDocument)
                firm = cust.FirmInstitution;
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_009"), y += interligne * 1.5f, width, height);
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_010"), firm.FirmInstitutionName), y += interligne * 1.5f, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_010"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.FirmInstitutionName, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_011"), userAdviser.UserName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_011"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(userAdviser.UserName, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_012"), userAdviser.UserFirstName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_012"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(userAdviser.UserFirstName, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_013"), firm.LeaderName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_013"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.LeaderName, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_014"), firm.LeaderFirstName), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_014"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.LeaderFirstName, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_015"), firm.FirmStreet), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_015"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.FirmStreet, y, answer_width, height * 3, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_016"), firm.FirmPostCode), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_016"), string.Empty), y += interligne * 2.8f, label_width, height);
            pdfGen.AddAnswer(firm.FirmPostCode, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_017"), firm.FirmCity), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_017"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.FirmCity, y, answer_width, height, answer_x);

            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_018"), firm.RCS), y += interligne, width, height);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_018"), string.Empty), y += interligne, label_width, height);
            pdfGen.AddAnswer(firm.RCS, y, answer_width, height, answer_x);


            if (SessionManager.GetHostCodeSession() != PageLanguageHelper.HostCode.BE.ToString())
            {
                //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_019"), firm.RegisteredInRegister), y += interligne, width, height);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_019"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer(firm.RegisteredInRegister, y, answer_width, height, answer_x);

                //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_020"), firm.AgregateurNoms), y += interligne, width, height);
                pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_020"), string.Empty), y += interligne, label_width, height);
                pdfGen.AddAnswer(firm.AgregateurNoms, y, answer_width, height, answer_x);

            }

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_021"), y += interligne * 2, width, height, paddingLeft);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_022"), y += interligne * 1.5f, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_023"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_024"), y += interligne * 3f, width, height * 2);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_025"), y += interligne * 2.5f, width, height * 2);

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_026"), y += interligne * 2.5f, width, height);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_027"), y += interligne * 1.5f, width, height * 3);


            #endregion

            #region page 3

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_028"), y, width, height);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(138, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_029"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(139, data), y += interligne + 5, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_030"), y, width, height * 2, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(140, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_031"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(141, data), y += interligne + 5, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_032"), y, width, height * 2, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(142, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_033"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(143, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_034"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(144, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_035"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(145, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_036"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(146, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_037"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(147, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_038"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(148, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_039"), y, width, 20, 15);
            //PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(149, data), y += interligne, 0, "1");
            //pdfGen.AddDefaultText("Réception / transmission d’ordres", y, width, 20, 15);
            //PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetProspectValue(150, data), y += interligne, 0, "1");
            //pdfGen.AddDefaultText("Suivi annuel de patrimoine et produits financiers externes", y, width, 20, 15);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_040"), y += interligne, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 20);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(128, 96, data), y + 5, width, height, 5);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_040"), y += interligne * 1.5f, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 20);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(128, 97, data), y + 5, width, height, 5);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_040"), y += interligne * 1.5f, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 20);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(128, 98, data), y + 5, width, height, 5);

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_041"), y += interligne * 2, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_042"), y += interligne * 1.5f, width, height);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_031", data), y += interligne * 1.5f + 5, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_043"), y, width, 40, 15);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_032", data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_045"), y, width, 20, 15);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_033", data), y += interligne + 5, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_054"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_034", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_055"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_035", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_135"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_036", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_136"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_037", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_137"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_038", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_138"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_039", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_139"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_040", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_140"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_041", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_141"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_042", data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_142"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue("Client_Letter_PM_043", data), y += interligne);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_143"), y, width, 20, 15);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_040"), y += interligne, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 20);
            //if (!cust.IsCorporation.Value)//PP
            //    pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(151, 59, data), y + 5, width, height, 5);
            //else
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue("Client_Letter_PM_044", data), y + 5, width, height, 5);

            #endregion

            #region page 4

            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_056"), y, width, height);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(166, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_057"), y, width, 20 * 2, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(167, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_058"), y, width, 20 * 3, 15);

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_059"), y += interligne * 3, width, height);
            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_060"), y += interligne * 1.5f, width, height);
            pdfGen.AddLabelNote(LanguageContentBL.Translate("PdfLM_061"), y += interligne, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, 480, 280);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(168, 100, data), y + 5, 480, 280, 5);
            #endregion

            #region page 5
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_062"), y, width, height);
            pdfGen.AddLabelNote(LanguageContentBL.Translate("PdfLM_061"), y += interligne, width, height);//Notes
            pdfGen.AddBlueBorder(y += interligne, 0, 480, 280);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(169, 101, data), y + 5, 480, 280, 5);

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_063"), y += interligne * 22f, width, height);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(172, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_064"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(173, data), y += interligne + 5, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_065"), y, width, 40, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(174, data), y += interligne * 1.5f, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_066"), y, width, 20, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(175, data), y += interligne + 5, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_067"), y, width, 40, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(176, data), y += (interligne) + 5, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_068"), y, width, 40, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(177, data), y += (interligne) + 5, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_069"), y, width, 40, 15);
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(178, data), y += (interligne) + 5, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_070"), y, width, 40, 15);

            #endregion

            #region page 6
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_040"), y, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 20);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(170, 102, data), y + 5, width, height, 5);

            pdfGen.AddLabelNote(LanguageContentBL.Translate("PdfLM_061"), y += interligne * 2f, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, width, 280);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(170, 103, data), y + 5, 480, 280, 5);
            #endregion

            #region page 7
            pdfGen.CreatePage();
            y = 0;

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_071"), y, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_061"), y += interligne, width, height);
            pdfGen.AddBlueBorder(y += interligne, 0, 480, 280);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(171, 104, data), y + 5, 480, 125, 5);

            #endregion

            #region page 8

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_072"), y, width, height);//Le mode de facturation et de rémunération
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_073"), y += interligne, width, 20);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_074"), y += interligne, width, 20 * 3);

            pdfGen.AddBlueBorder(y += interligne * 3, 0, 30, 20);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(131, 105, data), y + 5, 50, 20, 5);
            pdfGen.AddDefaultText("X", y + 8, 20, 20, 40);
            pdfGen.AddBlueBorder(y, 60, 30, 20);
            pdfGen.AddDefaultText(CustomerProspectOptionBL.GetAttributeValue(131, 106, data), y + 5, 50, 30, 65);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_075"), y + 8, width, height, 110);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_076"), y += interligne * 3, width, height * 2);
            // pdfGen.AddDefaultText("Au titre de l’accompagnement du client, une information plus précise sera fournie ultérieurement sur simple demande une fois connus les supports choisis par le client.", y += interligne * 3, width, height * 2, 15);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_077"), y += interligne * 2, width, height * 2, 15);


            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_078"), y += interligne * 3, width, height);//Les honoraires

            //Concernant 1
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(181, data), y += (interligne * 1.5f) + 10, 0, "1");
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_079")
                , pIsEmptyDocument ? Espace : CustomerProspectOptionBL.GetAttributeValue(181, 115, data)
                , pIsEmptyDocument ? Espace : CustomerProspectOptionBL.GetAttributeValue(181, 116, data)
                , pIsEmptyDocument ? Espace : CustomerProspectOptionBL.GetAttributeValue(181, 117, data))
                , y - 10, width, height * 4, 20);

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_080"), y += interligne * 3f, width, height);

            //Concernant 2
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(182, data), y += (interligne * 1.5f) + 10, 0, "1");
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_081")
                , pIsEmptyDocument ? Espace : CustomerProspectOptionBL.GetAttributeValue(182, 118, data)), y - 10, width, height * 3, 20);

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_080"), y += interligne * 2.5f, width, height);

            //Concernant 3
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(183, data), y += (interligne * 1.5f) + 20, 0, "1");
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_082")
                , pIsEmptyDocument ? Espace : CustomerProspectOptionBL.GetAttributeValue(183, 119, data)), y - 20, width, height * 5, 20);

            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_083")
                , pIsEmptyDocument ? Espace : CustomerProspectOptionBL.GetAttributeValue(133, 120, data)), y += interligne * 4, width, height * 2);

            /*pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_084")
               , ), y += interligne * 2, width, height);*/

            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_084"), string.Empty), y += interligne * 2, label_width, height);
            pdfGen.AddAnswer(CustomerProspectOptionBL.GetAttributeValue(133, 121, data), y, answer_width, height, answer_x);

            /* pdfGen.CreatePage();
             y = 0;*/

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_080"), y += interligne * 2.5f, width, height);

            //Autre 4
            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(1239, data), y += interligne, 0, "1");
            //pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_084_1")), y, 480, 20, 20);
            //pdfGen.AddDefaultText(pIsEmptyDocument ? Espace : string.Format(CustomerProspectOptionBL.GetAttributeValue(1239, 765, data)), y += interligne, width, 280, 20);
            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_084_1"), string.Empty), y, label_width, height, 15);
            //pdfGen.AddAnswer(pIsEmptyDocument ? Espace : CustomerProspectOptionBL.GetAttributeValue(1239, 765, data), y, answer_width, height, answer_x);
            pdfGen.AddBlueBorder(y += interligne, 20, width - 20, 100);
            pdfGen.AddDefaultText(pIsEmptyDocument ? Espace : CustomerProspectOptionBL.GetAttributeValue(1239, 765, data), y + 5, width - 30, 100, 25);

            //#endregion

            #endregion

            #region page 9

            pdfGen.CreatePage();
            y = 0;
            //Section : La nature et les modalités de la prestation de conseil
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_085"), y, width, height);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_086"), y += interligne, width, height);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(184, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_087"), y, width, height, 15);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(185, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_088"), y, width, height, 15);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(186, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_089"), y, width, height * 2, 15);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(187, data), y += interligne + 5, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_090"), y, width, height * 2, 15);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(188, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_091"), y, width, height, 15);

            PlotBooleanValue(pdfGen, CustomerProspectOptionBL.GetOptionValue(189, data), y += interligne, 0, "1");
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_092"), y, width, height, 15);

            //Section : La durée et le calendrier de la mission
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_093"), y += interligne * 2.5f, width, height);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfLM_094")
            , CustomerProspectOptionBL.GetAttributeValue(135, 122, data)), y += interligne * 1.5f, width, height * 2);

            pdfGen.AddJustifyText(string.Format(LanguageContentBL.Translate("PdfLM_095")
            , CustomerProspectOptionBL.GetAttributeValue(135, 123, data)), y += interligne * 1.5f, width, height * 2);

            //Section : Modalité de notre intervention
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_096"), y += interligne * 2.5f, width, height);

            pdfGen.AddDefaultText(string.Format(LanguageContentBL.Translate("PdfLM_097")
            , CustomerProspectOptionBL.GetAttributeValue(136, 124, data)), y += interligne * 1.5f, width, height * 2);

            //Section : Typologie de client
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_098"), y += interligne * 3, width, height);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_099"), y += interligne * 1.5f, width, height * 4);

            //Section : Déroulement de la mission
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_100"), y += interligne * 3f, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_101"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_102"), y += interligne * 2f, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_103"), y += interligne * 1.5f, width, height * 2);

            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_104"), y += interligne * 2f, width, height * 3);//Parallelement,...
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_105"), y += interligne * 2.5f, width, height * 3); //La totalité...
            #endregion

            #region page 10

            pdfGen.CreatePage();
            y = 0;
            //Suite Section : Déroulement de la mission
            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_106"), y, width, height * 2);
            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("PdfLM_107"), y += interligne * 2f, width, 2 * height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_108"), y += interligne * 2f, width, height * 2);

            //Section : Suivi patrimonial envisagé
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_109"), y += interligne * 2f, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_110"), y += interligne * 1.5f, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_111"), y += interligne * 1.5f, width, height * 3);

            //Section : Modalités d'information
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_112"), y += interligne * 2, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_113"), y += interligne * 1.5f, width, height);

            //Section : Dénonciation de la mission
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_114"), y += interligne * 2f, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_115"), y += interligne * 1.5f, width, height * 3);
            if (SessionManager.GetHostCodeSession() != PageLanguageHelper.HostCode.BE.ToString())
            {
                pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_116"), y += interligne * 3f, width, height * 4);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_117"), y += interligne * 4f, width, height * 3);
            }

            //Section : Responsabilité
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_118"), y += interligne * 2f, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_119"), y += interligne * 1.5f, width, height * 4);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_120"), y += interligne * 2f, width, height * 2);

            //Section : Confidentialité
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_121"), y += interligne * 2f, width, height);
            pdfGen.AddDefaultText(LanguageContentBL.Translate("PdfLM_122"), y += interligne * 1.5f, width, height * 2);

            #endregion

            #region page 11

            pdfGen.CreatePage();
            y = 0;
            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_123"), y, width, height);//Litiges
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_124"), y += interligne * 1.5f, width, height * 2);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_125"), y += interligne * 2f, width, height * 2);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_126"), y += interligne * 2f, width, height * 3);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_127"), y += interligne * 3f, width, height * 2);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_128"), y += interligne * 2f, width, height * 2);

            pdfGen.AddSubtitle(LanguageContentBL.Translate("PdfLM_129"), y += interligne * 3, width, height);//Traitement des informations
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_130"), y += interligne * 1.5f, width, height * 5);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_131"), y += interligne * 3f, width, height * 3);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_132"), y += interligne * 3f, width, height * 4);
            pdfGen.AddJustifyText(LanguageContentBL.Translate("PdfLM_133"), y += interligne * 3f, width, height * 4);
            #endregion

            #region page 12

            pdfGen.CreatePage();
            y = 0;
            //Signature
            pdfGen.AddSubtitle(LanguageContentBL.Translate("Pdf_Signature"), 0);

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("Pdf_Signature_Etabs"), 100, 500, 20, 80);


            pdfGen.AddBlueBorder(130, 35, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 40);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 40);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 40);
            }

            pdfGen.AddDefaultBoldText(LanguageContentBL.Translate("Pdf_Signature_Client"), 100, 500, 20, 340);
            pdfGen.AddBlueBorder(130, 280, 200, 170);

            //Ne pas afficher si signature electronique
            if (forceDownload)
            {
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), 135, 200, 20, 285);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), 145, 145, 20, 285);
                pdfGen.AddDefaultText(LanguageContentBL.Translate("Pdf_Date"), 160, 145, 20, 285);
            }

            #endregion

            //Force download if pathFileName is not set
            if (forceDownload)
            {
                string fileName = string.Format("LettreMission_PM_{0}.pdf", pMissionDoc.idMissionDocument);
                pdfGen.GeneratePdfToWeb(fileName);
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }
            return pdfGen.PageCount;
        }
コード例 #24
0
        public static void GeneratePP_LAB(IDictionary<LABStudy.SectionEnum, LABStudyModel> dicoLABStudyModel, string pathFileName, bool emptyLAB = false)
        {

            //#Page 1 : Title
            int y = 160;
            int height = 20;
            int width = 500;

            FoxitPDFGenerator pdfGen = new FoxitPDFGenerator();
            CustomEnum = Upsilab.Business.Custom.CustomEnumBL.GetAllCustomEnums();
            EnumLanguages = GetLanguageEnum(1);

            LABStudyModel labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Client];
            FirmInstitution firmInstitution = labStudyModel.Customer.FirmInstitution;

            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
                firmInstitution = new FirmInstitution();
                labStudyModel.LABStudy = new LABStudy();
                labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect();
            }

            var languageData = PageLanguageHelper.GetLanguageContent("User", "LAB_PDF_PP_Report");


            #region Page 1 : Logo & Title
            //Logo
            string logoPathFileName = Upsilab.Business.Utility.FileManager.BuildLogoPath(firmInstitution.idFirmInstitution) + firmInstitution.Logo;
            pdfGen.AddLogoOnFirstPage(logoPathFileName);

            //Title
            pdfGen.AddReceuil_Title_Center_CalibriBold_Label(languageData.GetContent("Report_Title"), y, width, 100);
            pdfGen.AddReceuil_SubTitle_Center_CalibriBold_Label(languageData.GetContent("Report_Title2"), y += 100, width, height);

            if (emptyLAB)
            {
                string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), ""),
                                       string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), "") };
                pdfGen.AddTableTitle(rowContents, 110, y += 80);
            }
            else
            {
                string[] rowContents = { string.Format("{0} {1}", languageData.GetContent("Report_Title_Date"), labStudyModel.LABStudy.DateUpdated.HasValue ? labStudyModel.LABStudy.DateUpdated.Value.ToShortDateString() : labStudyModel.LABStudy.DateCreated.ToShortDateString()),
                                       string.Format("{0}{1}", languageData.GetContent("Report_Title_Reference"), labStudyModel.LABStudy.idLABStudy) };
                pdfGen.AddTableTitle(rowContents, 110, y += 80);
            }
            #endregion

            #region Page 2 : Client : I. Identité du client
            //#Page 2 : Client : I. identité du client
            pdfGen.CreatePage();

            y = 0;
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page2_Title"), y, width, 20);

            height = 15;
            y += 35;
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y + height, 0, Boolean.FalseString);
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section1_Line1"), 15, y += height, width, 15);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.IsCorporation, y + height, 0, Boolean.TrueString);
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section1_Line2"), 15, y += height, width, 15);

            y += height;
            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page2_Section2_Title"), 0, y += height, width, 20);

            // civilité
            y += 2 * height;
            float tabCheck = 15;
            float x = 0;
            pdfGen.AddLabelArial(languageData.GetContent("LABPP_1227"), 0, y, width, height);

            x = 40;
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Title, y, x, languageData.GetContent("LABPP_1228"));
            pdfGen.AddLabelArial(languageData.GetContent("LABPP_1228"), x = x + tabCheck, y, width, 15);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Title, y, x = x + tabCheck + 40, languageData.GetContent("LABPP_1229"));
            pdfGen.AddLabelArial(languageData.GetContent("LABPP_1229"), x = x + tabCheck, y, width, 15);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.Customer.Title, y, x = x + tabCheck + 40, languageData.GetContent("LABPP_1230"));
            pdfGen.AddLabelArial(languageData.GetContent("LABPP_1230"), x = x + tabCheck, y, width, 15);


            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line1"), labStudyModel.GetOptionAttributeValue(701, 501)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line2"), labStudyModel.GetOptionAttributeValue(701, 502)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line3"), labStudyModel.GetOptionAttributeValue(701, 503)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line4"), labStudyModel.GetOptionAttributeValue(701, 504)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line5"), labStudyModel.GetOptionAttributeValue(701, 505)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line6"), labStudyModel.GetOptionAttributeValue(701, 506)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line7"), labStudyModel.GetOptionAttributeValue(701, 507)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line8"), labStudyModel.GetOptionAttributeValue(701, 508)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line9"), labStudyModel.GetOptionAttributeValue(701, 509)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line10"), labStudyModel.GetOptionAttributeValue(701, 510)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line11"), labStudyModel.GetOptionAttributeValue(701, 511)), 0, y += height, width, 3 * height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line12"), labStudyModel.GetOptionAttributeValue(701, 512)), 0, y += 3 * height, width, 3 * height);

            y += 2 * height;
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line13"), 0, y += height, width, height);

            //Etes-vous
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(703), y + height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line14_Item1"), 15, y + height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(704), y + height, 200, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line14_Item2"), 215, y += height, width, height);

            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(705), y + height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line15_Item1"), 15, y + height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(706), y + height, 200, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line15_Item2"), 215, y += height, width, height);

            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(1127), y + height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line16_Item1"), 15, y + height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(1150), y + height, 200, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line16_Item2"), 215, y += height, width, height);

            //Représentant légal
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_LegalRepresentative"), labStudyModel.GetOptionAttributeValue(702, 740)), 0, y += height, width, height);

            y += height;
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line17"), labStudyModel.GetOptionAttributeValue(702, 513)), 0, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line18"), labStudyModel.GetOptionAttributeValue(702, 514)), 0, y += height, width, height);

            y += height;
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(708), y + height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line19_Item1"), 15, y + height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(709), y + height, 100, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line19_Item2"), 115, y += height, width, height);
            pdfGen.AddLabelArial(string.Format("{0} : {1}", languageData.GetContent("Page2_Section2_Line20"), GetEnumValue(labStudyModel.GetOptionAttributeValue(710, 515), 12)), 0, y += height, width, height);

            y += height;
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line21"), 0, y += height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(712), y + height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes"), 15, y + height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(713), y + height, 50, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No"), 65, y += height, width, height);

            y += height;
            pdfGen.AddLabelArial(languageData.GetContent("Page2_Section2_Line22"), 0, y += height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(715), y + height, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_Yes"), 15, y + height, width, height);
            pdfGen.LAB_PlotBooleanValue(labStudyModel.GetOptionValue(716), y + height, 50, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Report_Symbol_No"), 65, y += height, width, height);
            #endregion

            #region Page 3 : Client : II. Personne physique
            //#Page 3 : Client : II. Personne physique
            pdfGen.CreatePage();

            y = 0;
            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page3_Section1_Title"), 0, y += 2 * height, width, height);

            //CLIENT MENU

            LABAnswer labAnswer = labStudyModel.GetAnswerByIdQuestion(11);
            string[] tableRiskVigilanceYesNo_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No") };
            string[] tableRiskVigilanceYesNoIDK_Text = { languageData.GetContent("TableRiskVigilanceYesNo_Item1"), languageData.GetContent("TableRiskVigilanceYesNo_Item2"), languageData.GetContent("Report_Symbol_Yes"), languageData.GetContent("Report_Symbol_No"), languageData.GetContent("TableRiskVigilanceYesNo_Item3") };
            string[] answer = { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line1"), 0, y += 2 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //This question is for only client (not prospect)
            if (labStudyModel.Customer.IsCustomer)
            {
                labAnswer = labStudyModel.GetAnswerByIdQuestion(12);
                answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
                pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line2"), 0, y += 3 * height, width, 2 * height);
                pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);
            }

            labAnswer = labStudyModel.GetAnswerByIdQuestion(13);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line3"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(14);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line4"), 0, y += 3 * height, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(15);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line5"), 0, y += 3 * height, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(67);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line5_1"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(68);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line5_2"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(16);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddLabelArial(languageData.GetContent("Page3_Section1_Line6"), 0, y += 3 * height, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 4 : Client : III. Facteurs de risque aggravé
            //#Page 4 : Client : III. Facteurs de risque aggravé
            pdfGen.CreatePage();

            y = 0;
            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page4_Section1_Title"), 0, y += 2 * height, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(17);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line1"), 0, y += 2 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(18);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line2"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(19);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line3"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(20);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line4"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(21);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line5"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(24);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line6"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(22);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line7"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(23);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page4_Section1_Line8"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(51);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line6"), 0, y += 3 * height, width, height); //Question from operation
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 5 : Client : IV. Risques fiscaux
            //#Page 5 : Client : IV. Risques fiscaux
            pdfGen.CreatePage();

            y = 0;
            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page5_Section1_Title"), 0, y += 2 * height, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(25);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line1"), 0, y += 2 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text);

            //The following three questions are for PM
            /*labAnswer = labStudyModel.GetAnswerByIdQuestion(26);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial("La société cliente a-t-elle connu des changements statutaires fréquents non justifiés par la situation économique de l’entreprise ?", 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(27);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial("La société cliente en sommeil ou peu active a-t-elle connu des changements statutaires récents ?", 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(28);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial("La société cliente a-t-elle recours à l’interposition de personnes physiques n’intervenant qu’en apparence pour le compte de clients de la PSI ou du CIF ?", 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30);*/

            labAnswer = labStudyModel.GetAnswerByIdQuestion(29);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line2"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(30);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line3"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(31);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line4"), 0, y += 3 * height, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(32);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page5_Section1_Line5"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 6 : Produit : V. L'environnement et les caractéristiques du produit
            //#Page 6 : Produit : V. L'environnement et les caractéristiques du produit
            pdfGen.CreatePage();

            labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Product];

            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
            }

            y = 0;
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page6_Section1_Title"), y, width, 20);

            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page6_Section1_Title2"), 0, y += 2 * height, width, height);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(34);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line1"), 0, y += 2 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(35);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line2"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(36);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line3"), 0, y += 3 * height, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(37);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line4"), 0, y += 3 * height, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(38);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line5"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(39);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line6"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(40);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line7"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(41);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line8"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(42);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page6_Section1_Line9"), 0, y += 3 * height, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 7 : Produit : V. L'environnement et les caractéristiques du produit
            //#Page 7 : Produit : V. L'environnement et les caractéristiques du produit
            pdfGen.CreatePage();

            y = 0;
            labAnswer = labStudyModel.GetAnswerByIdQuestion(43);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line1"), 0, y, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(44);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line2"), 0, y += 3 * height, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(45);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line3"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(46);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page7_Section1_Line4"), 0, y += 3 * height, width, 3 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);
            #endregion

            #region Page 8 : Operation : VI. Risques généraux / fiscaux
            //#Page 8 : Operation : VI. Risques généraux
            pdfGen.CreatePage();

            labStudyModel = dicoLABStudyModel[LABStudy.SectionEnum.Operation];
            if (emptyLAB)
            {
                labStudyModel = new LABStudyModel();
                firmInstitution = new FirmInstitution();
                labStudyModel.LABStudy = new LABStudy();
                labStudyModel.Customer = new Upsilab.Data.Model.CustomerProspect();
            }

            y = 0;
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page8_Section1_Title"), y, width, 20);

            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page8_Section1_Title2"), 0, y += 2 * height, width, height);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(48);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line1"), 0, y += 2 * height, width, 2 * height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(49);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line2"), 0, y += 3 * height, width, height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            labAnswer = labStudyModel.GetAnswerByIdQuestion(50);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line3"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(52);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line4"), 0, y += 3 * height, width, 2 * height);
            //pdfGen.AddLabelArial(languageData.GetContent("Page8_Section1_Line5"), 0, y += 2 * height, width, 10 * height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 8 * height, tableRiskVigilanceYesNo_Text);

            //VII. Risques liés à la distribution des fonds gérés par les sociétés de gestion
            //pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page8_Section2_Title"), 0, y += 4 * height, width, height);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(53);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddLabelArial(languageData.GetContent("Page8_Section2_Line1"), 0, y += 2 * height, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(54);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddLabelArial(languageData.GetContent("Page8_Section2_Line2"), 0, y += 3 * height, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 20, tableRiskVigilanceYesNo_Text);

            //VIII. Risques fiscaux
            pdfGen.LAB_AddChapterTitle_Calibri(languageData.GetContent("Page9_Section1_Title"), 0, y += 4 * height, width, height);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(55);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line1"), 0, y += 2 * height, width, height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNoIdk(answer, 0, y += 20, tableRiskVigilanceYesNoIDK_Text);

            //labAnswer = labStudyModel.GetAnswerByIdQuestion(56);
            //answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            //pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line2"), 0, y += 3 * height, width, 2 * height);
            //pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNo_Text);

            //This question is only for client (not prospect)
            if (labStudyModel.Customer.IsCustomer)
            {
                labAnswer = labStudyModel.GetAnswerByIdQuestion(57);
                answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
                pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line3"), 0, y += 3 * height, width, 3 * height);
                pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 40, tableRiskVigilanceYesNo_Text);
            }

            labAnswer = labStudyModel.GetAnswerByIdQuestion(58);
            answer = new string[] { labAnswer.idResponse.ToString(), labAnswer.RiskLabel, labAnswer.VigilanceLabel };
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section1_Line4"), 0, y += 3 * height, width, 2 * height);
            pdfGen.LAB_AddTableRiskVigilance_YesNo(answer, 0, y += 30, tableRiskVigilanceYesNoIDK_Text);
            #endregion

            #region Page 9 : NIVEAU DE RISQUE GLOBAL DU CLIENT
            //#Page 9 : NIVEAU DE RISQUE GLOBAL DU CLIENT
            pdfGen.CreatePage();

            y = 0;            
            //NIVEAU DE RISQUE GLOBAL DU CLIENT           
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page9_Section2_Title"), y, width, 20);


            string dateUpdated = (labStudyModel.LABStudy.DateUpdated.HasValue) ? labStudyModel.LABStudy.DateUpdated.Value.ToString("dd/MM/yyyy") : labStudyModel.LABStudy.DateCreated.ToString("dd/MM/yyyy");
            string idGlobalRisk = labStudyModel.LABStudy.idRisk.ToString();
            string idGlobalVigilance = labStudyModel.LABStudy.idVigilance.ToString();

            pdfGen.AddLabelArial(string.Format("{0} {1}", languageData.GetContent("Page9_Section2_Line1"), dateUpdated), 0, y += 2 * height, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line2"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "2");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line3"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "3");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line4"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "4");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line5"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalRisk, y, 0, "5");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section2_Line6"), 20, y, width, height);

            //NIVEAU DE VIGILANCE GLOBAL DU CLIENT
            y += 60;
            pdfGen.AddReceuil_ChapterTitle_Center_CalibriBoldItalic_Label(languageData.GetContent("Page9_Section3_Title"), y, width, 20);

            pdfGen.AddLabelArial(string.Format("{0} {1}", languageData.GetContent("Page9_Section3_Line1"), dateUpdated), 0, y += 2 * height, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "1");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line2"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "2");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line3"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "3");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line4"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "4");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line5"), 20, y, width, height);

            y += 20;
            pdfGen.LAB_PlotBooleanValue(idGlobalVigilance, y, 0, "5");
            pdfGen.AddLabelArial(languageData.GetContent("Page9_Section3_Line6"), 20, y, width, height);
            #endregion

            //Force download if pathFileName is not set
            if (string.IsNullOrEmpty(pathFileName))
            {
                pdfGen.GeneratePdfToWeb("LAB_PP.pdf");
            }
            else
            {
                pdfGen.GeneratePdf(pathFileName);
            }

        }