This commit is contained in:
skidoodle 2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View file

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using Kreta.Core.ConnectionType;
namespace Kreta.BusinessLogic.Helpers.Nyomtatvanyok.Excel
{
public abstract class BaseNyomtatvanyExcelWithDataSet : BaseNyomtatvanyExcel
{
public BaseNyomtatvanyExcelWithDataSet(IConnectionType connectionType, bool isMultisheetExcel) : base(connectionType, isMultisheetExcel)
{
}
public abstract void CreateSheet(DataSet ds, int osztalyId, int sheetIndex = 1);
public MemoryStream ExcelNyomtatas(DataSet ds, int osztalyId)
{
if (!isMultisheetExcel)
{
if (ExcelPackage.Workbook.Worksheets.Count > 0)
{
GenerateNewExcelPackage();
SetWorkbookProperties();
}
CreateSheet(ds, osztalyId);
}
return ExcelNyomtatas();
}
public override void CreateSheet(Dictionary<string, string> dbParameters, int sheetIndex = 1)
{
throw new ApplicationException("DataSet alapúnál ez nem használható");
}
}
}