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 dbParameters, int sheetIndex = 1) { throw new ApplicationException("DataSet alapúnál ez nem használható"); } } }