Exemplo n.º 1
0
        private ConfigurarPlanilhaResponseViewModel ConfigurarPlanilha(string caminhoPlanilha)
        {
            ConfigurarPlanilhaResponseViewModel vm;

            try
            {
                _excelService = new ExcelService(caminhoPlanilha);
                IExcelService _excelServiceAD = new ExcelService(@"..\..\Resources\ad.xlsx");

                _ADService = new ADService(_excelServiceAD);
                var email = _authService.GetLoggedUser();
                var configurarPlanilhaRequestUseCase = new ConfigurarPlanilhaInteractor(_excelService, _ADService);
                var ConfigurarPlanilhaRequestMessage = new ConfigurarPlanilhaRequestMessage(email, "Horários");
                var responseMessage = configurarPlanilhaRequestUseCase.Handle(ConfigurarPlanilhaRequestMessage);
                var configurarPlanilhaResponsePresenter = new ConfigurarPlanilhaResponsePresenter();
                vm = configurarPlanilhaResponsePresenter.Handle(responseMessage);
            }
            catch (IOException ex)
            {
                vm = new ConfigurarPlanilhaResponseViewModel(false, "Feche a planilha de controle de ponto antes de iniciar o programa");
            }
            catch (Exception ex)
            {
                vm = new ConfigurarPlanilhaResponseViewModel(false, ex.Message);
            }

            return(vm);
        }
 public EnviarPontoInteractor(IPontoRepository pontoRepository, IExcelService excelService, IPlanilhaRepository planilhaRepository, IADService aDService)
 {
     _pontoRepository    = pontoRepository;
     _excelService       = excelService;
     _planilhaRepository = planilhaRepository;
     _aDService          = aDService;
 }
Exemplo n.º 3
0
 public ExtrairCalculoInteractor(IExcelService excelService, IPontoRepository pontoRepository, IPlanilhaRepository planilhaRepository, IADService aDService)
 {
     _excelService       = excelService;
     _pontoRepository    = pontoRepository;
     _planilhaRepository = planilhaRepository;
     _aDService          = aDService;
 }
 public EnviarPlanilhasInteractor(IADService aDService, IExcelService excelService, IPlanilhaRepository planilhaRepository, IEmailService emailservice)
 {
     _aDService          = aDService;
     _excelService       = excelService;
     _planilhaRepository = planilhaRepository;
     _emailService       = emailservice;
 }
Exemplo n.º 5
0
 public AuthenticationService(IADService adService, UserService userService, SearchService searchService,
                              DepartmentService departmentService, ILogger <AuthenticationService> logger)
 {
     this.adService         = adService;
     this.userService       = userService;
     this.searchService     = searchService;
     this.departmentService = departmentService;
     this.logger            = logger;
 }
Exemplo n.º 6
0
 public EmployeeController(UserService userService, SystemService systemSerivce, IADService adService,
                           AuditLogService auditLog, IMapper mapper, ILogger <EmployeeController> logger)
 {
     _userService   = userService;
     _systemService = systemSerivce;
     _adService     = adService;
     _auditLog      = auditLog;
     _mapper        = mapper;
     _logger        = logger;
 }
Exemplo n.º 7
0
 public ChapterController(IBookService bookService, IChapterService chapterService, IRecommendService recommendService, IBookmarkService bookmarkService, IExtendChapterService extendChapterService, IADService adService, IOrderService orderService)
 {
     _bookService          = bookService;
     _chapterService       = chapterService;
     _recommendService     = recommendService;
     _bookmarkService      = bookmarkService;
     _extendChapterService = extendChapterService;
     _adService            = adService;
     _orderService         = orderService;
 }
Exemplo n.º 8
0
 public HomeController(IRecommendService recommendService, IADService adService, IPackageService packageService, IBookService bookService, IPromotionLinkService promotionLinkService, INovelPromotionChannelService novelPromotionChannelService, IChapterService chapterService, IUsersService usersService)
 {
     _recommendService             = recommendService;
     _adService                    = adService;
     _packageService               = packageService;
     _bookService                  = bookService;
     _promotionLinkService         = promotionLinkService;
     _novelPromotionChannelService = novelPromotionChannelService;
     _chapterService               = chapterService;
     _usersService                 = usersService;
 }
Exemplo n.º 9
0
        private void InitializeServices()
        {
            _excelService = new ExcelService(@"..\..\Resources\controle_ponto.xlsm");
            IExcelService excelADService = new ExcelService(@"..\..\Resources\ad.xlsx");

            _aDService          = new ADService(excelADService);
            _planilhaRepository = new PlanilhaRepository(@"C:\Ponto", @"C:\Ponto");
            _emailService       = new EmailEngine();
            _pontoRepository    = new PontoRepository();
            Directory.CreateDirectory(@"C:\Ponto\Recebidos");
        }
Exemplo n.º 10
0
 public ReviewController(IADService adService, UserService userService, RequestService requestService, SystemService systemService,
                         OrganizationService organizationService, AuditLogService auditLog, IAuthorizationService authService,
                         IFluentEmail email, EmailHelper emailHelper, ILogger <ReviewController> logger)
 {
     _adService           = adService;
     _userService         = userService;
     _requestService      = requestService;
     _systemService       = systemService;
     _organizationService = organizationService;
     _auditLog            = auditLog;
     _authService         = authService;
     _email       = email;
     _emailHelper = emailHelper;
     _logger      = logger;
 }
Exemplo n.º 11
0
        public List <ADUserAddGroupsViewModel> GetViewModelList(IADService service, string userSamAccount)
        {
            List <ADBase> userGroups = null;
            var           query      = service.FindUserGroups(userSamAccount);

            if (query.Success)
            {
                userGroups = query.Value;
            }

            List <ADGroup> allgroup = null;
            var            query2   = service.FindALLGroup();

            if (query2.Success)
            {
                allgroup = query2.Value;
            }

            var list = new List <ADUserAddGroupsViewModel>();

            if (userGroups != null && allgroup != null)
            {
                foreach (var g in allgroup)
                {
                    if (userGroups.Any(u => u.SamAccountName == g.SamAccountName))
                    {
                        list.Add(new ADUserAddGroupsViewModel {
                            GroupName = g.SamAccountName, IsCheck = true, UserSamAccount = userSamAccount
                        });
                    }
                    else
                    {
                        list.Add(new ADUserAddGroupsViewModel {
                            GroupName = g.SamAccountName, IsCheck = false, UserSamAccount = userSamAccount
                        });
                    }
                }
            }

            return(list);
        }
Exemplo n.º 12
0
 public AdController(IADService aDService,
                     IUserService userService)
 {
     _aDService   = aDService;
     _userService = userService;
 }
Exemplo n.º 13
0
 public CartoonController(IADService adService, IBookService bookService, IRecommendService recommendService)
 {
     _adService        = adService;
     _bookService      = bookService;
     _recommendService = recommendService;
 }
Exemplo n.º 14
0
 public HomeController(IADService mongoService)
 {
     _mongoService = mongoService;
 }
Exemplo n.º 15
0
 public HomeController(ILogger <HomeController> logger, IADToolsService toolsService)
 {
     _logger    = logger;
     _adService = toolsService.ADService;
 }
Exemplo n.º 16
0
 public ADServiceTests(ADServiceFixture fixture)
 {
     _adService = fixture.ADService;
     _username  = fixture.Configuration.GetValue <string>("ActiveDirectory:Username");
     _password  = fixture.Configuration.GetValue <string>("ActiveDirectory:Password");
 }
 public ConfigurarPlanilhaInteractor(IExcelService excelService, IADService aDService)
 {
     _excelService = excelService;
     _aDService    = aDService;
 }
Exemplo n.º 18
0
 public AccountController(IADService adService, UserService userService, ILogger <AccountController> logger)
 {
     _adService   = adService;
     _userService = userService;
     _logger      = logger;
 }
Exemplo n.º 19
0
 public ADManageController(IADToolsService service)
 {
     _adService = service.ADService;
 }
 public ExtrairColaboradoresPendentesInteractor(IExcelService excelService, IPlanilhaRepository planilhaRepository, IADService aDService)
 {
     _excelService       = excelService;
     _planilhaRepository = planilhaRepository;
     _aDService          = aDService;
 }
Exemplo n.º 21
0
 public LoginController(IADToolsService toolsService, IConfiguration configuration)
 {
     _adService     = toolsService.ADService;
     _configuration = configuration;
 }