public void FillFooter(InDesign.Document reportTemplate)
        {
            var page          = ReportGenerationHelper.GetPageByNumber(reportTemplate, 1);
            var footerContent = $"{PageStrings.OrganizationNameText}, {string.Format(PageStrings.DateDisplayDataFormat, DateTime.Today)}";

            ReportGenerationHelper.SetNewContentInTextFrame(page, 5, footerContent);
        }
        public void FillHeader(InDesign.Document reportTemplate)
        {
            var page          = ReportGenerationHelper.GetPageByNumber(reportTemplate, 1);
            var headerContent = PageStrings.OrganizationNameText;

            ReportGenerationHelper.SetNewContentInTextFrame(page, 10, headerContent);
        }
        private void FillTotalPrice(InDesign.Page page)
        {
            var totalPrice        = currentProvidedServices.Sum(ps => ps.TotalPrice);
            var totalPriceContent = string.Format(PageStrings.MoneyDisplayDataFormat, totalPrice);

            ReportGenerationHelper.SetNewContentInTextFrame(page, 4, totalPriceContent);
        }
        public void InitModel()
        {
            ReportModel m = ReportGenerationHelper.CreateModel(reportName, false);

            Assert.AreEqual(reportName, m.ReportSettings.ReportName);
            Assert.AreEqual(1, m.ReportSettings.AvailableFieldsCollection.Count);
            Assert.AreEqual(GlobalEnums.ReportType.DataReport, m.ReportSettings.ReportType);
        }
        private void FillMainReportInfo(InDesign.Document reportTemplate)
        {
            var page = ReportGenerationHelper.GetPageByNumber(reportTemplate, 1);

            FillClientInfo(page);
            FillProvidedServiceList(page);
            FillTotalPrice(page);
            FillServiceDate(page);
        }
        public void SortColumCollection_Sorting_Should_Set()
        {
            ReportModel m  = ReportGenerationHelper.CreateModel(reportName, false);
            var         rs = m.ReportSettings;

            SortColumn gc = new SortColumn("GroupItem", ListSortDirection.Ascending);

            rs.SortColumnsCollection.Add(gc);

            Assert.AreEqual(rs.SortColumnsCollection.Count, 1);
        }
        public void CanAddGroupColumn()
        {
            ReportModel m  = ReportGenerationHelper.CreateModel(reportName, false);
            var         rs = m.ReportSettings;

            GroupColumn gc = new GroupColumn("GroupItem", 1, ListSortDirection.Ascending);

            rs.GroupColumnsCollection.Add(gc);

            Assert.AreEqual(rs.GroupColumnsCollection.Count, 1);
        }
        public void SortColumnCollection_Should_Empty()
        {
            ReportModel m = ReportGenerationHelper.CreateModel(reportName, false);

            Assert.That(m.ReportSettings.SortColumnsCollection, Is.Empty);
        }
        public void Datamodel_Should_PushModel()
        {
            ReportModel m = ReportGenerationHelper.CreateModel(reportName, false);

            Assert.AreEqual(GlobalEnums.PushPullModel.PushData, m.ReportSettings.DataModel);
        }
 public void Init()
 {
     this.reportModel = ReportGenerationHelper.CreateModel(reportName, false);
 }
Beispiel #11
0
        public void Init()
        {
            bool createGrouping = true;

            this.reportModel = ReportGenerationHelper.CreateModel(reportName, createGrouping);
        }
        private void FillProvidedServiceList(InDesign.Page page)
        {
            var reportRows = ReportGenerationHelper.ConvertCollectionToContentView(currentProvidedServices);

            ReportGenerationHelper.SetNewContentInTextFrame(page, 6, reportRows);
        }
        private void FillClientInfo(InDesign.Page page)
        {
            var clientNameContent = currentClient.Person;

            ReportGenerationHelper.SetNewContentInTextFrame(page, 8, clientNameContent);
        }
        private void FillServiceDate(InDesign.Page page)
        {
            var serviceDateContent = string.Format(PageStrings.DateDisplayDataFormat, currentServiceDate);

            ReportGenerationHelper.SetNewContentInTextFrame(page, 3, serviceDateContent);
        }