Exemplo n.º 1
0
        public ExcelFileDto Export(TrialBalanceDto trialBalance, TrialBalanceCommand command)
        {
            Assertion.AssertObject(trialBalance, "trialBalance");
            Assertion.AssertObject(command, "command");

            var templateUID = $"TrialBalanceTemplate.{trialBalance.Command.TrialBalanceType}";

            var templateConfig = ExcelTemplateConfig.Parse(templateUID);

            var creator = new TrialBalanceExcelFileCreator(templateConfig);

            ExcelFile excelFile = creator.CreateExcelFile(trialBalance);

            return(ExcelFileMapper.Map(excelFile));
        }
Exemplo n.º 2
0
        public ExcelFileDto Export(AccountsChartDto accountsChart,
                                   AccountsSearchCommand searchCommand)
        {
            Assertion.AssertObject(accountsChart, "accountsChart");
            Assertion.AssertObject(searchCommand, "searchCommand");

            var templateUID = $"AccountsChartTemplate";

            var templateConfig = ExcelTemplateConfig.Parse(templateUID);

            var creator = new AccountsChartExcelFileCreator(templateConfig);

            ExcelFile excelFile = creator.CreateExcelFile(accountsChart);

            return(ExcelFileMapper.Map(excelFile));
        }