コード例 #1
0
 ////
 // GET: /Home/
 public ActionResult Index()
 {
     //ViewData["Message"] = "Press Button to download report (pdf)";
     //return View();
     ArticleExample AE = new ArticleExample();
     AE.Test(false, "D:\\Rsc\\ReportPdfFileWriter\\ReportPdfFileWriter\\ReportPdfFileWriter\\ReportPdfFileWriterWeeklyReportpdf.pdf");
     return View();
 }
コード例 #2
0
        ////////////////////////////////////////////////////////////////////
        // Article example
        ////////////////////////////////////////////////////////////////////

        private void OnArticleExample
        (
            object sender,
            EventArgs e
        )
        {
            ExceptionReport.Wrap("PDF Document creation falied", delegate {
                ArticleExample AE = new ArticleExample();
                AE.Test(DebugCheckBox.Checked, "ArticleExample.pdf");
                return;
            });
        }
コード例 #3
0
        ////////////////////////////////////////////////////////////////////
        // Article example
        ////////////////////////////////////////////////////////////////////

        private void OnArticleExample
        (
            object sender,
            EventArgs e
        )
        {
            try
            {
                ArticleExample AE = new ArticleExample();
                AE.Test(DebugCheckBox.Checked, "ArticleExample.pdf");
                return;
            }

            catch (Exception Ex)
            {
                // error exit
                String[] ExceptionStack = ExceptionReport.GetMessageAndStack(Ex);
                MessageBox.Show(this, "PDF Document creation falied\n" + ExceptionStack[0] + "\n" + ExceptionStack[1],
                                "PDFDocument Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
        }
コード例 #4
0
        private void OnArticleExample(object sender, RoutedEventArgs e)
        {
            ArticleExample Example = new ArticleExample();

            Example.Test(false, "ArticleExample.pdf");
        }