public override PassGeneratorRequest GetPass(string serialNumber)
        {
            var request = new PassGeneratorRequest
            {
                PassTypeIdentifier = PassTypeIdentifier,
                SerialNumber       = Guid.NewGuid().ToString("D")
            };


            var parameters = new TemplateModel();

            parameters.AddField("event", FieldAttribute.Value, "Jeff Wayne's War of the Worlds");

            var eventDate = DateTime.Now.AddDays(1);

            parameters.AddField("doors-open", FieldAttribute.Value,
                                new DateTime(eventDate.Year, eventDate.Month, eventDate.Day, 20, 30, 00));
            parameters.AddField("seating-section", FieldAttribute.Value, 10);

            request.AddBarcode(BarcodeType.PKBarcodeFormatPDF417, "01927847623423234234", "iso-8859-1",
                               "01927847623423234234");

            request.LoadTemplate("Event", parameters);

            return(request);
        }
        public override Passbook.Generator.PassGeneratorRequest GetPass(string serialNumber)
        {
            PassGeneratorRequest request = new PassGeneratorRequest();

            request.PassTypeIdentifier = PassTypeIdentifier;
            request.SerialNumber = Guid.NewGuid().ToString("D");

            TemplateModel parameters = new TemplateModel();

            parameters.AddField("origin", FieldAttribute.Label, "San Francisco");
            parameters.AddField("origin", FieldAttribute.Value, "SFO");

            parameters.AddField("destination", FieldAttribute.Label, "London Heathrow");
            parameters.AddField("destination", FieldAttribute.Value, "LHR");

            parameters.AddField("seat", FieldAttribute.Value, "7A");
            parameters.AddField("boarding-gate", FieldAttribute.Value, "F12");
            parameters.AddField("passenger-name", FieldAttribute.Value, "John Appleseed");

            request.AddBarCode("M1APPLESEED/JMR EZQ7O92 GVALHRBA 00723319C002F00009100", BarcodeType.PKBarcodeFormatPDF417, "iso-8859-1");

            request.LoadTemplate("BoardingPass", parameters);

            return request;
        }
Esempio n. 3
0
        public override PassGeneratorRequest GetPass(string serialNumber)
        {
            var request = new PassGeneratorRequest
            {
                PassTypeIdentifier = PassTypeIdentifier,
                SerialNumber       = Guid.NewGuid().ToString("D")
            };


            var parameters = new TemplateModel();

            parameters.AddField("origin", FieldAttribute.Label, "San Francisco");
            parameters.AddField("origin", FieldAttribute.Value, "SFO");

            parameters.AddField("destination", FieldAttribute.Label, "London Heathrow");
            parameters.AddField("destination", FieldAttribute.Value, "LHR");

            parameters.AddField("seat", FieldAttribute.Value, "7A");
            parameters.AddField("boarding-gate", FieldAttribute.Value, "F12");
            parameters.AddField("passenger-name", FieldAttribute.Value, "John Appleseed");

            request.AddBarcode(BarcodeType.PKBarcodeFormatPDF417,
                               "M1APPLESEED/JMR EZQ7O92 GVALHRBA 00723319C002F00009100", "iso-8859-1");

            request.LoadTemplate("BoardingPass", parameters);

            return(request);
        }
        public override Passbook.Generator.PassGeneratorRequest GetPass(string serialNumber)
        {
            PassGeneratorRequest request = new PassGeneratorRequest();

            request.PassTypeIdentifier = PassTypeIdentifier;
            request.SerialNumber = Guid.NewGuid().ToString("D");

            TemplateModel parameters = new TemplateModel();

            parameters.AddField("event", FieldAttribute.Value, "Jeff Wayne's War of the Worlds");

            DateTime eventDate = DateTime.Now.AddDays(1);

            parameters.AddField("doors-open", FieldAttribute.Value, new DateTime(eventDate.Year, eventDate.Month, eventDate.Day, 20, 30, 00));
            parameters.AddField("seating-section", FieldAttribute.Value, 10);

            request.AddBarCode("01927847623423234234", BarcodeType.PKBarcodeFormatPDF417, "iso-8859-1", "01927847623423234234");

            request.LoadTemplate("Event", parameters);

            return request;
        }