public void CreateLookupTableSheet(XSSFWorkbook workbook, List <string> sheets)
        {
            AbstractDataExport ade = new AbstractDataExport();

            foreach (string tableId in sheets)
            {
                var       tableDetails = Repository.GetById <LookupTables>(Convert.ToInt32(tableId));
                string    query        = "SELECT * FROM lk_" + tableDetails.TableName;
                XSSFSheet sheet        = (XSSFSheet)workbook.CreateSheet(tableDetails.TableName);

                ade.CreateSheet(DynamicListFromSql(query), sheet, tableDetails.Columns);
            }
        }
Beispiel #2
0
        public void CreateCategoryMaster(XSSFWorkbook workbook)
        {
            XSSFSheet          sheet = (XSSFSheet)workbook.CreateSheet(EnumDataModel.CategoryMaster.ToString());
            AbstractDataExport ade   = new AbstractDataExport();
            var CategoryMaster       = Repository.FindBy <Organization>(o => o.IsEnvironment == true)
                                       .Select(o => new
            {
                o.Id,
                o.ShortName,
                o.LongName
            }).ToList();

            ade.CreateSheet(CategoryMaster, sheet);
        }
Beispiel #3
0
        public void CreateCatalog(XSSFWorkbook workbook)
        {
            XSSFSheet          sheet = (XSSFSheet)workbook.CreateSheet(EnumDataModel.Catalog.ToString());
            AbstractDataExport ade   = new AbstractDataExport();
            var catalog = Repository.FindBy <Organization>(o => o.IsCatalog == true)
                          .Select(o => new
            {
                o.Id,
                o.ShortName,
                o.LongName
            }).ToList();

            ade.CreateSheet(catalog, sheet);
        }