Esempio n. 1
0
        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);
            }
        }
Esempio n. 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);
        }
Esempio n. 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);
        }