// GET: bestelling/Factuur/5
        public ActionResult Factuur(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            bestelling bestelling = db.bestellings.Find(id);

            if (bestelling == null)
            {
                return(HttpNotFound());
            }

            PDFMaker PDFMaker = new PDFMaker();

            byte[] abytes = PDFMaker.PreparePDF(bestelling);
            // Create pdf file from bestelling data
            return(File(abytes, "application/pdf"));
        }
Example #2
0
        // GET: PDF/PDF/5
        public ActionResult PDF(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            bestelling bestelling = db.bestellings.Find(id);

            if (bestelling == null)
            {
                return(HttpNotFound());
            }

            //luuk sloopt alles
            PDFMaker PDFMaker = new PDFMaker();

            byte[] abytes = PDFMaker.PreparePDF(bestelling);

            return(File(abytes, "application/pdf"));
        }
Example #3
0
        // GET: PDF/PDF/{id}
        public ActionResult PDF(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Verhuren verhuur = db.Verhuren.Find(id);

            if (verhuur == null)
            {
                return(HttpNotFound());
            }

            //luuk sloopt alles
            PDFMaker PDFMaker = new PDFMaker();

            byte[] abytes = PDFMaker.PreparePDF(verhuur);

            return(File(abytes, "application/pdf"));
        }