コード例 #1
0
ファイル: BookingInfo.cs プロジェクト: felixthehat/Limo
 public BookingInfo(BookingDispatching dispatch, Association association, AirportMeetingPoint meetingPoint)
 {
     _dispatch = dispatch;
     _booking = dispatch.Booking;
     _association = association;
     _airportMeetingPoint = meetingPoint;
 }
コード例 #2
0
ファイル: BookingVoucher.cs プロジェクト: felixthehat/Limo
        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;
        }
コード例 #3
0
ファイル: SettingViewModel.cs プロジェクト: felixthehat/Limo
 static SettingViewModel()
 {
     ApplySettingDefault();
     DummyCity = new City() { Id = -1, Name = "-select-" };
     DummyAssociation = new Association() { Id = -1, Name = "-ALL ASSOCIATIONS-" };
     DummyCountry = new Country() { Id = -1, Name = "-ALL COUNTRIES-", HasStates = true, DisplayStates = true };
     DummyState = new State() { Id = -1, Name = "-select-" };
 }
コード例 #4
0
        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;
        }
コード例 #5
0
ファイル: Association.cs プロジェクト: felixthehat/Limo
     public bool Equals(Association 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;
     }