예제 #1
0
 public HomeController(ITimeEntryService timeEntryService, ITimesheetService timesheetService, IClockifyService clockifyService)
     : base(timeEntryService)
 {
     _timesheetService = timesheetService;
     _clockifyService  = clockifyService;
     Logger            = LogManager.GetLogger("Banner Management");
 }
        public ForecastRegistrationViewModel(ForecastRegistrationDataGenerator forecastRegistrationDataGenerator
                                             , ProjectSearchViewModel projectSearchViewModel
                                             , IForecastService forecastService
                                             , ICommonDialogs commonDialogs
                                             , SaveForecastCommandHandler saveForecastCommandHandler
                                             , ResetForecastCommandHandler resetForecastCommandHandler
                                             , CopyPreviousMonthCommandHandler copyPreviousMonthCommandHandler
                                             , ForecastTypeProvider forecastTypeProvider
                                             , ITimeEntryService timeEntryService
                                             , IAppSettings appSettings
                                             , ForecastRegistrationSelectedUserHandler selectedUserHandler)
        {
            _selectedDate   = DateTime.Now.FirstDayOfMonth();
            ForecastMonthId = 0;
            _forecastRegistrationDataGenerator = forecastRegistrationDataGenerator;
            _projectSearchViewModel            = projectSearchViewModel;
            _forecastService                 = forecastService;
            _commonDialogs                   = commonDialogs;
            _saveForecastCommandHandler      = saveForecastCommandHandler;
            _resetForecastCommandHandler     = resetForecastCommandHandler;
            _copyPreviousMonthCommandHandler = copyPreviousMonthCommandHandler;
            _forecastTypeProvider            = forecastTypeProvider;
            _timeEntryService                = timeEntryService;
            _appSettings         = appSettings;
            _selectedUserHandler = selectedUserHandler;

            _projectRegistrations.InitializeDirtyCheck();
        }
예제 #3
0
        public TimerPageViewModel(ITimeEntryService timeEntryService, IAuthService authService,
                                  IProjectService projectService, IWorkspaceService workspaceService)
        {
            _timeEntryService = timeEntryService;
            _authService      = authService;
            _projectService   = projectService;
            _workspaceService = workspaceService;

            StartTimerCommand = new DelegateCommand(async() =>
            {
                NewEntry.Start = DateTime.Now;
                Current        = await _timeEntryService.StartCurrentTimer(_newEntry);
            });

            StopTimerCommand = new DelegateCommand(async() =>
            {
                await _timeEntryService.StopCurrentTimer();
                LoadCurrentTimeEntry();
            });

            RefreshCommand = new DelegateCommand(OnNavigatedTo);

            PropertyChanged += (sender, args) =>
            {
                switch (args.PropertyName)
                {
                case nameof(Workspace):
                    LoadProjects(Task.FromResult(Workspace));
                    break;
                }
            };
        }
        public ReportScreenMasterViewModel(ITimeEntryService timeEntryService, IBusyService busyService, IConnectivityService connectivityService,
                                           ITimeEntryTypeRepository timeEntryTypeRepository, ITimeEntryRepository timeEntryRepository, IAppSettings appSettings)
        {
            _timeEntryService        = timeEntryService;
            _busyService             = busyService;
            _connectivityService     = connectivityService;
            _timeEntryTypeRepository = timeEntryTypeRepository;
            _timeEntryRepository     = timeEntryRepository;
            _appSettings             = appSettings;
            Search = new DelegateCommand <object>(ExecuteSearch);
            _busyService.ShowBusy(_reportscreenKey);
            LoadPredefinedSearchItems();
            SelectedPredefinedSearch = PredefinedSearchItems[1];
            EditTimeEntryCommand     = new DelegateCommand <object>(EditTimeEntry);
            SaveCommand = new DelegateCommand <object>(SaveCommandExecute);

            try
            {
                TimeEntryTypes = _timeEntryTypeRepository.GetGlobal();
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
            }

            TaskCommands.SaveTaskCompleted.RegisterCommand(new DelegateCommand(Reload));
            TaskCommands.SaveTaskCancelled.RegisterCommand(new DelegateCommand(Reload));

            ApplicationCommands.ConnectivityChanged.RegisterCommand(new DelegateCommand <object>(ConnectivityChangedExecute));
        }
예제 #5
0
        public WeeklyOverviewViewmodel(ITimeEntryService timeEntryService, IBusyService busyService, ITimeEntryRepository timeEntryRepository,
                                       ITaskItemViewmodelFactory taskItemViewmodelFactory, ITimeEntryTypeRepository timeEntryTypeRepository,
                                       ISyncService syncService, ICommonDialogs commonDialogs)
        {
            _timeEntryService = timeEntryService;
            //_busyService = busyService;
            _timeEntryRepository      = timeEntryRepository;
            _taskItemViewmodelFactory = taskItemViewmodelFactory;
            _timeEntryTypeRepository  = timeEntryTypeRepository;
            _syncService                    = syncService;
            _commonDialogs                  = commonDialogs;
            _syncCompletedCommand           = new DelegateCommand <object>(SyncCompletedExecute);
            PreviousDateCommand             = new DelegateCommand <object>(a => StartDate = StartDate.AddDays(-7));
            NextDayCommand                  = new DelegateCommand <object>(a => StartDate = StartDate.AddDays(7));
            TodayCommand                    = new DelegateCommand <object>(a => TodayCommandExecute());
            SwitchToDayViewCommand          = new DelegateCommand <object>(SwitchToDayViewCommandExecute);
            CopyPreviousTasksToSelectedDate = new DelegateCommand <object>(CopyPreviousTasksToSelectedDateExecute);
            AddTaskCommand                  = new DelegateCommand <object>(AddTaskCommandExecute);
            SaveCommand     = new DelegateCommand <object>(SaveCommandExecute);
            DeleteTimeEntry = new DelegateCommand <object>(DeleteTimeEntryExecute);
            ApplicationCommands.SyncCompleted.RegisterCommand(_syncCompletedCommand);
            TaskCommands.TaskSelectCompleted.RegisterCommand(new DelegateCommand <Task>(TaskSelectCompleted));
            TaskCommands.SaveTaskCancelled.RegisterCommand(new DelegateCommand <TimeEntry>(TaskSelectCompleted));

            Rows                    = new ObservableItemCollection <TaskItemViewmodel>();
            Rows.ItemChanged       += TasksOnItemChanged;
            _deletedRows            = new List <TaskItemViewmodel>();
            _timeEntriesForThisWeek = new List <TimeEntry>();

            TimeEntryTypes = _timeEntryTypeRepository.GetGlobal();
            StartDate      = DateTime.Today.FirstDayOfWeek();
        }
 public ProjectAccountingApiController(IProjectTaskService projectTaskService,
                                       IEffortUsedByRoleByDateService acByRoleByDateService,
                                       ITimeEntryService timeEntryService,
                                       IAppLogger <ProjectAccountingApiController> logger)
 {
     _projectTaskService    = projectTaskService;
     _timeEntryService      = timeEntryService;
     _acByRoleByDateService = acByRoleByDateService;
     _logger = logger;
 }
예제 #7
0
 public TimeController(
     ITimeEntryService timeEntryService,
     IChartService chartService,
     IServiceProvider serviceProvider, IOrganizationAccountManager am, ITimeMatrixService matrixService) : base(serviceProvider)
 {
     _timeEntryService = timeEntryService;
     _chartService     = chartService;
     _am            = am;
     _matrixService = matrixService;
 }
예제 #8
0
 public TimeController(ITimeEntryService service, ITimeMatrixService timeMatrix,
                       IOrganizationContractor contractor,
                       IServiceProvider provider,
                       IChartService chartService)  : base(provider)
 {
     _contractor   = contractor;
     _timeService  = service;
     _timeMatrix   = timeMatrix;
     _chartService = chartService;
 }
 public EstimateEffortApiController(IProjectService projectService,
                                    ITimeEntryService timeEntryService,
                                    IProjectTaskService projectTaskService,
                                    IEstimateEffortService estimateEffortService)
 {
     _projectTaskService    = projectTaskService;
     _timeEntryService      = timeEntryService;
     _projectService        = projectService;
     _estimateEffortService = estimateEffortService;
 }
예제 #10
0
 public TimeController(ITimeEntryService service,
                       IOrganizationProjectManager projectManager,
                       ITimeMatrixService timeMatrixService,
                       IChartService chartService,
                       IServiceProvider serviceProvider) : base(serviceProvider)
 {
     _projectManager    = projectManager;
     _timeMatrixService = timeMatrixService;
     _timeService       = service;
     _chartService      = chartService;
 }
 public ProjectApiController(IProjectService projectService,
                             ITimeEntryService timeEntryService,
                             IProjectTaskService projectTaskService,
                             IEffortUsedByRoleByDateService effortUsedByRoleByDateService,
                             IProjectOwnerService projectOwnerService)
 {
     _projectTaskService            = projectTaskService;
     _timeEntryService              = timeEntryService;
     _projectService                = projectService;
     _effortUsedByRoleByDateService = effortUsedByRoleByDateService;
     _projectOwnerService           = projectOwnerService;
 }
 public TimesheetController(ITimeEntryService timeEntryService, ITimesheetService timesheetService,
                            IGroupService groupService, IUserGroupService userGroupService,
                            IEmployeeService employeeService,
                            IProjectService projectService)
     : base(timeEntryService)
 {
     _timeEntryService = timeEntryService;
     _timesheetService = timesheetService;
     _groupService     = groupService;
     _userGroupService = userGroupService;
     _employeeService  = employeeService;
     _projectService   = projectService;
 }
 public ProjectUserController(IProjectUserService projectUserService
                              , IProjectService projectService
                              , IEmployeeService employeeService
                              , IRoleTitleService roleTitleService
                              , ITimeEntryService timeEntryService)
     : base(projectUserService)
 {
     _projectUserService = projectUserService;
     _projectService     = projectService;
     _employeeService    = employeeService;
     _roleTitleService   = roleTitleService;
     _timeEntryService   = timeEntryService;
 }
예제 #14
0
 public TrexSLService()
 {
     _templateService             = ObjectFactory.GetInstance <ITemplateService>();
     _invoiceService              = ObjectFactory.GetInstance <IInvoiceService>();
     _customerInvoiceGroupService = ObjectFactory.GetInstance <ICustomerInvoiceGroupService>();
     _customerService             = ObjectFactory.GetInstance <ICustomerService>();
     _projectService              = ObjectFactory.GetInstance <IProjectService>();
     _taskService           = ObjectFactory.GetInstance <ITaskService>();
     _timeEntryService      = ObjectFactory.GetInstance <ITimeEntryService>();
     _userManagementService = ObjectFactory.GetInstance <IUserManagementService>();
     _membershipService     = ObjectFactory.GetInstance <IMembershipService>();
     _invoiceSender         = ObjectFactory.GetInstance <IInvoiceSender>();
 }
예제 #15
0
 public ProjectAccountingController(ITimeEntryService timeEntryService, ITimesheetService timesheetService,
                                    IGroupService groupService, IUserGroupService userGroupService,
                                    IEmployeeService employeeService,
                                    IProjectService projectService,
                                    IResourcePlanService resourcePlanService)
     : base(timeEntryService)
 {
     _timeEntryService    = timeEntryService;
     _timesheetService    = timesheetService;
     _groupService        = groupService;
     _userGroupService    = userGroupService;
     _employeeService     = employeeService;
     _projectService      = projectService;
     _resourcePlanService = resourcePlanService;
 }
예제 #16
0
 public TimeController(IServiceProvider serviceProvider,
                       ITimeEntryService timeEntryService,
                       IAgencyOwner agencyOwner, ITimeMatrixService matrixService,
                       Lazy <IMarketingAgencyOwner> marketingAgencyOwner,
                       Lazy <IProviderAgencyOwner> providerAgencyOwner,
                       Lazy <IRecruitingAgencyOwner> recruitingAgencyOwner,
                       IChartService chartService) : base(serviceProvider)
 {
     _timeEntryService      = timeEntryService;
     _agencyOwner           = agencyOwner;
     _matrixService         = matrixService;
     _marketingAgencyOwner  = marketingAgencyOwner;
     _providerAgencyOwner   = providerAgencyOwner;
     _recruitingAgencyOwner = recruitingAgencyOwner;
     _chartService          = chartService;
 }
 public TimesheetService(IClientService clientService,
                         IEmployeeService employeeService,
                         IGroupService groupService,
                         IProjectService projectService,
                         ITimeEntryService timeEntryService,
                         IClockifyService clockifyService,
                         IUserGroupService userGroupService,
                         IProjectTaskService projectTaskService)
 {
     _clientService      = clientService;
     _employeeService    = employeeService;
     _groupService       = groupService;
     _projectService     = projectService;
     _timeEntryService   = timeEntryService;
     _clockifyService    = clockifyService;
     _userGroupService   = userGroupService;
     _projectTaskService = projectTaskService;
 }
예제 #18
0
        public Toggl2TogglIntegration(string toggleApiKey)
        {
            timeEntryService = new TimeEntryService(toggleApiKey);
            var workspaceService = new WorkspaceService(toggleApiKey);
            var clientService    = new ClientService(toggleApiKey);
            var projectService   = new ProjectService(toggleApiKey);

            clientNameResolvers  = new HashSet <ITimeEntryBasedResolver <IClient> >();
            projectNameResolvers = new HashSet <ITimeEntryBasedResolver <IProject> >();
            tagResolvers         = new HashSet <ITimeEntryBasedResolver <ITag> >();

            List <Client>    clients    = clientService.List(false);
            List <Project>   projects   = projectService.List();
            List <Workspace> workspaces = workspaceService.List();

            workspacesClientsProjects = new List <WorkspaceClientProjectModel>();
            MapClientsAndProjects(workspaces, clients, projects);
        }
예제 #19
0
        public DayOverviewViewModel(ITimeEntryService timeEntryService, IBusyService busyService)
        {
            _timeEntryService = timeEntryService;
            _busyService      = busyService;
            _busyService.ShowBusy(_dayoverviewKey);
            TimeEntries = new List <DataOverviewItemViewModel>();

            PreviousDateCommand          = new DelegateCommand <object>(a => StartDate = StartDate.AddDays(-1));
            NextDayCommand               = new DelegateCommand <object>(a => StartDate = StartDate.AddDays(1));
            TodayCommand                 = new DelegateCommand <object>(a => StartDate = GetNuetralKindDateTimeToday());
            EditTaskCommand              = new DelegateCommand <object>(EditTaskExecute);
            _saveCommandCompletedCommand = new DelegateCommand <object>(SaveTaskCompleted);
            TaskCommands.SaveTaskCompleted.RegisterCommand(_saveCommandCompletedCommand);
            OverviewCommands.GoToDaySubMenu.RegisterCommand(new DelegateCommand <object>(ChangeDate));

            VisiblePeriodStart = StartDate.AddHours(6);
            VisiblePeriodEnd   = EndDate.AddHours(-6);
            StartDate          = GetNuetralKindDateTimeToday();
        }
        public TogglRepository(ITimeEntryService timeEntryService, IUserService userService, string descriptionTemplate)
        {
            if (timeEntryService == null)
            {
                throw new ArgumentNullException(nameof(timeEntryService));
            }
            if (userService == null)
            {
                throw new ArgumentNullException(nameof(userService));
            }
            if (descriptionTemplate == null)
            {
                throw new ArgumentNullException(nameof(descriptionTemplate));
            }

            _timeEntryService    = timeEntryService;
            _userService         = userService;
            _descriptionTemplate = descriptionTemplate;
        }
예제 #21
0
 public TrexSLService(IInvoiceService invoiceService,
                      ITemplateService templateService,
                      ICustomerInvoiceGroupService customerInvoiceGroupService,
                      ICustomerService customerService,
                      IProjectService projectService,
                      ITaskService taskService,
                      ITimeEntryService timeEntryService,
                      IUserManagementService userManagementService,
                      IMembershipService membershipService,
                      IInvoiceSender invoiceSender)
 {
     _invoiceService              = invoiceService;
     _templateService             = templateService;
     _customerInvoiceGroupService = customerInvoiceGroupService;
     _customerService             = customerService;
     _projectService              = projectService;
     _taskService           = taskService;
     _timeEntryService      = timeEntryService;
     _userManagementService = userManagementService;
     _membershipService     = membershipService;
     _invoiceSender         = invoiceSender;
 }
        public TimesheetService(IClientService clientService,
                                IEmployeeService employeeService,
                                IGroupService groupService,
                                IProjectService projectService,
                                ITimeEntryService timeEntryService,
                                IClockifyService clockifyService,
                                IUserGroupService userGroupService,
                                IProjectTaskService projectTaskService,
                                IEmployeeTitleService employeeTitleService,
                                ILoggerFactory loggerFactory)
        {
            _logger = loggerFactory.CreateLogger <TimesheetService>();

            _clientService        = clientService;
            _employeeService      = employeeService;
            _groupService         = groupService;
            _projectService       = projectService;
            _timeEntryService     = timeEntryService;
            _clockifyService      = clockifyService;
            _userGroupService     = userGroupService;
            _projectTaskService   = projectTaskService;
            _employeeTitleService = employeeTitleService;
        }
예제 #23
0
        public SyncService(IConnectivityService connectivityService, ICompanyService companyService, IProjectRepository projectRepository, ICompanyRepository companyRepository, IProjectService projectService,
                           ITaskService taskService, ITaskRepository taskRepository, ITimeEntryService timeEntryService, IUserSession userSession, IUserService userService, ITimeEntryTypeService timeEntryTypeService,
                           ITimeEntryTypeRepository timeEntryTypeRepository, IAppSettings appSettings, ITimeEntryRepository timeEntryRepository,
                           IBusyService busyService)
        {
            _dispatcherTimer            = new DispatcherTimer(DispatcherPriority.Normal);
            _dispatcherTimer.Tick      += DispatcherTimerTick;
            _connectivityService        = connectivityService;
            _timeEntryRepository        = timeEntryRepository;
            _busyService                = busyService;
            AppSettings                 = appSettings;
            TimeEntryTypeRepository     = timeEntryTypeRepository;
            TimeEntryTypeService        = timeEntryTypeService;
            UserService                 = userService;
            UserSession                 = userSession;
            TimeEntryService            = timeEntryService;
            TaskRepository              = taskRepository;
            TaskService                 = taskService;
            ProjectService              = projectService;
            CompanyRepository           = companyRepository;
            ProjectRepository           = projectRepository;
            CompanyService              = companyService;
            _startSyncCommand           = new DelegateCommand <object>(StartSync);
            _connectionChangedCommand   = new DelegateCommand <object>(ConnectionChanged);
            _resyncCommand              = new DelegateCommand <object>(Resync);
            _userLoggedInCommand        = new DelegateCommand <object>(UserLoggedIn);
            _userLoggedOutCommand       = new DelegateCommand <object>(UserLoggedOut);
            _synchronizenewTasksCommand = new DelegateCommand <object>(SynchronizeNewTasks);

            ApplicationCommands.StartSync.RegisterCommand(_startSyncCommand);
            ApplicationCommands.Resync.RegisterCommand(_resyncCommand);
            ApplicationCommands.LoginSucceeded.RegisterCommand(_userLoggedInCommand);
            ApplicationCommands.UserLoggedOut.RegisterCommand(_userLoggedOutCommand);
            ApplicationCommands.GetLatestTasks.RegisterCommand(_synchronizenewTasksCommand);
            ApplicationCommands.ConnectivityChanged.RegisterCommand(_connectionChangedCommand);
        }
 public TimeEntriesPageViewModel(ITimeEntryService timeEntryService)
 {
     _timeEntryService = timeEntryService;
 }
 public TimeEntriesController(ITimeEntryService timeEntryService)
 {
     this.timeEntryService = timeEntryService;
 }
예제 #26
0
 public TimeEntriesController(ITimeEntryService service)
 {
     this._service = service;
 }
예제 #27
0
 public TimeEntryController(TimeEntrySummaryReportTemplating timeEntrySummaryReportTemplating,
                            ITimeEntryService timeEntryService)
 {
     this.timeEntrySummaryReportTemplating = timeEntrySummaryReportTemplating;
     this.timeEntryService = timeEntryService;
 }
예제 #28
0
 public AnnoyService(ITimeEntryService timeEntryService, IBalloonNotification balloonNotification)
 {
     _timeEntryService    = timeEntryService;
     _balloonNotification = balloonNotification;
 }
예제 #29
0
 public TogglController(ITimeEntryService timeEntryService)
 {
     _timeEntryService = timeEntryService;
 }