public static CollegeCdmaExcelImporter ImportCdmaInfos(this HttpPostedFileBase cdmaFileBase) { return cdmaFileBase.ImportInfo(x => { IValueImportable importer = new ExcelBtsImportRepository<CollegeBtsExcel>(x, t => new CollegeBtsExcel(t)); importer.Import(); List<CollegeBtsExcel> btsExcels = (importer as ExcelBtsImportRepository<CollegeBtsExcel>).BtsExcelList; importer = new ExcelCellImportRepository<CollegeCdmaCellExcel>(x, t => new CollegeCdmaCellExcel(t)); importer.Import(); List<CollegeCdmaCellExcel> cellExcels = (importer as ExcelCellImportRepository<CollegeCdmaCellExcel>).CellExcelList; importer = new ExcelDistributionImportRepository<CollegeIndoorExcel>(x, t => new CollegeIndoorExcel(t)); importer.Import(); List<CollegeIndoorExcel> indoorExcels = (importer as ExcelDistributionImportRepository<CollegeIndoorExcel>).DistributionExcelList; return new CollegeCdmaExcelImporter { BtsExcels = btsExcels, CellExcels = cellExcels, IndoorExcels = indoorExcels }; }, "3G"); }
public static CollegeLteExcelModel ImportLteInfos(this HttpPostedFileBase lteFileBase) { return(lteFileBase.ImportInfo(x => { IValueImportable importer = new ExcelBtsImportRepository <CollegeENodebExcel>(x, t => new CollegeENodebExcel(t)); importer.Import(); List <CollegeENodebExcel> btsExcels = (importer as ExcelBtsImportRepository <CollegeENodebExcel>).BtsExcelList; importer = new ExcelCellImportRepository <CollegeCellExcel>(x, t => new CollegeCellExcel(t)); importer.Import(); List <CollegeCellExcel> cellExcels = (importer as ExcelCellImportRepository <CollegeCellExcel>).CellExcelList; importer = new ExcelDistributionImportRepository <CollegeIndoorExcel>(x, t => new CollegeIndoorExcel(t)); importer.Import(); List <CollegeIndoorExcel> indoorExcels = (importer as ExcelDistributionImportRepository <CollegeIndoorExcel>).DistributionExcelList; return new CollegeLteExcelModel { BtsExcels = btsExcels, CellExcels = cellExcels, IndoorExcels = indoorExcels }; }, "4G")); }
public static CollegeCdmaExcelImporter ImportCdmaInfos(this HttpPostedFileBase cdmaFileBase) { return(cdmaFileBase.ImportInfo(x => { IValueImportable importer = new ExcelBtsImportRepository <CollegeBtsExcel>(x, t => new CollegeBtsExcel(t)); importer.Import(); List <CollegeBtsExcel> btsExcels = (importer as ExcelBtsImportRepository <CollegeBtsExcel>).BtsExcelList; importer = new ExcelCellImportRepository <CollegeCdmaCellExcel>(x, t => new CollegeCdmaCellExcel(t)); importer.Import(); List <CollegeCdmaCellExcel> cellExcels = (importer as ExcelCellImportRepository <CollegeCdmaCellExcel>).CellExcelList; importer = new ExcelDistributionImportRepository <CollegeIndoorExcel>(x, t => new CollegeIndoorExcel(t)); importer.Import(); List <CollegeIndoorExcel> indoorExcels = (importer as ExcelDistributionImportRepository <CollegeIndoorExcel>).DistributionExcelList; return new CollegeCdmaExcelImporter { BtsExcels = btsExcels, CellExcels = cellExcels, IndoorExcels = indoorExcels }; }, "3G")); }
public override void Import(ImportedFileInfo[] validFileInfos) { if (validFileInfos.Length == 0) { MessageBox.Show("\n请先选择恰当的" + FileType + "!"); } IValueImportable importer = new ExcelBtsImportRepository <ENodebExcel>(validFileInfos[0].FilePath, x => new ENodebExcel(x)); importer.Import(); _btsExcelList = (importer as ExcelBtsImportRepository <ENodebExcel>).BtsExcelList; importer = new ExcelCellImportRepository <CellExcel>(validFileInfos[0].FilePath, x => new CellExcel(x)); importer.Import(); _cellExcelList = (importer as ExcelCellImportRepository <CellExcel>).CellExcelList; FinishValidFilesStateService fileService = new FinishValidFilesStateService(validFileInfos); fileService.Finish(); MessageBox.Show("\n读取" + FileType + "成功!"); }
public static CollegeLteExcelModel ImportLteInfos(this HttpPostedFileBase lteFileBase) { return lteFileBase.ImportInfo(x => { IValueImportable importer = new ExcelBtsImportRepository<CollegeENodebExcel>(x, t => new CollegeENodebExcel(t)); importer.Import(); List<CollegeENodebExcel> btsExcels = (importer as ExcelBtsImportRepository<CollegeENodebExcel>).BtsExcelList; importer = new ExcelCellImportRepository<CollegeCellExcel>(x, t => new CollegeCellExcel(t)); importer.Import(); List<CollegeCellExcel> cellExcels = (importer as ExcelCellImportRepository<CollegeCellExcel>).CellExcelList; importer = new ExcelDistributionImportRepository<CollegeIndoorExcel>(x, t => new CollegeIndoorExcel(t)); importer.Import(); List<CollegeIndoorExcel> indoorExcels = (importer as ExcelDistributionImportRepository<CollegeIndoorExcel>).DistributionExcelList; return new CollegeLteExcelModel { BtsExcels = btsExcels, CellExcels = cellExcels, IndoorExcels = indoorExcels }; }, "4G"); }