Exemplo n.º 1
0
        public ControlsViewModel(IFileService fileService, IExcelExportService excelExportService)
        {
            _fileService        = fileService;
            _excelExportService = excelExportService;

            PropertyChanged += OnPropertyChanged;
        }
Exemplo n.º 2
0
 public FineApi(
     IRepository<User, UserDataModel, Guid> userRepository,
     IRepository<Payment, PaymentDataModel, Guid> paymentRepository,
     IFineMapper fineMapper,
     IUserMapper userMapper,
     IPaymentMapper paymentMapper,
     IExcelExportService<FineExportModel> excelExportService, 
     IChannelApi channelApi, 
     IUserApi userApi, 
     IGroupsApi groupApi, 
     IChatApi chatApi, 
     IReactionApi reactionApi)
 {
     this.userRepository = userRepository;
     this.paymentRepository = paymentRepository;
     this.fineMapper = fineMapper;
     this.userMapper = userMapper;
     this.paymentMapper = paymentMapper;
     this.excelExportService = excelExportService;
     this.channelApi = channelApi;
     this.userApi = userApi;
     this.groupApi = groupApi;
     this.chatApi = chatApi;
     this.reactionApi = reactionApi;
 }
Exemplo n.º 3
0
        public ReportServiceTests()
        {
            _nyssContextMock = Substitute.For <INyssContext>();

            _config = Substitute.For <INyssWebConfig>();
            _config.PaginationRowsPerPage.Returns(_rowsPerPage);

            _userService = Substitute.For <IUserService>();
            _userService.GetUserApplicationLanguageCode(Arg.Any <string>()).Returns(Task.FromResult("en"));

            _projectService = Substitute.For <IProjectService>();
            _projectService.GetHealthRiskNames(Arg.Any <int>(), Arg.Any <List <HealthRiskType> >()).Returns(Task.FromResult(Enumerable.Empty <HealthRiskDto>()));

            _authorizationService = Substitute.For <IAuthorizationService>();
            _authorizationService.GetCurrentUserName().Returns((string)null);

            _excelExportService      = Substitute.For <IExcelExportService>();
            _stringsResourcesService = Substitute.For <IStringsResourcesService>();

            _dateTimeProvider = Substitute.For <IDateTimeProvider>();

            _reportService = new ReportService(_nyssContextMock, _userService, _projectService, _config, _authorizationService, _excelExportService, _stringsResourcesService, _dateTimeProvider);

            _authorizationService.IsCurrentUserInRole(Role.Supervisor).Returns(false);
            _authorizationService.GetCurrentUserName().Returns("*****@*****.**");
            ArrangeData();
        }
Exemplo n.º 4
0
 /// <summary>
 /// 初始化一个<see cref="ExcelExportProcess{TEntity}"/>类型的实例
 /// </summary>
 /// <param name="excelExportService">Excel导出服务</param>
 /// <param name="options">导出选项配置</param>
 /// <param name="func">导出函数事件</param>
 /// <param name="condition">查询条件</param>
 public ExcelExportProcess(IExcelExportService excelExportService, IExportOptions <TEntity> options, GetExportDataEventAsync <TEntity> func, object condition)
 {
     _excelExportService = excelExportService ?? throw new ArgumentNullException(nameof(excelExportService));
     _options            = options ?? throw new ArgumentNullException(nameof(options));
     _func      = func;
     _condition = condition;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="excelExportService">Excel export service</param>
 /// <param name="actionTimer">Action timer</param>
 /// <param name="graphBuilder">Graph builder</param>
 /// <param name="logger">The logger</param>
 public HarmonySearchTester(IExcelExportService excelExportService, IActionTimer actionTimer, IGraphBuilder graphBuilder, ILogger <HarmonySearchTester> logger)
 {
     _excelExportService = excelExportService ?? throw new ArgumentNullException(nameof(excelExportService));
     _actionTimer        = actionTimer ?? throw new ArgumentNullException(nameof(actionTimer));
     _graphBuilder       = graphBuilder ?? throw new ArgumentNullException(nameof(graphBuilder));
     _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Exemplo n.º 6
0
 public BeehiveController(
     IApiaryService apiaryService,
     IApiaryHelperService apiaryHelperService,
     UserManager <ApplicationUser> userManager,
     IBeehiveHelperService beehiveHelperService,
     IBeehiveService beehiveService,
     IQueenService queenService,
     IHarvestService harvestService,
     ITreatmentService treatmentService,
     IInspectionService inspectionService,
     IQueenHelperService queenHelperService,
     IExcelExportService excelExportService,
     ITemporaryApiaryBeehiveService temporaryApiaryBeehiveService,
     IBeehiveMarkFlagService beehiveMarkFlagService)
 {
     this.apiaryService                 = apiaryService;
     this.apiaryHelperService           = apiaryHelperService;
     this.userManager                   = userManager;
     this.beehiveHelperService          = beehiveHelperService;
     this.beehiveService                = beehiveService;
     this.queenService                  = queenService;
     this.harvestService                = harvestService;
     this.treatmentService              = treatmentService;
     this.inspectionService             = inspectionService;
     this.queenHelperService            = queenHelperService;
     this.excelExportService            = excelExportService;
     this.temporaryApiaryBeehiveService = temporaryApiaryBeehiveService;
     this.beehiveMarkFlagService        = beehiveMarkFlagService;
 }
Exemplo n.º 7
0
        public npoiTest()
        {
            var provider = Ioc.AddNpoiExcelService();

            exportService      = provider.GetService <IExcelExportService <IWorkbook> >();
            excelImportService = provider.GetService <IExcelImportService <IWorkbook> >();
            workbookBuilder    = provider.GetService <IWorkbookBuilder <IWorkbook> >();
        }
Exemplo n.º 8
0
        public excelTest()
        {
            var provider = Ioc.AddCExcelService();

            exportService      = provider.GetService <IExcelExportService <ExcelPackage> >();
            excelImportService = provider.GetService <IExcelImportService <ExcelPackage> >();
            workbookBuilder    = provider.GetService <IWorkbookBuilder <ExcelPackage> >();
        }
Exemplo n.º 9
0
        public spireExcelTest()
        {
            var provider = Ioc.AddSpireExcelService();

            workbookBuilder    = provider.GetService <IWorkbookBuilder <Workbook> >();
            excelImportService = provider.GetService <IExcelImportService <Workbook> >();
            exportService      = provider.GetService <IExcelExportService <Workbook> >();
        }
Exemplo n.º 10
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);
 }
Exemplo n.º 11
0
 public ProductsController(
     IImageStorageService imageStorageService,
     IProductsServiceClient productsServiceClient,
     IExcelExportService excelExportService)
 {
     _imageStorageService   = imageStorageService;
     _productsServiceClient = productsServiceClient;
     _excelExportService    = excelExportService;
 }
Exemplo n.º 12
0
 public DataCollectorExportService(
     INyssContext nyssContext,
     IExcelExportService excelExportService,
     IStringsResourcesService stringsResourcesService,
     IAuthorizationService authorizationService)
 {
     _nyssContext             = nyssContext;
     _excelExportService      = excelExportService;
     _stringsResourcesService = stringsResourcesService;
     _authorizationService    = authorizationService;
 }
Exemplo n.º 13
0
 public ReportService(INyssContext nyssContext, IUserService userService, IProjectService projectService, INyssWebConfig config, IAuthorizationService authorizationService,
                      IExcelExportService excelExportService, IStringsResourcesService stringsResourcesService, IDateTimeProvider dateTimeProvider)
 {
     _nyssContext             = nyssContext;
     _userService             = userService;
     _projectService          = projectService;
     _config                  = config;
     _authorizationService    = authorizationService;
     _excelExportService      = excelExportService;
     _stringsResourcesService = stringsResourcesService;
     _dateTimeProvider        = dateTimeProvider;
 }
Exemplo n.º 14
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);
            }
        }
Exemplo n.º 15
0
 public HarvestController(
     UserManager<ApplicationUser> userManager,
     IHarvestService harvestService,
     IApiaryService apiaryService,
     IBeehiveService beehiveService,
     IExcelExportService excelExportService,
     IBeehiveHelperService beehiveHelperService)
 {
     this.userManager = userManager;
     this.harvestService = harvestService;
     this.apiaryService = apiaryService;
     this.beehiveService = beehiveService;
     this.excelExportService = excelExportService;
     this.beehiveHelperService = beehiveHelperService;
 }
Exemplo n.º 16
0
 public TreatmentController(
     UserManager <ApplicationUser> userManager,
     ITreatmentService treatmentService,
     IApiaryService apiaryService,
     IBeehiveService beehiveService,
     IExcelExportService excelExportService,
     IBeehiveHelperService beehiveHelperService)
 {
     this.userManager          = userManager;
     this.treatmentService     = treatmentService;
     this.apiaryService        = apiaryService;
     this.beehiveService       = beehiveService;
     this.excelExportService   = excelExportService;
     this.beehiveHelperService = beehiveHelperService;
 }
Exemplo n.º 17
0
 public TransactionController(
     IHttpContextAccessor httpContextAccessor,
     ICategoryService categoryService,
     ITransactionService transactionService,
     IAccountService accountService,
     IGoalService goalService,
     IAutoOperationsService autoOperationsService,
     IExcelExportService excelExportService
     )
 {
     _httpContextAccessor   = httpContextAccessor;
     _categoryService       = categoryService;
     _transactionService    = transactionService;
     _accountService        = accountService;
     _goalService           = goalService;
     _autoOperationsService = autoOperationsService;
     _excelExportService    = excelExportService;
 }
Exemplo n.º 18
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();
        }
Exemplo n.º 19
0
 public InspectionController(
     IInspectionService inspectionService,
     IBeehiveService beehiveService,
     IApiaryService apiaryService,
     IForecastService forecastService,
     IConfiguration configuration,
     IExcelExportService excelExportService,
     IBeehiveHelperService beehiveHelperService,
     UserManager <ApplicationUser> userManager)
 {
     this.inspectionService    = inspectionService;
     this.beehiveService       = beehiveService;
     this.apiaryService        = apiaryService;
     this.forecastService      = forecastService;
     this.configuration        = configuration;
     this.excelExportService   = excelExportService;
     this.beehiveHelperService = beehiveHelperService;
     this.userManager          = userManager;
 }
Exemplo n.º 20
0
 public ApiaryController(
     UserManager <ApplicationUser> userManager,
     IApiaryService apiaryService,
     IBeehiveService beehiveService,
     IApiaryNumberService apiaryNumberService,
     IConfiguration configuration,
     IForecastService forecastService,
     IApiaryHelperService apiaryHelperService,
     IBeehiveHelperService beehiveHelperService,
     ITemporaryApiaryBeehiveService temporaryApiaryBeehiveService,
     IExcelExportService excelExportService)
 {
     this.userManager                   = userManager;
     this.apiaryService                 = apiaryService;
     this.beehiveService                = beehiveService;
     this.apiaryNumberService           = apiaryNumberService;
     this.configuration                 = configuration;
     this.forecastService               = forecastService;
     this.apiaryHelperService           = apiaryHelperService;
     this.beehiveHelperService          = beehiveHelperService;
     this.temporaryApiaryBeehiveService = temporaryApiaryBeehiveService;
     this.excelExportService            = excelExportService;
 }
Exemplo n.º 21
0
 public NpoiExcelProvider(IExcelExportService <IWorkbook> excelExportService, IExcelImportService <IWorkbook> excelImportService)
 {
     _excelExportService = excelExportService;
     _excelImportService = excelImportService;
 }
Exemplo n.º 22
0
 public OfficeService(IExcelExportService excelExportService, IExcelImportService excelImportService)
 {
     _excelExportService = excelExportService;
     _excelImportService = excelImportService;
 }
Exemplo n.º 23
0
 /// <summary>
 /// 初始化一个<see cref="ExcelExportProcess{TEntity}"/>类型的实例
 /// </summary>
 /// <param name="excelExportService">Excel导出服务</param>
 /// <param name="options">导出选项配置</param>
 public ExcelExportProcess(IExcelExportService excelExportService, IExportOptions <TEntity> options) : this(excelExportService, options, null, null)
 {
 }
Exemplo n.º 24
0
 /// <summary>
 /// 初始化
 /// </summary>
 public ExcelExportTest(ITestOutputHelper output) : base(output)
 {
     _excelExportProvider = new ExcelExportProvider();
     _excelExportService  = new ExcelExportService(_excelExportProvider);
 }
 public ExportController(IExcelExportService excelExport, IDownloadTokenManager downloadTokenManager)
 {
     _excelExport          = excelExport;
     _downloadTokenManager = downloadTokenManager;
 }
Exemplo n.º 26
0
 public BookController(IBooksRepository booksRepository, IPdfExportService pdfExportService, IExcelExportService excelExportService)
 {
     _booksRepository    = booksRepository;
     _pdfExportService   = pdfExportService;
     _excelExportService = excelExportService;
 }
Exemplo n.º 27
0
 public SpireExcelProvider(IExcelExportService <Workbook> excelExportService, IExcelImportService <Workbook> excelImportService)
 {
     _excelExportService = excelExportService;
     _excelImportService = excelImportService;
 }
Exemplo n.º 28
0
 public ExcelExportServiceTest()
 {
     _excelExportService = _excelExportService.ResolveByServiceCollection();
 }
Exemplo n.º 29
0
 public ExcelProvider(IExcelExportService <ExcelPackage> excelExportService, IExcelImportService <ExcelPackage> excelImportService)
 {
     _excelExportService = excelExportService;
     _excelImportService = excelImportService;
 }
Exemplo n.º 30
0
 public ExcelExportServiceTest()
 {
     _excelExportService = _excelExportService.Resolve();
 }