示例#1
0
        internal Section GetNoteBase(Color backLineColor, Color backFieldColor, string noteTypeDescription)
        {
            var section = GetSectionBase(backLineColor, true);

            #region Pane


            //Order summary
            var orderSummaryBv = new ReferencePoint {
                Left = "1cm", Top = SumTop
            };
            section.Pane.ElementList.Add(orderSummaryBv);
            orderSummaryBv.ElementList.Add(new Line {
                Width = "100%", Height = "0", Color = backLineColor
            });
            orderSummaryBv.ElementList.Add(new Line {
                Top = "1cm", Width = "100%", Height = "0", Color = backLineColor
            });
            orderSummaryBv.ElementList.Add(new Line {
                Top = "0", Left = "0", Width = "0", Height = "1cm", Color = backLineColor
            });
            orderSummaryBv.ElementList.Add(new Line {
                Top = "0", Right = "0", Width = "0", Height = "1cm", Color = backLineColor
            });
            orderSummaryBv.ElementList.Add(new Text {
                Value = noteTypeDescription + " fortsätter på nästa sida.", Left = "0.5cm", Top = "0.5cm", Visibility = PageVisibility.AllButLast
            });

            var orderSummaryPe = new ReferencePoint {
                Left = "11cm", Top = SumTop
            };
            section.Pane.ElementList.Add(orderSummaryPe);
            orderSummaryPe.ElementList.Add(new Line {
                Height = "1cm", Width = "0", Color = backLineColor, Visibility = PageVisibility.LastPage
            });
            var peTitle = new Text {
                Value = "Summa exkl. moms", Font = TinyTitle, Left = UnitValue.Parse("2px"), Visibility = PageVisibility.LastPage
            };
            orderSummaryPe.ElementList.Add(peTitle);
            var netSaleTotalPriceText = new Text {
                Value = "{NetSaleTotalPrice}", Top = UnitValue.Parse("0.5cm"), Width = UnitValue.Parse("2.45cm"), TextAlignment = TextBase.Alignment.Right, Visibility = PageVisibility.LastPage
            };
            orderSummaryPe.ElementList.Add(netSaleTotalPriceText);

            var orderSummaryVat = new ReferencePoint {
                Left = "13.5cm", Top = SumTop
            };
            section.Pane.ElementList.Add(orderSummaryVat);
            orderSummaryVat.ElementList.Add(new Line {
                Height = "1cm", Width = "0", Color = backLineColor, Visibility = PageVisibility.LastPage
            });
            var vatTiel = new Text {
                Value = "Moms", Font = TinyTitle, Left = UnitValue.Parse("2px"), Visibility = PageVisibility.LastPage
            };
            orderSummaryVat.ElementList.Add(vatTiel);
            var vatSaleTotalPriceText = new Text {
                Value = "{VatSaleTotalPrice}", Top = UnitValue.Parse("0.5cm"), Width = UnitValue.Parse("2.45cm"), TextAlignment = TextBase.Alignment.Right, Visibility = PageVisibility.LastPage
            };
            orderSummaryVat.ElementList.Add(vatSaleTotalPriceText);

            var orderSummaryGross = new ReferencePoint {
                Left = "16cm", Top = SumTop
            };
            section.Pane.ElementList.Add(orderSummaryGross);
            orderSummaryGross.ElementList.Add(new Line {
                Height = "1cm", Width = "0", Color = backLineColor, Visibility = PageVisibility.LastPage
            });
            var grossTitle = new Text {
                Value = "Att betala", Font = TinyTitle, Left = UnitValue.Parse("2px"), Visibility = PageVisibility.LastPage
            };
            orderSummaryGross.ElementList.Add(grossTitle);
            var grossSaleTotalPriceText = new Text {
                Value = "{GrossSaleTotalPrice}", Top = UnitValue.Parse("0.5cm"), Width = "24mm", TextAlignment = TextBase.Alignment.Right, Visibility = PageVisibility.LastPage
            };
            orderSummaryGross.ElementList.Add(grossSaleTotalPriceText);

            //Extra info
            var titleFont = new Font {
                Color = backLineColor, Size = 8, FontName = "Times"
            };
            var vatInfoReference = new ReferencePoint {
                Left = "1cm", Top = SumTop
            };
            var vatInfoText = new Text {
                Value = "Org.nr {LocalCompany.OrgNo}. Innehar F-skattsedel. Vat nr {LocalCompany.VatNo}.", Left = UnitValue.Parse("2px"), Top = UnitValue.Parse("1cm"), Font = titleFont, Visibility = PageVisibility.LastPage
            };
            vatInfoReference.ElementList.Add(vatInfoText);
            section.Pane.ElementList.Add(vatInfoReference);

            section.Pane.ElementList.Add(new Line {
                Left = "1cm", Top = "100%"
            });


            #endregion

            return(section);
        }
示例#2
0
        public static void ApplyFooter(Color backLineColor, Section section)
        {
            var titleFont = new Font {
                Color = backLineColor, Size = 8, FontName = "Times"
            };

            const string top = "3px";

            section.Footer.Height = UnitValue.Parse("2cm");
            var addressRefPoint = new ReferencePoint
            {
                Left  = "1cm",
                Top   = UnitValue.Parse(top),
                Stack = ReferencePoint.StackMethod.Vertical
            };

            section.Footer.ElementList.Add(addressRefPoint);
            addressRefPoint.ElementList.Add(new Text {
                Value = "Postadress", Font = titleFont
            });
            addressRefPoint.ElementList.Add(new Text {
                Value = "{LocalCompany.StreetName}"
            });
            addressRefPoint.ElementList.Add(new Text {
                Value = "{LocalCompany.PostalCode} {LocalCompany.City}"
            });

            var hallRefPoint = new ReferencePoint
            {
                Left  = UnitValue.Parse("5cm"),
                Top   = UnitValue.Parse(top),
                Stack = ReferencePoint.StackMethod.Vertical
            };

            section.Footer.ElementList.Add(hallRefPoint);
            hallRefPoint.ElementList.Add(new Text {
                Value = "Telefon", Font = titleFont
            });
            hallRefPoint.ElementList.Add(new Text {
                Value = "{LocalCompany.Phone}"
            });
            hallRefPoint.ElementList.Add(new Text {
                Value = "Fax", Font = titleFont
            });
            hallRefPoint.ElementList.Add(new Text {
                Value = "{LocalCompany.Fax}"
            });

            var tradRefPoint = new ReferencePoint
            {
                Left  = UnitValue.Parse("9.5cm"),
                Top   = UnitValue.Parse(top),
                Stack = ReferencePoint.StackMethod.Vertical
            };

            section.Footer.ElementList.Add(tradRefPoint);
            tradRefPoint.ElementList.Add(new Text {
                Value = "{EMail1}"
            });
            tradRefPoint.ElementList.Add(new Text {
                Value = "{EMail2}"
            });
            tradRefPoint.ElementList.Add(new Text {
                Value = "{EMail3}"
            });

            var bg = new ReferencePoint
            {
                Left  = UnitValue.Parse("17cm"),
                Top   = UnitValue.Parse(top),
                Stack = ReferencePoint.StackMethod.Vertical
            };

            section.Footer.ElementList.Add(bg);
            bg.ElementList.Add(new Text {
                Value = "Bankgiro", Font = titleFont
            });
            bg.ElementList.Add(new Text {
                Value = "{Bankgiro}"
            });
        }