Part 3: Aspose File Components for .NET and WCF – Airline Reservation, Complete Code

Aspose.Total icon

In the first part of this series, we had a look into an airline reservation scenario. The second blog post of this series gave you an overview of the architecture of the sample application. In this post, you’ll have a look into the complete code of this example scenario.

This part will help you understand how easily you can create bar codes, tickets, invoices and send attachments with emails. It’ll also show you how you can print the invoices. We have built this example using WCF, but you can use this code in other types of .NET applications. You can also use the code in a variety of scenarios.

This example contains a WCF service that provides the features to find flight information and reserve a seat. It also creates bar codes and tickets. The service sends the ticket as an email attachment to the customer.

We have used the following Aspose components in this example:

On the client end, we have used Windows Forms application which allows you to find flight information and then reserve the seat for the customer. It also generates and prints an invoice for the customer.

The WCF service uses Aspose.BarCode for .NET to create bar codes for tickets and Aspose.Pdf for .NET to create tickets, while Aspose.Email for .NET sends the ticket as an email attachment to the customer.

The Windows Forms based client uses Aspose.Pdf for .NET to create invoice and then print that invoice on the default printer. This example also includes a folder containing the sample input and output files like input XML containing initial PDF structure, logos, output bar code images, sample ticket and customer invoice.

You can find the complete code in the airline reservation scenario repository on github.com along with a README.md file. The service and client projects also contain README.txt files to show you the steps for setting up the example at your end.