コード例 #1
0
 public override void Visit(ExportPage page)
 {
     PdfPage       = pdfDocument.AddPage();
     xGraphics     = XGraphics.FromPdfPage(PdfPage);
     textFormatter = new XTextFormatter(xGraphics);
     base.Visit(page);
 }
コード例 #2
0
        ExportContainer CreateContainerForSection(ExportPage parent, Point location)
        {
            var detail = (ExportContainer)CurrentSection.CreateExportColumn();

            detail.Location = location;
            detail.Parent   = parent;
            return(detail);
        }
コード例 #3
0
 public virtual void Visit(ExportPage page)
 {
     foreach (var element in page.ExportedItems)
     {
         var ac = element as IAcceptor;
         ac.Accept(this);
     }
 }
コード例 #4
0
 protected virtual void AddPage(ExportPage page)
 {
     if (Pages.Count == 0)
     {
         page.IsFirstPage = true;
     }
     Pages.Add(page);
 }
コード例 #5
0
        public static FixedPage CreateFixedPage(ExportPage exportPage)
        {
            var fixedPage = new FixedPage();

            fixedPage.Width      = exportPage.Size.ToWpf().Width;
            fixedPage.Height     = exportPage.Size.ToWpf().Height;
            fixedPage.Background = new SolidColorBrush(System.Drawing.Color.White.ToWpf());
            return(fixedPage);
        }
コード例 #6
0
 public override void Visit(ExportPage page)
 {
     fixedPage = FixedDocumentCreator.CreateFixedPage(page);
     FixedPage = fixedPage;
     foreach (var element in page.ExportedItems)
     {
         AsAcceptor(element).Accept(this);
         fixedPage.Children.Add(sectionCanvas);
     }
 }
コード例 #7
0
        private static ExportPage GetPageContent(DisplayResults.DisplayPage displayPage, string tableName)
        {
            ExportPage exportPage = new ExportPage();

            exportPage.Caption     = displayPage.title;
            exportPage.SubCaption  = displayPage.subtitle;
            exportPage.description = displayPage.description;
            exportPage.PageName    = displayPage.name;

            foreach (DisplayResults.DisplayPage.DisplayTable displayTable in displayPage.displayTables)
            {
                exportPage.Tables.Add(GetTableContent(displayTable, tableName));
            }

            return(exportPage);
        }
コード例 #8
0
        public void ExportUserHistory(FormCollection collection)
        {
            var    userList = MembershipUserExtended.GetFullNameUserNameList();
            string userName = collection["uname"];

            if (userList.ContainsValue(userName))
            {
                DateTime startDate;
                DateTime endDate;
                if (DateTime.TryParse(collection["startDate"], out startDate) && DateTime.TryParse(collection["endDate"], out endDate))
                {
                    var model = TimeTrackManager.GetUserTimeTrackHistoryForSpecifiedPeriod(userName, startDate, endDate);
                    //return PartialView("_GetUserHistory", model);
                    IExportPage export     = new ExportPage();
                    var         reportName = model.EmployeeName.Replace(" ", "_") + "_" + model.CustomStartEndDateDisplay.Replace(" ", "-");
                    export.ExportExcel(ExcelReportHelper.GetExcelString(model, reportName), reportName + ".xls");
                }
            }

            //return PartialView("_GetUserHistory", new CustomTimeTrack());
        }
コード例 #9
0
 public override void Visit(ExportPage page)
 {
     base.Visit(page);
 }
コード例 #10
0
 public override void Visit(ExportPage page)
 {
     evaluator.AddPageInfo(page.PageInfo);
     base.Visit(page);
 }