コード例 #1
0
        //---------------------------------------------------------------------
        private void FillArray(ref string[] pCols, ref string[] pValues, Chaine pChaine, bool pIsInsertID)
        {
            int liCpt    = 0;
            int liNombre = 5;

            if (pIsInsertID)
            {
                pCols            = new string[liNombre + 1];
                pValues          = new string[liNombre + 1];
                pCols[liCpt]     = "iD";
                pValues[liCpt++] = "'" + pChaine.ID.ToString() + "'";
            }
            else
            {
                pCols   = new string[liNombre];
                pValues = new string[liNombre];
            }


            pCols[liCpt]     = "numero";
            pValues[liCpt++] = "'" + pChaine.Numero.ToString() + "'";

            pCols[liCpt]     = "sigle";
            pValues[liCpt++] = "'" + Util.DoubleQuote(pChaine.Sigle) + "'";

            pCols[liCpt]     = "nom";
            pValues[liCpt++] = "'" + Util.DoubleQuote(pChaine.Nom) + "'";

            pCols[liCpt]     = "nature";
            pValues[liCpt++] = "'" + Util.DoubleQuote(pChaine.Nature) + "'";

            pCols[liCpt]     = "prix";
            pValues[liCpt++] = "'" + pChaine.Prix.ToString() + "'";
        }
コード例 #2
0
        //--------------------------------------------------------------------

        public int Insert(Chaine pChaine)
        {
            string[] lsCols   = null;
            string[] lsValues = null;
            this.FillArray(ref lsCols, ref lsValues, pChaine, true);
            return(DataBase.Insert("[Chaine]", lsCols, lsValues));
        }
コード例 #3
0
        //---------------------------------------------------------------------
        public int Update(Chaine pChaine)
        {
            string[] lsCols   = null;
            string[] lsValues = null;

            this.FillArray(ref lsCols, ref lsValues, pChaine, false);
            return(DataBase.UpdateID("Chaine", lsCols, lsValues, pChaine.ID));
        }
コード例 #4
0
        //--------------------------------------------------------------------
        public Chaine Find(Guid ID)
        {
            Chaine lChaine = (Chaine)AbstractFind(ID);

            if (Util.isNULL(lChaine))
            {
                DataRow row = DataBase.SelectID(ID, "[Chaine]");
                if (Util.isNULL(row))
                {
                    return(null);
                }
                lChaine = this.FillFields(row);
                LoadedMap.Add(lChaine.ID, lChaine);
            }
            return(lChaine);
        }
コード例 #5
0
        //--------------------------------------------------------------------
        private Chaine FillFields(DataRow pDataRow)
        {
            Chaine lChaine = new Chaine();


            lChaine.Numero = (int)pDataRow["numero"];

            lChaine.Sigle = (string)pDataRow["sigle"];

            lChaine.Nom = (string)pDataRow["nom"];

            lChaine.Nature = (string)pDataRow["nature"];

            lChaine.Prix = (float)pDataRow["prix"];



            lChaine.ID = new Guid(pDataRow["iD"].ToString());
            return(lChaine);
        }
コード例 #6
0
        public FlowDocument Impression()
        {
            FlowDocument Doc = new FlowDocument();

            Societe pS = Client.Societe;

            Doc.FontFamily = new FontFamily("Calibri");

            Table         Tprincipale;
            Table         T;
            TableColumn   C;
            TableRowGroup RgPrincipal;
            TableRowGroup Rg;
            TableRow      R1;
            TableRow      R2;
            TableRow      R3;
            TableRow      R4;
            TableRow      R5;
            TableRow      R6;
            TableRow      R;
            TableRow      Rtmp;
            TableCell     Section;

            Paragraph Pr;

            TableCell     Cl = null;
            Double        FS = 13;
            FontWeight    FW = FontWeights.Normal;
            Thickness     TK = new Thickness(0, 0, 0, 10);
            TextAlignment TA = TextAlignment.Left;

            // Mise en page d'un paragraphe
            Action <Object> PrgThick = delegate(Object Chaine)
            {
                Pr               = new Paragraph(new Run(Chaine.ToString()));
                Pr.FontSize      = FS;
                Pr.FontWeight    = FW;
                Pr.Margin        = TK;
                Pr.TextAlignment = TA;
                Cl.Blocks.Add(Pr);
            };

            Action <Object> Prg = delegate(Object Chaine)
            {
                Pr               = new Paragraph(new Run(Chaine.ToString()));
                Pr.FontSize      = FS;
                Pr.FontWeight    = FW;
                Pr.TextAlignment = TA;
                Cl.Blocks.Add(Pr);
            };


            Tprincipale         = new Table();
            Tprincipale.Padding = new Thickness(0);

            Tprincipale.Columns.Add(new TableColumn());

            RgPrincipal = new TableRowGroup();
            Tprincipale.RowGroups.Add(RgPrincipal);

            Doc.Blocks.Add(Tprincipale);

            //-------------------------------------------

            R1 = new TableRow();
            RgPrincipal.Rows.Add(R1);

            Section                 = new TableCell();
            Section.Padding         = new Thickness(10);
            Section.BorderBrush     = Brushes.Black;
            Section.BorderThickness = new Thickness(1);

            R1.Cells.Add(Section);

            T         = new Table();
            T.Padding = new Thickness(0);
            T.Margin  = new Thickness(0);

            C       = new TableColumn();
            C.Width = new GridLength(20, GridUnitType.Star);
            T.Columns.Add(C);

            C       = new TableColumn();
            C.Width = new GridLength(10, GridUnitType.Star);
            T.Columns.Add(C);

            Rg = new TableRowGroup();
            T.RowGroups.Add(Rg);

            R = new TableRow();
            Rg.Rows.Add(R);

            Cl         = new TableCell();
            Cl.Padding = new Thickness(0, 0, 10, 0);

            FS = 24; FW = FontWeights.Bold;
            Prg(pS.Statut);

            FS = 16; TK = new Thickness(0, 0, 0, 10);
            PrgThick(pS.Denomination);

            FS = 13;
            Prg(pS.Adresse);

            PrgThick(pS.Cp + " " + pS.Ville);

            Prg(pS.Tel_Mobile);

            Prg(pS.Email);

            R.Cells.Add(Cl);

            Cl                 = new TableCell();
            Cl.Padding         = new Thickness(10, 0, 0, 0);
            Cl.BorderBrush     = Brushes.Black;
            Cl.BorderThickness = new Thickness(1, 0, 0, 0);

            FS = 11; TK = new Thickness(0, 0, 0, 10);
            PrgThick(this.Date.ToString("dd/MM/yyyy"));

            FS = 16; TK = new Thickness(0, 0, 0, 20);
            PrgThick("Devis n°  " + this.Ref);

            FS = 13; TK = new Thickness(0, 0, 0, 10);
            PrgThick(this.Adresse_Client.Intitule);

            Prg(this.Adresse_Client.Adresse);
            Prg(this.Adresse_Client.Cp + " " + this.Adresse_Client.Ville);

            R.Cells.Add(Cl);

            Section.Blocks.Add(T);

            //-------------------------------------------
            Rtmp = new TableRow();
            RgPrincipal.Rows.Add(Rtmp);

            Section         = new TableCell();
            Section.Padding = new Thickness(0);

            Rtmp.Cells.Add(Section);
            //------------------------------------------

            R2 = new TableRow();
            RgPrincipal.Rows.Add(R2);

            Section                 = new TableCell();
            Section.Padding         = new Thickness(10);
            Section.BorderBrush     = Brushes.Black;
            Section.BorderThickness = new Thickness(1);

            R2.Cells.Add(Section);

            Pr            = new Paragraph(new Run("Objet :"));
            Pr.FontSize   = 13;
            Pr.FontWeight = FontWeights.Bold;
            Pr.Margin     = new Thickness(0, 0, 0, 2);
            Section.Blocks.Add(Pr);

            Pr            = new Paragraph(new Run(this.Description));
            Pr.FontSize   = 13;
            Pr.FontWeight = FontWeights.Bold;
            Pr.Padding    = new Thickness(10, 0, 0, 0);
            Section.Blocks.Add(Pr);

            if (!String.IsNullOrWhiteSpace(this.Info))
            {
                R3 = new TableRow();
                RgPrincipal.Rows.Add(R3);

                Section                 = new TableCell();
                Section.Padding         = new Thickness(10);
                Section.BorderBrush     = Brushes.Black;
                Section.BorderThickness = new Thickness(1);

                R3.Cells.Add(Section);

                Pr            = new Paragraph(new Run(this.Info));
                Pr.FontSize   = 13;
                Pr.FontWeight = FontWeights.Bold;
                Pr.Padding    = new Thickness(10, 0, 0, 0);
                Section.Blocks.Add(Pr);
            }

            R4 = new TableRow();
            RgPrincipal.Rows.Add(R4);

            Section                 = new TableCell();
            Section.Padding         = new Thickness(10);
            Section.BorderBrush     = Brushes.Black;
            Section.BorderThickness = new Thickness(1);

            R4.Cells.Add(Section);

            foreach (Poste P in this.ListePoste)
            {
                if (!P.Statut)
                {
                    continue;
                }

                Pr                 = new Paragraph(new Run(P.Titre));
                Pr.FontSize        = 16;
                Pr.FontWeight      = FontWeights.Bold;
                Pr.TextDecorations = TextDecorations.Underline;
                Pr.Margin          = new Thickness(0, 0, 0, 5);
                Section.Blocks.Add(Pr);

                T         = new Table();
                T.Padding = new Thickness(0);
                T.Margin  = new Thickness(0, 0, 0, 30);

                C       = new TableColumn();
                C.Width = new GridLength(40, GridUnitType.Star);
                T.Columns.Add(C);

                C       = new TableColumn();
                C.Width = new GridLength(15, GridUnitType.Star);
                T.Columns.Add(C);

                Rg = new TableRowGroup();
                T.RowGroups.Add(Rg);



                R = new TableRow();
                Rg.Rows.Add(R);

                Cl         = new TableCell();
                Cl.Padding = new Thickness(10, 0, 10, 0);

                FS = 13; FW = FontWeights.Normal; TK = new Thickness(0, 0, 0, 5);
                Prg(P.Description);

                R.Cells.Add(Cl);

                Cl                 = new TableCell();
                Cl.Padding         = new Thickness(10, 0, 0, 0);
                Cl.BorderBrush     = Brushes.Black;
                Cl.BorderThickness = new Thickness(1, 0, 0, 0);
                Cl.TextAlignment   = TextAlignment.Right;

                FS = 13; FW = FontWeights.Normal; TK = new Thickness(0, 0, 0, 5); TA = TextAlignment.Right;

                if (P.Qte != 1)
                {
                    String pUnite = P.Unite;
                    if (!String.IsNullOrWhiteSpace(pUnite))
                    {
                        pUnite = "\\" + pUnite;
                    }

                    Prg(DicIntitules.Intitule("Poste", "Qte") + " : " + P.Qte + " " + P.Unite);
                    Prg(DicIntitules.Intitule("Poste", "Prix_Unitaire") + " : " + P.Prix_Unitaire + " " + DicIntitules.Unite("Poste", "Prix_Unitaire") + pUnite);
                }

                FS = 15; FW = FontWeights.Bold;
                if (P.Qte != 1)
                {
                    Prg("Total : " + P.Prix_Ht + " " + DicIntitules.Unite("Poste", "Prix_Ht"));
                }
                else
                {
                    Prg(P.Prix_Ht + " " + DicIntitules.Unite("Poste", "Prix_Ht"));
                }

                TA = TextAlignment.Left;

                Cl.Blocks.Add(Pr);

                R.Cells.Add(Cl);

                Section.Blocks.Add(T);
            }

            R5 = new TableRow();
            RgPrincipal.Rows.Add(R5);

            Section                 = new TableCell();
            Section.Padding         = new Thickness(10);
            Section.BorderBrush     = Brushes.Black;
            Section.BorderThickness = new Thickness(1);

            R5.Cells.Add(Section);

            T         = new Table();
            T.Padding = new Thickness(0);
            T.Margin  = new Thickness(0);

            C       = new TableColumn();
            C.Width = new GridLength(20, GridUnitType.Star);
            T.Columns.Add(C);

            C       = new TableColumn();
            C.Width = new GridLength(10, GridUnitType.Star);
            T.Columns.Add(C);

            C       = new TableColumn();
            C.Width = new GridLength(5, GridUnitType.Star);
            T.Columns.Add(C);

            Rg = new TableRowGroup();
            T.RowGroups.Add(Rg);

            R = new TableRow();
            Rg.Rows.Add(R);

            Cl         = new TableCell();
            Cl.Padding = new Thickness(0, 0, 10, 0);



            if (!String.IsNullOrWhiteSpace(this.Conditions))
            {
                FS = 16; FW = FontWeights.Bold; TK = new Thickness(0, 0, 0, 5); TA = TextAlignment.Left;
                PrgThick("Modalités de règlement : ");

                FS = 13; FW = FontWeights.Bold; TK = new Thickness(0, 0, 0, 5);
                Prg(this.Conditions);

                if (this.Acompte != 0)
                {
                    Pr            = new Paragraph(new Run("Acompte de : " + this.Acompte + DicIntitules.Unite("Devis", "Acompte")));
                    Pr.FontSize   = 13;
                    Pr.FontWeight = FontWeights.Bold;
                    Cl.Blocks.Add(Pr);
                }
            }

            R.Cells.Add(Cl);

            Cl                 = new TableCell();
            Cl.Padding         = new Thickness(10, 0, 0, 0);
            Cl.BorderBrush     = Brushes.Black;
            Cl.BorderThickness = new Thickness(1, 0, 0, 0);

            FS = 15; FW = FontWeights.Bold; TK = new Thickness(0, 0, 0, 10); TA = TextAlignment.Left;
            PrgThick(DicIntitules.Intitule("Devis", "Prix_Ht"));

            PrgThick(DicIntitules.Intitule("Devis", "Tva_Pct") + " " + this.Tva_Pct + DicIntitules.Unite("Devis", "Tva_Pct"));

            PrgThick(DicIntitules.Intitule("Devis", "Prix_Ttc"));

            R.Cells.Add(Cl);

            Cl                 = new TableCell();
            Cl.Padding         = new Thickness(10, 0, 0, 0);
            Cl.BorderBrush     = Brushes.Black;
            Cl.BorderThickness = new Thickness(0);

            TA = TextAlignment.Right;
            PrgThick(this.Prix_Ht + DicIntitules.Unite("Devis", "Prix_Ht"));

            PrgThick(this.Tva + DicIntitules.Unite("Devis", "Tva"));

            PrgThick(this.Prix_Ttc + DicIntitules.Unite("Devis", "Prix_Ttc"));

            R.Cells.Add(Cl);

            Section.Blocks.Add(T);

            //------------------------------------------

            R6 = new TableRow();
            RgPrincipal.Rows.Add(R6);

            Section                 = new TableCell();
            Section.Padding         = new Thickness(10);
            Section.BorderBrush     = Brushes.Black;
            Section.BorderThickness = new Thickness(1);

            R6.Cells.Add(Section);

            Pr            = new Paragraph(new Run("BON POUR ACCORD, DATE ET SIGNATURE :"));
            Pr.FontSize   = 16;
            Pr.FontWeight = FontWeights.Bold;
            Pr.Margin     = new Thickness(0, 0, 0, 50);
            Section.Blocks.Add(Pr);

            Pr               = new Paragraph(new Run(pS.Pied));
            Pr.FontSize      = 13;
            Pr.TextAlignment = TextAlignment.Center;
            Section.Blocks.Add(Pr);

            //-------------------------------------------

            return(Doc);
        }
コード例 #7
0
        public FlowDocument Impression()
        {
            FlowDocument Doc = new FlowDocument();

            Societe pS = Devis.Client.Societe;

            Doc.FontFamily = new FontFamily("Calibri");

            Table         Tprincipale;
            Table         T;
            TableColumn   C;
            TableRowGroup RgPrincipal;
            TableRowGroup Rg;
            TableRow      R1;
            TableRow      R2;
            TableRow      R3;
            TableRow      R4;
            TableRow      R5;
            TableRow      R6;
            TableRow      R;
            TableRow      Rtmp;
            TableCell     Section;

            Paragraph Pr;

            TableCell     Cl = null;
            Double        FS = 13;
            FontWeight    FW = FontWeights.Normal;
            Thickness     TK = new Thickness(0, 0, 0, 10);
            TextAlignment TA = TextAlignment.Left;

            // Mise en page d'un paragraphe
            Action <Object> PrgThick = delegate(Object Chaine)
            {
                Pr               = new Paragraph(new Run(Chaine.ToString()));
                Pr.FontSize      = FS;
                Pr.FontWeight    = FW;
                Pr.Margin        = TK;
                Pr.TextAlignment = TA;
                Cl.Blocks.Add(Pr);
            };

            Action <Object> Prg = delegate(Object Chaine)
            {
                Pr               = new Paragraph(new Run(Chaine.ToString()));
                Pr.FontSize      = FS;
                Pr.FontWeight    = FW;
                Pr.TextAlignment = TA;
                Cl.Blocks.Add(Pr);
            };


            Tprincipale         = new Table();
            Tprincipale.Padding = new Thickness(0);

            Tprincipale.Columns.Add(new TableColumn());

            RgPrincipal = new TableRowGroup();
            Tprincipale.RowGroups.Add(RgPrincipal);

            Doc.Blocks.Add(Tprincipale);

            //-------------------------------------------

            R1 = new TableRow();
            RgPrincipal.Rows.Add(R1);

            Section                 = new TableCell();
            Section.Padding         = new Thickness(10);
            Section.BorderBrush     = Brushes.Black;
            Section.BorderThickness = new Thickness(1);

            R1.Cells.Add(Section);

            T         = new Table();
            T.Padding = new Thickness(0);
            T.Margin  = new Thickness(0);

            C       = new TableColumn();
            C.Width = new GridLength(20, GridUnitType.Star);
            T.Columns.Add(C);

            C       = new TableColumn();
            C.Width = new GridLength(10, GridUnitType.Star);
            T.Columns.Add(C);

            Rg = new TableRowGroup();
            T.RowGroups.Add(Rg);

            R = new TableRow();
            Rg.Rows.Add(R);

            Cl         = new TableCell();
            Cl.Padding = new Thickness(0, 0, 10, 0);

            FS = 24; FW = FontWeights.Bold;
            Prg(pS.Statut);

            FS = 16; TK = new Thickness(0, 0, 0, 10);
            PrgThick(pS.Denomination);

            FS = 13;
            Prg(pS.Adresse);

            PrgThick(pS.Cp + " " + pS.Ville);

            Prg(pS.Tel_Mobile);

            Prg(pS.Email);

            R.Cells.Add(Cl);

            Cl                 = new TableCell();
            Cl.Padding         = new Thickness(10, 0, 0, 0);
            Cl.BorderBrush     = Brushes.Black;
            Cl.BorderThickness = new Thickness(1, 0, 0, 0);

            FS = 11; TK = new Thickness(0, 0, 0, 10);
            PrgThick(this.Date.ToString("dd/MM/yyyy"));

            FS = 13; TK = new Thickness(0, 0, 0, 20);
            PrgThick("Devis n°  " + this.Devis.Ref);

            FS = 16; TK = new Thickness(0, 0, 0, 20);
            PrgThick("Facture n°  " + this.Ref);

            FS = 13; TK = new Thickness(0, 0, 0, 10);
            PrgThick(this.Devis.Adresse_Client.Intitule);

            Prg(this.Devis.Adresse_Client.Adresse);
            Prg(this.Devis.Adresse_Client.Cp + " " + this.Devis.Adresse_Client.Ville);

            R.Cells.Add(Cl);

            Section.Blocks.Add(T);

            //-------------------------------------------
            Rtmp = new TableRow();
            RgPrincipal.Rows.Add(Rtmp);

            Section         = new TableCell();
            Section.Padding = new Thickness(0);

            Rtmp.Cells.Add(Section);
            //------------------------------------------

            R2 = new TableRow();
            RgPrincipal.Rows.Add(R2);

            Section                 = new TableCell();
            Section.Padding         = new Thickness(10);
            Section.BorderBrush     = Brushes.Black;
            Section.BorderThickness = new Thickness(1);

            R2.Cells.Add(Section);

            Pr            = new Paragraph(new Run("Objet :"));
            Pr.FontSize   = 13;
            Pr.FontWeight = FontWeights.Bold;
            Pr.Margin     = new Thickness(0, 0, 0, 10);
            Section.Blocks.Add(Pr);

            Pr            = new Paragraph(new Run(Devis.Description));
            Pr.FontSize   = 13;
            Pr.FontWeight = FontWeights.Bold;
            Pr.Padding    = new Thickness(10, 0, 0, 0);
            Section.Blocks.Add(Pr);

            if (this.Imprimer_Commentaires && !String.IsNullOrWhiteSpace(this.Commentaires))
            {
                R2 = new TableRow();
                RgPrincipal.Rows.Add(R2);

                Section                 = new TableCell();
                Section.Padding         = new Thickness(10);
                Section.BorderBrush     = Brushes.Black;
                Section.BorderThickness = new Thickness(1);

                R2.Cells.Add(Section);

                Pr            = new Paragraph(new Run(this.Commentaires));
                Pr.FontSize   = 13;
                Pr.FontWeight = FontWeights.Bold;
                Pr.Padding    = new Thickness(10, 0, 0, 0);
                Section.Blocks.Add(Pr);
            }


            //-------------------------------------------
            //Rtmp = new TableRow();
            //RgPrincipal.Rows.Add(Rtmp);

            //Section = new TableCell();
            //Section.Padding = new Thickness(0);

            //Rtmp.Cells.Add(Section);
            //------------------------------------------

            if (!String.IsNullOrWhiteSpace(Devis.Info))
            {
                R3 = new TableRow();
                RgPrincipal.Rows.Add(R3);

                Section                 = new TableCell();
                Section.Padding         = new Thickness(10);
                Section.BorderBrush     = Brushes.Black;
                Section.BorderThickness = new Thickness(1);

                R3.Cells.Add(Section);

                Pr            = new Paragraph(new Run(Devis.Info));
                Pr.FontSize   = 13;
                Pr.FontWeight = FontWeights.Bold;
                Pr.Padding    = new Thickness(10, 0, 0, 0);
                Section.Blocks.Add(Pr);
            }

            //-------------------------------------------
            //Rtmp = new TableRow();
            //RgPrincipal.Rows.Add(Rtmp);

            //Section = new TableCell();
            //Section.Padding = new Thickness(0);

            //Rtmp.Cells.Add(Section);
            //------------------------------------------

            R4 = new TableRow();
            RgPrincipal.Rows.Add(R4);

            Section                 = new TableCell();
            Section.Padding         = new Thickness(10);
            Section.BorderBrush     = Brushes.Black;
            Section.BorderThickness = new Thickness(1);

            R4.Cells.Add(Section);

            foreach (Ligne_Facture L in this.ListeLigneFacture)
            {
                if (L.Statut)
                {
                    TA = TextAlignment.Left;

                    Poste P = L.Poste;

                    Pr                 = new Paragraph(new Run(P.Titre));
                    Pr.FontSize        = 16;
                    Pr.FontWeight      = FontWeights.Bold;
                    Pr.TextDecorations = TextDecorations.Underline;
                    Pr.Margin          = new Thickness(0, 0, 0, 10);
                    Section.Blocks.Add(Pr);

                    T         = new Table();
                    T.Padding = new Thickness(0);
                    T.Margin  = new Thickness(0, 0, 0, 30);

                    C       = new TableColumn();
                    C.Width = new GridLength(40, GridUnitType.Star);
                    T.Columns.Add(C);

                    C       = new TableColumn();
                    C.Width = new GridLength(10, GridUnitType.Star);
                    T.Columns.Add(C);

                    Rg = new TableRowGroup();
                    T.RowGroups.Add(Rg);

                    R = new TableRow();
                    Rg.Rows.Add(R);

                    Cl         = new TableCell();
                    Cl.Padding = new Thickness(0, 0, 10, 0);

                    if (L.Imprimer_Description)
                    {
                        FS = 13; FW = FontWeights.Normal; TK = new Thickness(0, 0, 0, 10);
                        Prg(P.Description);
                    }

                    if (!String.IsNullOrWhiteSpace(L.Description))
                    {
                        FS = 13; FW = FontWeights.Normal; TK = new Thickness(0, 0, 0, 10);
                        Prg(L.Description);
                    }

                    R.Cells.Add(Cl);

                    Cl                 = new TableCell();
                    Cl.Padding         = new Thickness(10, 0, 0, 0);
                    Cl.BorderBrush     = Brushes.Black;
                    Cl.BorderThickness = new Thickness(1, 0, 0, 0);
                    Cl.TextAlignment   = TextAlignment.Right;

                    TA = TextAlignment.Right;
                    FS = 15; FW = FontWeights.Bold;

                    switch (L.CalculLigne_Facture)
                    {
                    case CalculLigne_Facture_e.cQuantite:
                        if (L.Qte != 1)
                        {
                            FS = 13; FW = FontWeights.Normal;
                            Prg(DicIntitules.Intitule("Ligne_Facture", "Qte") + " : " + L.Qte + " " + L.Unite);

                            Prg(DicIntitules.Intitule("Ligne_Facture", "Ht_Unitaire") + " : " + L.Ht_Unitaire + " " + DicIntitules.Unite("Ligne_Facture", "Ht_Unitaire"));
                        }

                        FS = 15; FW = FontWeights.Bold;
                        if (L.Qte != 1)
                        {
                            Prg("Total : " + L.Ht + " " + DicIntitules.Unite("Ligne_Facture", "Ht"));
                        }
                        else
                        {
                            Prg(L.Ht + " " + DicIntitules.Unite("Ligne_Facture", "Ht"));
                        }
                        break;

                    case CalculLigne_Facture_e.cPourcentageUnitaire:
                        FS = 13; FW = FontWeights.Normal;
                        Prg(DicIntitules.Intitule("Ligne_Facture", "Ht_Unitaire") + " : " + L.Ht_Unitaire + " " + DicIntitules.Unite("Ligne_Facture", "Ht_Unitaire"));
                        Prg(DicIntitules.Intitule("Ligne_Facture", "Qte") + " : " + L.Qte + " " + L.Unite);

                        FS = 15; FW = FontWeights.Bold;
                        Prg("Total : " + L.Ht + " " + DicIntitules.Unite("Ligne_Facture", "Ht"));

                        break;

                    case CalculLigne_Facture_e.cPourcentageTotal:
                        FS = 13; FW = FontWeights.Normal;
                        Prg(DicIntitules.Intitule("Ligne_Facture", "Ht") + " : " + L.Ht_Unitaire + " " + DicIntitules.Unite("Ligne_Facture", "Ht"));
                        Prg(DicIntitules.Intitule("Ligne_Facture", "Qte") + " : " + L.Qte + " " + L.Unite);

                        FS = 15; FW = FontWeights.Bold;
                        Prg("Total : " + L.Ht + " " + DicIntitules.Unite("Ligne_Facture", "Ht"));

                        break;

                    default:
                        break;
                    }

                    TA = TextAlignment.Left;

                    R.Cells.Add(Cl);

                    Section.Blocks.Add(T);
                }
            }

            //-------------------------------------------
            //Rtmp = new TableRow();
            //RgPrincipal.Rows.Add(Rtmp);

            //Section = new TableCell();
            //Section.Padding = new Thickness(0);

            //Rtmp.Cells.Add(Section);
            //------------------------------------------

            R5 = new TableRow();
            RgPrincipal.Rows.Add(R5);

            Section                 = new TableCell();
            Section.Padding         = new Thickness(10);
            Section.BorderBrush     = Brushes.Black;
            Section.BorderThickness = new Thickness(1);

            R5.Cells.Add(Section);

            T         = new Table();
            T.Padding = new Thickness(0);
            T.Margin  = new Thickness(0);

            C       = new TableColumn();
            C.Width = new GridLength(20, GridUnitType.Star);
            T.Columns.Add(C);

            C       = new TableColumn();
            C.Width = new GridLength(10, GridUnitType.Star);
            T.Columns.Add(C);

            C       = new TableColumn();
            C.Width = new GridLength(5, GridUnitType.Star);
            T.Columns.Add(C);

            Rg = new TableRowGroup();
            T.RowGroups.Add(Rg);

            R = new TableRow();
            Rg.Rows.Add(R);

            Cl         = new TableCell();
            Cl.Padding = new Thickness(0, 0, 10, 0);

            if (!String.IsNullOrWhiteSpace(this.Conditions))
            {
                FS = 16; FW = FontWeights.Bold; TK = new Thickness(0, 0, 0, 5); TA = TextAlignment.Left;
                PrgThick("Modalités de règlement : ");

                FS = 13; FW = FontWeights.Bold; TK = new Thickness(0, 0, 0, 5);
                Prg(this.Conditions);
            }

            R.Cells.Add(Cl);

            Cl                 = new TableCell();
            Cl.Padding         = new Thickness(10, 0, 0, 0);
            Cl.BorderBrush     = Brushes.Black;
            Cl.BorderThickness = new Thickness(1, 0, 0, 0);

            FS = 15; FW = FontWeights.Bold; TK = new Thickness(0, 0, 0, 10); TA = TextAlignment.Left;
            PrgThick(DicIntitules.Intitule("Facture", "Prix_Ht"));

            PrgThick(DicIntitules.Intitule("Devis", "Tva_Pct") + " " + Devis.Tva_Pct + DicIntitules.Unite("Devis", "Tva_Pct"));

            PrgThick(DicIntitules.Intitule("Facture", "Prix_Ttc"));

            R.Cells.Add(Cl);

            Cl                 = new TableCell();
            Cl.Padding         = new Thickness(10, 0, 0, 0);
            Cl.BorderBrush     = Brushes.Black;
            Cl.BorderThickness = new Thickness(0);

            TA = TextAlignment.Right;
            PrgThick(this.Prix_Ht + DicIntitules.Unite("Facture", "Prix_Ht"));

            PrgThick(this.Tva + DicIntitules.Unite("Facture", "Tva"));

            PrgThick(this.Prix_Ttc + DicIntitules.Unite("Facture", "Prix_Ttc"));

            R.Cells.Add(Cl);

            Section.Blocks.Add(T);

            //------------------------------------------

            R6 = new TableRow();
            RgPrincipal.Rows.Add(R6);

            Section                 = new TableCell();
            Section.Padding         = new Thickness(10);
            Section.BorderBrush     = Brushes.Black;
            Section.BorderThickness = new Thickness(1);

            R6.Cells.Add(Section);

            Pr               = new Paragraph(new Run(pS.Pied));
            Pr.FontSize      = 13;
            Pr.TextAlignment = TextAlignment.Center;
            Section.Blocks.Add(Pr);

            //-------------------------------------------

            return(Doc);
        }
コード例 #8
0
 //----------------------------------------------------------------------------------------
 public int Delete(Chaine pChaine)
 {
     return(DataBase.DeleteID(pChaine.ID, "[Chaine]"));
 }