Exemple #1
0
 public BookingInfo(BookingDispatching dispatch, Association association, AirportMeetingPoint meetingPoint)
 {
     _dispatch = dispatch;
     _booking = dispatch.Booking;
     _association = association;
     _airportMeetingPoint = meetingPoint;
 }
Exemple #2
0
        public static Document Generate(BookingDispatching dispatch, Association association, AirportMeetingPoint meetingPoint)
        {
            BookingInfo bookingInfo = new BookingInfo(dispatch, association, meetingPoint);

            Document document = new Document();
            document.Info.Title = "Confirmation Voucher";
            document.Info.Subject = dispatch.Booking.ReferenceId;
            document.Info.Author = bookingInfo.AssociationName;

            DefineStyles(document);

            Section section = document.AddSection();

            AddLogo(document, bookingInfo);
            AddTripSummary(document, bookingInfo);
            AddMeetingPoint(document, bookingInfo);
            AddPassengers(document, bookingInfo);
            section.AddParagraph();
            AddPayment(document, bookingInfo);
            AddBookedByInfo(document, bookingInfo);

            return document;
        }
        public MemoryStream GeneratePDFVoucher(BookingDispatching dispatch, Association association, AirportMeetingPoint meetingPoint)
        {
            var document = BookingVoucher.Generate(dispatch, association, meetingPoint);
            PdfDocumentRenderer renderer = new PdfDocumentRenderer(true, PdfSharp.Pdf.PdfFontEmbedding.Always);
            renderer.Document = document;
            renderer.RenderDocument();

            MemoryStream pdfStream = new MemoryStream();
            renderer.PdfDocument.Save(pdfStream, false);
            return pdfStream;
        }
     public bool Equals(AirportMeetingPoint other)
     {
         if (ReferenceEquals(null, other)) return false;
         if (ReferenceEquals(this, other)) return true;
 		if (other.Id == 0 && Id == 0)
 			return false;
 		else
 			return other.Id == Id;
     }