Exemple #1
0
        public npoiTest()
        {
            var provider = Ioc.AddNpoiExcelService();

            exportService      = provider.GetService <IExcelExportService <IWorkbook> >();
            excelImportService = provider.GetService <IExcelImportService <IWorkbook> >();
            workbookBuilder    = provider.GetService <IWorkbookBuilder <IWorkbook> >();
        }
Exemple #2
0
        public spireExcelTest()
        {
            var provider = Ioc.AddSpireExcelService();

            workbookBuilder    = provider.GetService <IWorkbookBuilder <Workbook> >();
            excelImportService = provider.GetService <IExcelImportService <Workbook> >();
            exportService      = provider.GetService <IExcelExportService <Workbook> >();
        }
Exemple #3
0
 /// <summary>
 /// 初始化一个<see cref="TestBase"/>类型的实例
 /// </summary>
 public TestBase(ITestOutputHelper output)
 {
     Output = output;
     _excelImportProvider = new ExcelImportProvider();
     _excelImportService  = new ExcelImportService(_excelImportProvider);
     _excelExportProvider = new ExcelExportProvider();
     _excelExportService  = new ExcelExportService(_excelExportProvider);
 }
Exemple #4
0
        public excelTest()
        {
            var provider = Ioc.AddCExcelService();

            exportService      = provider.GetService <IExcelExportService <ExcelPackage> >();
            excelImportService = provider.GetService <IExcelImportService <ExcelPackage> >();
            workbookBuilder    = provider.GetService <IWorkbookBuilder <ExcelPackage> >();
        }
        public ExcelImportController(IExcelImportService excelImporter)
        {
            if (excelImporter == null)
            {
                throw new ArgumentNullException("excelImporter");
            }

            this.excelImporter = excelImporter;
        }
        public ExcelImportController(IExcelImportService excelImporter)
        {
            if (excelImporter == null)
            {
                throw new ArgumentNullException("excelImporter");
            }

            this.excelImporter = excelImporter;
        }
        public ExcelImportServiceTest()
        {
            _excelImportService = _excelImportService.Resolve();

            string curDir  = Environment.CurrentDirectory;
            string fileUrl = Path.Combine(curDir, "Resources", "CarImport.xlsx");

            _rows = _excelImportService.ValidateAsync <ExcelCarTemplateDTO>(new ImportOption()
            {
                FileUrl = fileUrl
            }).Result;
        }
Exemple #8
0
        public PerformanceTest()
        {
            _excelImportService = _excelImportService.Resolve();
            _excelExportService = _excelExportService.Resolve();

            _rows = DataLib.GetExcelDataRows(rowsCount, 10);

            var performance = new PerformanceTestDTO();

            for (int i = 0; i < rowsCount; i++)
            {
                _datas.Add(performance);
            }
        }
Exemple #9
0
        public MainViewModel(IDocumentStoreFactory documentStoreFactory, IDispatcher dispatcher, IMessageDialogService messageDialogService, IExcelImportService excelImportService, IExcelExportService excelExportService)
        {
            _documentStoreFactory = documentStoreFactory;
            _dispatcher           = dispatcher;
            _messageDialogService = messageDialogService;
            _excelImportService   = excelImportService;
            _excelExportService   = excelExportService;

            NewCommand               = new RelayCommand(CreateNewPerson);
            SaveCommand              = new RelayCommand(SaveSelectedPerson, CanSaveSelectedPerson);
            DeleteCommand            = new RelayCommand(DeleteSelectedPerson, CanDeleteSelectedPerson);
            RevertCommand            = new RelayCommand(RevertChanges, CanRevertChanges);
            ImportCommand            = new RelayCommand(ImportPersons);
            ExportCommand            = new RelayCommand(ExportPersons);
            PrintPersonDetailCommand = new RelayCommand(PrintPersonDetail);
            ToggleFilter             = new RelayCommand(TogglePersonsFilter, CanTogglePersonsFilter);

            InitializePersons();
        }
Exemple #10
0
 private void InitiliazeService()
 {
     _excelImportService = new ExcelImportService(_documentStoreFactory);
 }
Exemple #11
0
 /// <summary>
 /// 初始化一个<see cref="TestBase"/>类型的实例
 /// </summary>
 public ExcelImportServiceTest(ITestOutputHelper output)
 {
     Output         = output;
     ImportProvider = new ExcelImportProvider();
     ImportService  = new ExcelImportService(ImportProvider);
 }
Exemple #12
0
 public FormisImportController(IExcelImportService excelImportService)
 {
     _excelImportService = excelImportService;
 }
Exemple #13
0
 public BugFixesTest()
 {
     _excelImportService = _excelImportService.Resolve();
 }
Exemple #14
0
 public OfficeService(IExcelExportService excelExportService, IExcelImportService excelImportService)
 {
     _excelExportService = excelExportService;
     _excelImportService = excelImportService;
 }
Exemple #15
0
 public ExcelProvider(IExcelExportService <ExcelPackage> excelExportService, IExcelImportService <ExcelPackage> excelImportService)
 {
     _excelExportService = excelExportService;
     _excelImportService = excelImportService;
 }
 public NpoiExcelProvider(IExcelExportService <IWorkbook> excelExportService, IExcelImportService <IWorkbook> excelImportService)
 {
     _excelExportService = excelExportService;
     _excelImportService = excelImportService;
 }
 public SpireExcelProvider(IExcelExportService <Workbook> excelExportService, IExcelImportService <Workbook> excelImportService)
 {
     _excelExportService = excelExportService;
     _excelImportService = excelImportService;
 }
Exemple #18
0
 public TemplateImportController(IExcelImportService excelImportService)
 {
     _excelImportService = excelImportService;
 }