public void TourSummaryPDFTest() { string filename = "TestTourSummary"; PDFMaker.MakeTourSummaryPDF((List <Tour>)MakeTestTourList(), filename); Assert.IsTrue(File.Exists(ConfigurationManager.AppSettings["FileFolder"] + filename + ".pdf")); //File.Delete(ConfigurationManager.AppSettings["FileFolder"] + path); }
public void PrintAllToursToPDF(IEnumerable <Tour> tourlist) { try { log.Info(String.Format("Print All Tours To PDF")); PDFMaker.MakeAllTourPDF(tourlist); } catch (Exception e) { Debug.WriteLine(e.Message); log.Info(String.Format(e.Message)); } }
//EXPORT PDF public void PrintTourDataToPDF(Tour tour) { try { log.Info(String.Format("Print Tour To PDF: {0}", tour.ID)); PDFMaker.MakeTourPDF(tour); } catch (Exception e) { Debug.WriteLine(e.Message); log.Info(String.Format(e.Message)); } }
private void Button_Click_1(object sender, RoutedEventArgs e) { if (this.SelectedEmployee != null && lv_list.SelectedItems.Count == 1) { PDFMaker.makePDF("", this.SelectedEmployee); } else if (lv_list.SelectedItems.Count >= 2) { List <Employee> emplist = new List <Employee>(); foreach (object i in lv_list.SelectedItems) { emplist.Add((Employee)i); } PDFMaker.makePDF("", emplist); } }
// 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")); }
// 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")); }
// 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")); }