Sample Invoice 1 Example for Blazor

Nevron NOV RichTextEditor for Blazor ships with hundreds of examples with full source code, as part of the Nevron Open Vision Suite. All Blazor RichTextEditor examples are also available as a stand-alone Visual Studio solution in C#, which you can download from the links below.

Sample Invoice 1 Example for Blazor Description

This example demonstrates how to programmatically create an invoice with NOV Rich Text.

The invoice includes supplier and customer information, supplier email and website, invoice dates, a line-item table, subtotal and sales tax, bank details, a payment QR code, and a page header and footer.

All company, bank, and payment details in this example are fictional.


Sample Invoice 1Example

C# Sample Invoice 1 Example Code for Nevron RichTextEditor for Blazor
Language: C#

using Nevron.Nov;
using Nevron.Nov.Barcode;
using Nevron.Nov.Dom;
using Nevron.Nov.Graphics;
using Nevron.Nov.Layout;
using Nevron.Nov.Text;
using Nevron.Nov.Text.Formats;
using Nevron.Nov.UI;
using Nevron.Nov.Windows.Forms;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Windows.Forms;

namespace NovWinFormsProject
{
	public partial class Form1 : Form
	{
		#region Constructors

		public Form1()
		{
			InitializeComponent();

			// Set form title
			Text = "NOV WinForms - NSampleInvoice1Example";

			// Create the NOV example and its controls
			NWidget exampleContent = CreateExampleContent();
			NWidget exampleControls = CreateExampleControls();
			if (exampleControls != null)
			{
				exampleControls.PreferredWidth = 300;
			}

			// Place the example and its controls in a pair box
			NPairBox pairBox = new NPairBox(exampleContent, exampleControls);
			pairBox.FillMode = ENStackFillMode.First;
			pairBox.FitMode = ENStackFitMode.First;
			pairBox.Margins = new NMargins(NDesign.HorizontalSpacing, NDesign.VerticalSpacing);

			// Host the example in the form
			NNovWidgetHost host = new NNovWidgetHost(pairBox);
			host.Dock = DockStyle.Fill;
			Controls.Add(host);
		}

		#endregion

		#region Example

		private NWidget CreateExampleContent()
		{
			return null;
		}
		private NWidget CreateExampleControls()
		{
			return null;
		}

		#endregion

        #region Implementation

        private static InvoiceData CreateSampleInvoice()
        {
            // All company, bank, and payment details are fictional.
            Party supplier = new Party(
                "BluePeak Cloud Services, Inc.",
                "250 Cloud Avenue",
                "Seattle, WA 98101",
                "United States",
                "91-7463058",
                "billing@bluepeak.example",
                "https://bluepeak.example/");

            Party customer = new Party(
                "Cedarbridge Design, Inc.",
                "120 Market Street",
                "Portland, OR 97201",
                "United States",
                "93-0000000",
                "",
                "");

            InvoiceLine[] lines =
            {
                new InvoiceLine("CLOUD-01", "Managed cloud hosting",
                    "01.09.2026 - 30.09.2026", 1m, "month", 240m),
                new InvoiceLine("BACKUP-01", "Cloud backup and recovery",
                    "01.09.2026 - 30.09.2026", 1m, "month", 60m),
                new InvoiceLine("SUPPORT-01", "Technical support",
                    "September 2026", 3m, "hour", 85m)
            };

            return new InvoiceData(
                "INV-2026-0091",
                new DateTime(2026, 9, 21),
                new DateTime(2026, 9, 21),
                new DateTime(2026, 10, 5),
                "PO-2026-104",
                customer,
                supplier,
                lines,
                0m,
                "USD",
                "Example Commercial Bank",
                "000000000",
                "0000000000",
                "Business checking",
                "Alex Morgan",
                "https://bluepeak.example/pay/INV-2026-0091");
        }

        private void PopulateRichText()
        {
            PopulateInvoice(m_RichText, CreateSampleInvoice());
        }

        private static void PopulateInvoice(NRichTextView view, InvoiceData invoice)
        {
            view.Content.Sections.Clear();

            var section = new NSection
            {
                PageSize = new NPaperSize(ENPaperKind.A4),
                PageMargins = new NMargins(36, 36, 36, 42)
            };
            view.Content.Sections.Add(section);

            AddHeader(section, invoice.Supplier);
            AddFooter(section);

            AddSupplierAndCustomer(section, invoice);
            AddInvoiceIdentity(section, invoice);
            AddLineItems(section, invoice);
            AddTotals(section, invoice);
            AddPaymentSection(section, invoice);
        }

        // SECTION 1 - company heading and customer/supplier information
        private static void AddSupplierAndCustomer(NSection section, InvoiceData x)
        {
            var contact = new NTable(0, 2)
            {
                Border = NBorder.CreateFilledBorder(NColor.LightGray, 0.5, 0.5)
            };
            contact.Columns[0].PreferredWidth =
                new NMultiLength(ENMultiLengthUnit.Percentage, 65);
            contact.Columns[1].PreferredWidth =
                new NMultiLength(ENMultiLengthUnit.Percentage, 35);

            var contactRow = new NTableRow();

            var brandCell = new NTableCell { Padding = new NMargins(5) };
            var brandParagraph = new NParagraph
            {
                HorizontalAlignment = ENAlign.Left,
                Margins = new NMargins(0, 0, 0, 1)
            };
            brandParagraph.Inlines.Add(new NTextInline(x.Supplier.Name)
            {
                FontSize = 15,
                FontStyle = ENFontStyle.Bold
            });
            brandCell.Blocks.Add(brandParagraph);

            var sloganParagraph = new NParagraph
            {
                HorizontalAlignment = ENAlign.Left,
                Margins = new NMargins(0, 0, 0, 1)
            };
            sloganParagraph.Inlines.Add(new NTextInline("Global expertise, local outcomes")
            {
                FontSize = 15,
                FontStyle = ENFontStyle.Bold
            });
            brandCell.Blocks.Add(sloganParagraph);
            contactRow.Cells.Add(brandCell);

            var contactCell = new NTableCell { Padding = new NMargins(5) };
            var emailParagraph = new NParagraph
            {
                HorizontalAlignment = ENAlign.Right,
                Margins = new NMargins(0, 0, 0, 1)
            };
            emailParagraph.Inlines.Add(new NTextInline(x.Supplier.Email)
            {
                FontSize = 10,
                FontStyle = ENFontStyle.Regular
            });
            contactCell.Blocks.Add(emailParagraph);

            var websiteParagraph = new NParagraph
            {
                HorizontalAlignment = ENAlign.Right,
                Margins = new NMargins(0, 0, 0, 1)
            };
            websiteParagraph.Inlines.Add(new NTextInline(x.Supplier.Website)
            {
                FontSize = 10,
                FontStyle = ENFontStyle.Regular
            });
            contactCell.Blocks.Add(websiteParagraph);
            contactRow.Cells.Add(contactCell);

            contact.Rows.Add(contactRow);
            section.Blocks.Add(contact);
            section.Blocks.Add(new NParagraph
            {
                Margins = new NMargins(0, 0, 0, 14)
            });

            var parties = new NTable(0, 2)
            {
                Border = NBorder.CreateFilledBorder(NColor.LightGray, 0.5, 0.5)
            };
            var partiesRow = new NTableRow();

            Party[] partyValues = { x.Customer, x.Supplier };
            string[] captions = { "CUSTOMER:", "SUPPLIER:" };
            ENAlign[] alignments = { ENAlign.Left, ENAlign.Right };

            for (int i = 0; i < partyValues.Length; i++)
            {
                Party party = partyValues[i];
                ENAlign alignment = alignments[i];
                var partyCell = new NTableCell { Padding = new NMargins(5) };

                string[] lines =
                {
                    captions[i], party.Name, party.Address1, party.Address2,
                    party.Country, $"EIN: {party.Ein}"
                };

                for (int lineIndex = 0; lineIndex < lines.Length; lineIndex++)
                {
                    var paragraph = new NParagraph
                    {
                        HorizontalAlignment = alignment,
                        Margins = new NMargins(0, 0, 0, 1)
                    };
                    paragraph.Inlines.Add(new NTextInline(lines[lineIndex])
                    {
                        FontSize = 10,
                        FontStyle = lineIndex < 2
                            ? ENFontStyle.Bold
                            : ENFontStyle.Regular
                    });
                    partyCell.Blocks.Add(paragraph);
                }

                partiesRow.Cells.Add(partyCell);
            }

            parties.Rows.Add(partiesRow);
            section.Blocks.Add(parties);
            section.Blocks.Add(new NParagraph
            {
                Margins = new NMargins(0, 0, 0, 16)
            });
        }

        // SECTION 2 - invoice title, dates and reference
        private static void AddInvoiceIdentity(NSection section, InvoiceData x)
        {
            var title = new NParagraph
            {
                HorizontalAlignment = ENAlign.Center,
                Margins = new NMargins(0, 0, 0, 1)
            };
            title.Inlines.Add(new NTextInline("INVOICE")
            {
                FontSize = 24,
                FontStyle = ENFontStyle.Bold
            });
            section.Blocks.Add(title);

            var original = new NParagraph
            {
                HorizontalAlignment = ENAlign.Center,
                Margins = new NMargins(0, 0, 0, 1)
            };
            original.Inlines.Add(new NTextInline("ORIGINAL")
            {
                FontSize = 16,
                FontStyle = ENFontStyle.Bold
            });
            section.Blocks.Add(original);

            var number = new NParagraph
            {
                HorizontalAlignment = ENAlign.Center,
                Margins = new NMargins(0, 0, 0, 1)
            };
            number.Inlines.Add(new NTextInline($"No. {x.Number} / {x.IssueDate:dd.MM.yyyy}")
            {
                FontSize = 12,
                FontStyle = ENFontStyle.Bold
            });
            section.Blocks.Add(number);

            var metadata = new NTable(0, 3)
            {
                Border = NBorder.CreateFilledBorder(NColor.LightGray, 0.5, 0.5)
            };
            var metadataRow = new NTableRow();
            string[] metadataValues =
            {
                $"Tax point date: {x.TaxPointDate:dd.MM.yyyy}",
                $"Due date: {x.DueDate:dd.MM.yyyy}",
                $"Customer reference: {x.CustomerReference}"
            };
            ENAlign[] metadataAlignments =
            {
                ENAlign.Left, ENAlign.Center, ENAlign.Right
            };

            for (int i = 0; i < metadataValues.Length; i++)
            {
                var cell = new NTableCell { Padding = new NMargins(5) };
                var paragraph = new NParagraph
                {
                    HorizontalAlignment = metadataAlignments[i],
                    Margins = new NMargins(0, 0, 0, 1)
                };
                paragraph.Inlines.Add(new NTextInline(metadataValues[i])
                {
                    FontSize = 10,
                    FontStyle = ENFontStyle.Bold
                });
                cell.Blocks.Add(paragraph);
                metadataRow.Cells.Add(cell);
            }

            metadata.Rows.Add(metadataRow);
            section.Blocks.Add(metadata);
            section.Blocks.Add(new NParagraph
            {
                Margins = new NMargins(0, 0, 0, 8)
            });
        }

        // SECTION 3 - line-item table
        private static void AddLineItems(NSection section, InvoiceData x)
        {
            var table = new NTable(0, 6)
            {
                Border = NBorder.CreateFilledBorder(NColor.LightGray, 0.5, 0.5)
            };
            double[] widths = { 4, 49, 8, 9, 15, 15 };
            for (int i = 0; i < widths.Length; i++)
            {
                table.Columns[i].PreferredWidth =
                    new NMultiLength(ENMultiLengthUnit.Percentage, widths[i]);
            }

            var headerRow = new NTableRow();
            string[] headers =
            {
                "No.", "Description of goods/services", "Qty", "Unit",
                "Unit price", "Amount"
            };
            ENAlign[] headerAlignments =
            {
                ENAlign.Left, ENAlign.Left, ENAlign.Right,
                ENAlign.Left, ENAlign.Right, ENAlign.Right
            };

            for (int i = 0; i < headers.Length; i++)
            {
                var cell = new NTableCell
                {
                    Padding = new NMargins(5),
                    BackgroundFill = new NColorFill(HeaderGray)
                };
                var paragraph = new NParagraph
                {
                    HorizontalAlignment = headerAlignments[i],
                    Margins = new NMargins(0, 0, 0, 1)
                };
                paragraph.Inlines.Add(new NTextInline(headers[i])
                {
                    FontSize = 10,
                    FontStyle = ENFontStyle.Bold
                });
                cell.Blocks.Add(paragraph);
                headerRow.Cells.Add(cell);
            }
            table.Rows.Add(headerRow);

            for (int lineIndex = 0; lineIndex < x.Lines.Count; lineIndex++)
            {
                InvoiceLine line = x.Lines[lineIndex];
                decimal amount = line.Quantity * line.UnitPrice;
                string[] values =
                {
                    (lineIndex + 1).ToString(En),
                    $"{line.Code}\n{line.Description}\n{line.Period}",
                    line.Quantity.ToString("N2", En),
                    line.Unit,
                    $"{line.UnitPrice.ToString("N2", En)} {x.Currency}",
                    $"{amount.ToString("N2", En)} {x.Currency}"
                };
                ENAlign[] alignments =
                {
                    ENAlign.Left, ENAlign.Left, ENAlign.Right,
                    ENAlign.Left, ENAlign.Right, ENAlign.Right
                };

                var row = new NTableRow();
                for (int columnIndex = 0; columnIndex < values.Length; columnIndex++)
                {
                    var cell = new NTableCell { Padding = new NMargins(5) };
                    foreach (string textLine in values[columnIndex].Split('\n'))
                    {
                        var paragraph = new NParagraph
                        {
                            HorizontalAlignment = alignments[columnIndex],
                            Margins = new NMargins(0, 0, 0, 1)
                        };
                        paragraph.Inlines.Add(new NTextInline(textLine)
                        {
                            FontSize = 10,
                            FontStyle = ENFontStyle.Regular
                        });
                        cell.Blocks.Add(paragraph);
                    }
                    row.Cells.Add(cell);
                }
                table.Rows.Add(row);
            }

            section.Blocks.Add(table);
            section.Blocks.Add(new NParagraph
            {
                Margins = new NMargins(0, 0, 0, 8)
            });
        }

        // SECTION 4 - subtotal, optional sales tax and total
        private static void AddTotals(NSection section, InvoiceData x)
        {
            decimal net = 0;
            foreach (InvoiceLine line in x.Lines)
            {
                net += line.Quantity * line.UnitPrice;
            }

            decimal salesTax = Math.Round(net * x.SalesTaxRate, 2);
            decimal gross = net + salesTax;

            var outer = new NTable(0, 2)
            {
                Border = NBorder.CreateFilledBorder(NColor.LightGray, 0.5, 0.5)
            };
            outer.Columns[0].PreferredWidth =
                new NMultiLength(ENMultiLengthUnit.Percentage, 52);
            outer.Columns[1].PreferredWidth =
                new NMultiLength(ENMultiLengthUnit.Percentage, 48);

            var outerRow = new NTableRow();
            var emptyCell = new NTableCell { Padding = new NMargins(5) };
            var emptyParagraph = new NParagraph
            {
                HorizontalAlignment = ENAlign.Left,
                Margins = new NMargins(0, 0, 0, 1)
            };
            emptyParagraph.Inlines.Add(new NTextInline(string.Empty)
            {
                FontSize = 10,
                FontStyle = ENFontStyle.Regular
            });
            emptyCell.Blocks.Add(emptyParagraph);
            outerRow.Cells.Add(emptyCell);

            var totalsCell = new NTableCell();
            var totals = new NTable(0, 3)
            {
                Border = NBorder.CreateFilledBorder(NColor.LightGray, 0.5, 0.5)
            };

            var totalRows = new List
            {
                new TotalRow("Invoice subtotal:", $"{net.ToString("N2", En)} {x.Currency}",
                    $"{net.ToString("N2", En)} {x.Currency}", false)
            };
            if (x.SalesTaxRate > 0)
            {
                totalRows.Add(new TotalRow("Sales tax rate:",
                    x.SalesTaxRate.ToString("P2", En), string.Empty, false));
                totalRows.Add(new TotalRow("Sales tax:",
                    $"{salesTax.ToString("N2", En)} {x.Currency}",
                    $"{salesTax.ToString("N2", En)} {x.Currency}", false));
            }
            totalRows.Add(new TotalRow("TOTAL:", $"{gross.ToString("N2", En)} {x.Currency}",
                $"{gross.ToString("N2", En)} {x.Currency}", true));

            foreach (TotalRow totalRow in totalRows)
            {
                string label = totalRow.Label;
                string middle = totalRow.Middle;
                string strong = totalRow.Strong;
                bool bold = totalRow.Bold;
                var row = new NTableRow();
                string[] values = { label, middle, strong };
                for (int i = 0; i < values.Length; i++)
                {
                    var cell = new NTableCell { Padding = new NMargins(5) };
                    if (i == 2 && values[i].Length > 0)
                    {
                        cell.BackgroundFill = new NColorFill(HeaderGray);
                    }

                    var paragraph = new NParagraph
                    {
                        HorizontalAlignment = ENAlign.Right,
                        Margins = new NMargins(0, 0, 0, 1)
                    };
                    paragraph.Inlines.Add(new NTextInline(values[i])
                    {
                        FontSize = 10,
                        FontStyle = bold || i == 2
                            ? ENFontStyle.Bold
                            : ENFontStyle.Regular
                    });
                    cell.Blocks.Add(paragraph);
                    row.Cells.Add(cell);
                }
                totals.Rows.Add(row);
            }

            totalsCell.Blocks.Add(totals);
            outerRow.Cells.Add(totalsCell);
            outer.Rows.Add(outerRow);
            section.Blocks.Add(outer);
            section.Blocks.Add(new NParagraph
            {
                Margins = new NMargins(0, 0, 0, 22)
            });
        }

        // SECTION 5 - bank details, payment summary and QR widget
        private static void AddPaymentSection(NSection section, InvoiceData x)
        {
            decimal net = 0;
            foreach (InvoiceLine line in x.Lines)
            {
                net += line.Quantity * line.UnitPrice;
            }
            decimal salesTax = Math.Round(
                net * x.SalesTaxRate, 2, MidpointRounding.AwayFromZero);
            decimal total = net + salesTax;

            var table = new NTable(0, 3)
            {
                Border = NBorder.CreateFilledBorder(NColor.LightGray, 0.5, 0.5)
            };
            table.Columns[0].PreferredWidth =
                new NMultiLength(ENMultiLengthUnit.Percentage, 53);
            table.Columns[1].PreferredWidth =
                new NMultiLength(ENMultiLengthUnit.Percentage, 27);
            table.Columns[2].PreferredWidth =
                new NMultiLength(ENMultiLengthUnit.Percentage, 20);

            var row = new NTableRow();

            var bankCell = new NTableCell { Padding = new NMargins(5) };
            string[] bankLines =
            {
                "BANK DETAILS:", x.BankName,
                $"ABA routing number: {x.RoutingNumber}",
                $"Account number: {x.AccountNumber}",
                $"Account type: {x.AccountType}"
            };
            for (int i = 0; i < bankLines.Length; i++)
            {
                var paragraph = new NParagraph
                {
                    HorizontalAlignment = ENAlign.Left,
                    Margins = new NMargins(0, 0, 0, 1)
                };
                paragraph.Inlines.Add(new NTextInline(bankLines[i])
                {
                    FontSize = i == 1 ? 12 : 10,
                    FontStyle = i < 2 ? ENFontStyle.Bold : ENFontStyle.Regular
                });
                bankCell.Blocks.Add(paragraph);
            }
            row.Cells.Add(bankCell);

            var detailsCell = new NTableCell { Padding = new NMargins(5) };
            string[] detailLines =
            {
                $"Amount due: {total.ToString("N2", En)} {x.Currency}",
                "Exchange rate: 1.00000",
                $"Prepared by: {x.PreparedBy}",
                "Scan to pay:"
            };
            for (int i = 0; i < detailLines.Length; i++)
            {
                var paragraph = new NParagraph
                {
                    HorizontalAlignment = ENAlign.Left,
                    Margins = new NMargins(0, 0, 0, 1)
                };
                paragraph.Inlines.Add(new NTextInline(detailLines[i])
                {
                    FontSize = 10,
                    FontStyle = i == 0 || i == 3
                        ? ENFontStyle.Bold
                        : ENFontStyle.Regular
                });
                detailsCell.Blocks.Add(paragraph);
            }
            row.Cells.Add(detailsCell);

            var qrCell = new NTableCell { Padding = new NMargins(5) };
            var qrParagraph = new NParagraph
            {
                HorizontalAlignment = ENAlign.Center,
                Margins = new NMargins(0, 0, 0, 1)
            };
            var qr = new NMatrixBarcode(ENMatrixBarcodeSymbology.QrCode, x.PaymentUrl)
            {
                ErrorCorrection = ENErrorCorrectionLevel.Medium,
                PreferredSize = new NSize(92, 92)
            };
            qrParagraph.Inlines.Add(new NWidgetInline(qr));
            qrCell.Blocks.Add(qrParagraph);

            var qrCaption = new NParagraph
            {
                HorizontalAlignment = ENAlign.Center,
                Margins = new NMargins(0, 0, 0, 1)
            };
            qrCaption.Inlines.Add(new NTextInline("Imaginary payment link")
            {
                FontSize = 8,
                FontStyle = ENFontStyle.Regular
            });
            qrCell.Blocks.Add(qrCaption);
            row.Cells.Add(qrCell);

            table.Rows.Add(row);
            section.Blocks.Add(table);
        }

        /// 
        /// Header
        /// 
        /// 
        private static void AddHeader(NSection section, Party supplier)
        {
            NHeaderFooter header = new NHeaderFooter();
            header.Blocks.Add(new NParagraph(supplier.Name));

            section.Header = header;
        }

        // SECTION 6 - repeating page footer
        private static void AddFooter(NSection section)
        {
            var footer = new NHeaderFooter();
            var table = new NTable(0, 2)
            {
                Border = NBorder.CreateFilledBorder(NColor.LightGray, 0.5, 0.5)
            };
            var row = new NTableRow();

            var noticeCell = new NTableCell { Padding = new NMargins(5) };
            var noticeParagraph = new NParagraph
            {
                HorizontalAlignment = ENAlign.Left,
                Margins = new NMargins(0, 0, 0, 1)
            };
            noticeParagraph.Inlines.Add(new NTextInline(
                "This invoice was generated electronically and is valid without a signature.")
            {
                FontSize = 8,
                FontStyle = ENFontStyle.Regular
            });
            noticeCell.Blocks.Add(noticeParagraph);
            row.Cells.Add(noticeCell);

            var pageCell = new NTableCell { Padding = new NMargins(5) };
            var pageParagraph = new NParagraph
            {
                HorizontalAlignment = ENAlign.Right,
                Margins = new NMargins(0, 0, 0, 1)
            };
            pageParagraph.Inlines.Add(new NTextInline("1/1")
            {
                FontSize = 8,
                FontStyle = ENFontStyle.Regular
            });
            pageCell.Blocks.Add(pageParagraph);
            row.Cells.Add(pageCell);

            table.Rows.Add(row);
            footer.Blocks.Add(table);
            section.Footer = footer;
        }

        #endregion

		#region Event Handlers
		#endregion

        #region Fields

        private NRichTextView m_RichText;

        private static readonly CultureInfo En = CultureInfo.GetCultureInfo("en-GB");
        private static readonly NColor HeaderGray = NColor.FromRGB(225, 225, 225);

        #endregion

		#region Static Methods
		#endregion

		#region Constants
		#endregion

        #region Nested Types

        private sealed class Party
        {
            public Party(
                string name,
                string address1,
                string address2,
                string country,
                string ein,
                string email,
                string website)
            {
                Name = name;
                Address1 = address1;
                Address2 = address2;
                Country = country;
                Ein = ein;
                Email = email;
                Website = website;
            }

            public readonly string Name;
            public readonly string Address1;
            public readonly string Address2;
            public readonly string Country;
            public readonly string Ein;
            public readonly string Email;
            public readonly string Website;
        }

        private sealed class InvoiceLine
        {
            public InvoiceLine(
                string code,
                string description,
                string period,
                decimal quantity,
                string unit,
                decimal unitPrice)
            {
                Code = code;
                Description = description;
                Period = period;
                Quantity = quantity;
                Unit = unit;
                UnitPrice = unitPrice;
            }

            public readonly string Code;
            public readonly string Description;
            public readonly string Period;
            public readonly decimal Quantity;
            public readonly string Unit;
            public readonly decimal UnitPrice;
        }

        private sealed class InvoiceData
        {
            public InvoiceData(
                string number,
                DateTime issueDate,
                DateTime taxPointDate,
                DateTime dueDate,
                string customerReference,
                Party customer,
                Party supplier,
                IList lines,
                decimal salesTaxRate,
                string currency,
                string bankName,
                string routingNumber,
                string accountNumber,
                string accountType,
                string preparedBy,
                string paymentUrl)
            {
                Number = number;
                IssueDate = issueDate;
                TaxPointDate = taxPointDate;
                DueDate = dueDate;
                CustomerReference = customerReference;
                Customer = customer;
                Supplier = supplier;
                Lines = lines;
                SalesTaxRate = salesTaxRate;
                Currency = currency;
                BankName = bankName;
                RoutingNumber = routingNumber;
                AccountNumber = accountNumber;
                AccountType = accountType;
                PreparedBy = preparedBy;
                PaymentUrl = paymentUrl;
            }

            public readonly string Number;
            public readonly DateTime IssueDate;
            public readonly DateTime TaxPointDate;
            public readonly DateTime DueDate;
            public readonly string CustomerReference;
            public readonly Party Customer;
            public readonly Party Supplier;
            public readonly IList Lines;
            public readonly decimal SalesTaxRate;
            public readonly string Currency;
            public readonly string BankName;
            public readonly string RoutingNumber;
            public readonly string AccountNumber;
            public readonly string AccountType;
            public readonly string PreparedBy;
            public readonly string PaymentUrl;
        }

        private sealed class TotalRow
        {
            public TotalRow(
                string label,
                string middle,
                string strong,
                bool bold)
            {
                Label = label;
                Middle = middle;
                Strong = strong;
                Bold = bold;
            }

            public readonly string Label;
            public readonly string Middle;
            public readonly string Strong;
            public readonly bool Bold;
        }

        #endregion
	}
}

Download a fully functional C# (.cs) Sample Invoice 1 Example for Blazor Solution