Пример #1
0
 public ExcelDistributionImportRepository(string excelFileName, Func <IDataReader, TDistribution> EntityConstructor,
                                          string sheetName = "室分")
 {
     using (ExcelImporter excelImporter = new ExcelImporter(excelFileName, new[] { sheetName }))
     {
         using (DataTable cellTable = excelImporter[sheetName])
         {
             service = new ImportExcelValueService <TDistribution>(cellTable, EntityConstructor);
         }
     }
 }
Пример #2
0
 public ExcelBtsImportRepository(string excelFileName, Func <IDataReader, TBts> EntityConstructor,
                                 string sheetName = "基站级")
 {
     using (ExcelImporter excelImporter = new ExcelImporter(excelFileName, new[] { sheetName }))
     {
         using (DataTable eNodebTable = excelImporter[sheetName])
         {
             service = new ImportExcelValueService <TBts>(eNodebTable, EntityConstructor);
         }
     }
 }