Exemple #1
0
        public ActionResult SingleTicket(int id)
        {
            var gateway = BLLGatewayFactory.CreateOrGet();
            var model   = gateway.GetEvent(id);

            return(View(model));
        }
Exemple #2
0
        public ActionResult pdfTest(int id)
        {
            var          gateway = BLLGatewayFactory.CreateOrGet();
            var          model   = gateway.GetEvent(id);
            PDFGenerator p       = new PDFGenerator();

            p.formatePDF(model);
            ViewBag.Message = "Your application description page.";
            return(View());
        }
Exemple #3
0
        public ActionResult Index()
        {
            var gateway = BLLGatewayFactory.CreateOrGet();
            var model   = new EventListModel()
            {
                Events = gateway.GetFutureEvents()
            };

            return(View(model));
        }
        public static void MainBLLGatewayTester()
        {
            Console.WriteLine("Press any key when the web api app has started....");
            Console.ReadKey();

            var newEvent = new EventDTO()
            {
                Name         = "BLLName",
                Description  = "BLLDesc",
                Price        = 1000,
                StudentPrice = 500,
                Date         = DateTime.Now.AddYears(1),
                Place        = "BLLPlace"
            };

            var gateway       = BLLGatewayFactory.CreateOrGetIgnoreDebug();
            var canStudentBuy = gateway.CanStudentBuyStudentTicket(1, 1);
            var a             = "asd";
        }