Example #1
0
        protected override void SetListData(ISheet sheet)
        {
            if (base.defineLocation == null)
            {
                throw new NoExportHeadException("请先设置表头");
            }
            int rowStartIndex = base.RowStartIndex;

            foreach (TEntity local in this.DataSource)
            {
                IRow         row    = sheet.CreateRow(rowStartIndex);
                ExportHelper helper = new ExportHelper(base.CurWorkBook, row, base.defineLocation);
                OnRowExportEventArgs <TEntity> e = new OnRowExportEventArgs <TEntity>(rowStartIndex, local)
                {
                    helper = helper
                };
                this.OnRowExport(e);
                rowStartIndex++;
            }
        }
Example #2
0
 protected virtual void OnRowExport(OnRowExportEventArgs <TEntity> e)
 {
     e.Raise <OnRowExportEventArgs <TEntity> >(this, ref this.RowExport);
 }