public CompletedTaskViewModel(IUserTaskService userTaskService)
 {
     _navigateToSettingsCommand = new Command(NavigateToSettingsPage);
     _closeListCommand          = new Command(CloseList);
     _userTaskService           = userTaskService;
     LoadCompletedTaskList();
 }
        public UserTaskViewModel(UserTask userTask, List<UserTaskTime> userTaskTimelist, IUserTaskService userTaskService,IClientContactService clientContactService)
        {
            _userTaskService = userTaskService;
            _clientContactService = clientContactService;
            _currentUser = App.CurrentUserProfile;

            _imagePerStatus = new Dictionary<int, string>
            {
                {UserTaskStatus.Active, "iconpause.png"},
                {UserTaskStatus.Pending, "iconplay.png"},
                {UserTaskStatus.Paused, "iconplay.png"}
            };

            UserTask = userTask;

            UserTaskTimeList = userTaskTimelist;

            Duration = UserTask.Status == UserTaskStatus.Aborted ? new TimeSpan(0, 0, (int)UserTask.ElapsedTimeInSeconds): new TimeSpan(0, 0, (int)GetCurrentDuration().Result);

            if (UserTask.Status == UserTaskStatus.Active)
            {
                if (Duration.TotalSeconds > hours24restrictions)
                {
                    AbortUserTask();
                }
            }

            if (UserTask.Status == UserTaskStatus.Active) { InitializeTimer(); }

            BackCommand = new Command(OnBackCommandFired);
            CanStart = true;
        }
 public CompletedTaskViewModel(IUserTaskService userTaskService)
 {
     _navigateToSettingsCommand = new Command(NavigateToSettingsPage);
     _closeListCommand = new Command(CloseList);
     _userTaskService = userTaskService;
     LoadCompletedTaskList();
 }
 public UserTasksController(ILogger <UserTasksController> logger,
                            IUserTaskService userTaskService
                            )
 {
     _logger          = logger;
     _userTaskService = userTaskService;
 }
示例#5
0
 public UserTaskController(IUserTaskService userTaskService, ITaskService taskService, IUserTrackService userTrackService, ITaskStateService taskStateService)
 {
     this.userTaskService  = userTaskService;
     this.taskService      = taskService;
     this.userTrackService = userTrackService;
     this.taskStateService = taskStateService;
 }
        public UserTaskViewModel(UserTask userTask, List <UserTaskTime> userTaskTimelist, IUserTaskService userTaskService, IClientContactService clientContactService)
        {
            _userTaskService      = userTaskService;
            _clientContactService = clientContactService;
            _currentUser          = App.CurrentUserProfile;

            _imagePerStatus = new Dictionary <int, string>
            {
                { UserTaskStatus.Active, "iconpause.png" },
                { UserTaskStatus.Pending, "iconplay.png" },
                { UserTaskStatus.Paused, "iconplay.png" }
            };

            UserTask = userTask;

            UserTaskTimeList = userTaskTimelist;

            Duration = UserTask.Status == UserTaskStatus.Aborted ? new TimeSpan(0, 0, (int)UserTask.ElapsedTimeInSeconds): new TimeSpan(0, 0, (int)GetCurrentDuration().Result);

            if (UserTask.Status == UserTaskStatus.Active)
            {
                if (Duration.TotalSeconds > hours24restrictions)
                {
                    AbortUserTask();
                }
            }

            if (UserTask.Status == UserTaskStatus.Active)
            {
                InitializeTimer();
            }

            BackCommand = new Command(OnBackCommandFired);
            CanStart    = true;
        }
示例#7
0
 public TaskOperations(ITaskTypeService typeTaskService, IMapper mapper, IUserTaskService userTaskServer, IProjectService projectServer)
 {
     _typeTaskService = typeTaskService;
     _userTaskServer  = userTaskServer;
     _projectServer   = projectServer;
     _mapper          = mapper;
 }
示例#8
0
 public AuthenticationController(ILogger <AuthenticationController> logger,
                                 IUserTaskService userTaskService
                                 )
 {
     _logger          = logger;
     _userTaskService = userTaskService;
 }
示例#9
0
 public TasksController(ITaskService taskService, ISectionService sectionService,
                        IUserTaskService userTaskService, IUserService userService)
 {
     this.taskService     = taskService;
     this.sectionService  = sectionService;
     this.userTaskService = userTaskService;
     this.userService     = userService;
 }
示例#10
0
 public TaskTrackController(ITaskTrackService taskTrackService, IVUserTrackService vUerTrackService, IVUserProfileService vUserProfileService, IVUserTaskService vUserTaskService, IUserTaskService userTaskService)
 {
     _taskTrackService    = taskTrackService;
     _vUserTrackService   = vUerTrackService;
     _vUserProfileService = vUserProfileService;
     _vUserTaskService    = vUserTaskService;
     _userTaskTService    = userTaskService;
 }
示例#11
0
 public ManagerController(ITasksDataService tasksSvc, IUsersService usersSvc, IUserTaskService userTaskSvc, IUserRoleService userRoleSvc, IRolesService rolesSvc, DissContext context)
 {
     _tasksSvc    = tasksSvc;
     _usersSvc    = usersSvc;
     _userTaskSvc = userTaskSvc;
     _userRoleSvc = userRoleSvc;
     _rolesSvc    = rolesSvc;
     _context     = context;
 }
示例#12
0
 public StatisticsController(IUserService userService, IActivityService activityService, IGradeService gradeService,
                             IUserTaskService userTaskService, ITaskService taskService)
 {
     this.userService     = userService;
     this.activityService = activityService;
     this.gradeService    = gradeService;
     this.userTaskService = userTaskService;
     this.taskService     = taskService;
 }
 /// <summary>
 ///     The constructor for user tasks
 /// </summary>
 /// <param name="userTaskService">
 ///     The user task service is responsible for getting and setting the tasks that users should
 ///     follow up.
 /// </param>
 /// <param name="userService"> The user service is responsible for getting and setting users. </param>
 /// <param name="roleService"> The role service is responsible for getting and setting roles. </param>
 /// <param name="clientFactory"> The client factory is a HttpClient which is used to communicate with the identity server. </param>
 public UserTaskController(IUserTaskService userTaskService,
                           IUserService userService,
                           IRoleService roleService,
                           IHttpClientFactory clientFactory)
 {
     this.userTaskService = userTaskService;
     this.userService     = userService;
     this.roleService     = roleService;
     identityHttpClient   = clientFactory.CreateClient("identityclient");
 }
示例#14
0
 public AbstractController(ITaskService taskService, IVTaskService vTaskService, IUserTaskService userTaskService, IVUserProfileService vUserProfileService, IVTaskStateService vTaskStateService, IVUserTaskService vUserTaskService, IMapper mapper)
 {
     _taskService         = taskService;
     _vTaskService        = vTaskService;
     _userTaskService     = userTaskService;
     _vUserProfileService = vUserProfileService;
     _vTaskStateService   = vTaskStateService;
     _vUserTaskService    = vUserTaskService;
     _mapper = mapper;
 }
示例#15
0
        public HomeViewModel(IUserTaskService userTaskService, IClientContactService clientContactService)
        {
            _navigateToSettingsCommand = new Command(NavigaetToSettingsPage);
            _createTaskCommand = new Command(CreateNewTask);
            _userTaskService = userTaskService;
            _clientContactService = clientContactService;

            ExecuteLoadItemsCommand();
            InitSubscriptions();
        }
示例#16
0
 public ProfileController(IUserService userService, IActivityService activityService, IGradeService gradeService,
                          ITaskService taskService, IUserTaskService userTaskService, ICuratorService curatorService)
 {
     this.userService     = userService;
     this.activityService = activityService;
     this.gradeService    = gradeService;
     this.taskService     = taskService;
     this.userTaskService = userTaskService;
     this.curatorService  = curatorService;
 }
示例#17
0
        public HomeViewModel(IUserTaskService userTaskService, IClientContactService clientContactService)
        {
            _navigateToSettingsCommand = new Command(NavigaetToSettingsPage);
            _createTaskCommand         = new Command(CreateNewTask);
            _userTaskService           = userTaskService;
            _clientContactService      = clientContactService;

            ExecuteLoadItemsCommand();
            InitSubscriptions();
        }
        public UsageItemsViewModel(IReferenceDataService referenceDataService, IUserPreferenceService userPreferenceService, IUserTaskService userTaskService,
                                   Client selectedClient)
        {
            _referenceDataService  = referenceDataService;
            _userPreferenceService = userPreferenceService;
            _userTaskService       = userTaskService;
            _selectedClient        = selectedClient;

            Init();
        }
示例#19
0
        public UserTasksViewModel(IUserTaskService userTaskService)
        {
            DisplayAddTaskBoxCommand = new RelayCommand(DisplayAddTaskBox, CanDisplayAddTaskBox);
            AddUserTaskCommand       = new RelayCommand(AddUserTask, CanAddUserTask);

            _userTaskService = userTaskService;

            var asyncTask = _userTaskService.GetAll();

            asyncTask.Wait();
            UserTasks       = new ObservableCollection <UserTask>(asyncTask.Result);
            CurrentUserTask = new UserTask();
        }
示例#20
0
 public TestController(ITestService testService, IQuestionService questionService, IGradeService gradeService,
                       IUserService userService, IGroupSectionService groupSectionService, ISectionService sectionService,
                       ITypeService typeService, ITaskService taskService, IUserTaskService userTaskService)
 {
     this.testService         = testService;
     this.questionService     = questionService;
     this.gradeService        = gradeService;
     this.userService         = userService;
     this.groupSectionService = groupSectionService;
     this.sectionService      = sectionService;
     this.typeService         = typeService;
     this.taskService         = taskService;
     this.userTaskService     = userTaskService;
 }
 public ConvertToExcelController(
     IUserService userService,
     IUserTaskService taskService,
     INoteService noteService,
     IFileService fileService,
     ITasksContainerService tasksContainerService,
     IAttachmentsService attachmentsService
     )
 {
     _userService           = userService;
     _userTaskService       = taskService;
     _noteService           = noteService;
     _fileService           = fileService;
     _tasksContainerService = tasksContainerService;
     _attachmentsService    = attachmentsService;
 }
示例#22
0
        public async Task Initialize()
        {
            //DbContext
            _context = TestInitializer.Provider.GetService <DatabaseContext>();

            //Data
            await TestInitializer.Provider.GetService <UserDataFactory>().CreateUsers();

            await TestInitializer.Provider.GetService <TasksContainerDataFactory>().CreateTasksContainer();

            await TestInitializer.Provider.GetService <UserTaskDataFactory>().CreateTasks();

            _userTasks = await _context.Tasks.ToListAsync();

            //Services
            _service = new UserTaskService(_context);
        }
示例#23
0
 public ReportsController(IReportService reportService, IUserService userService, ITemplateService templateService,
                          IGradeService gradeService, IActivityService activityService, IGroupService groupService, IReportQAService reportQAService,
                          ITestService testService, ISectionService sectionService, IGroupSectionService groupSectionService, ITaskService taskService,
                          IUserTaskService userTaskService)
 {
     this.reportService       = reportService;
     this.userService         = userService;
     this.templateService     = templateService;
     this.gradeService        = gradeService;
     this.activityService     = activityService;
     this.taskService         = taskService;
     this.groupService        = groupService;
     this.reportQAService     = reportQAService;
     this.testService         = testService;
     this.sectionService      = sectionService;
     this.groupSectionService = groupSectionService;
     this.userTaskService     = userTaskService;
 }
示例#24
0
 public UserController(IUserService userService, IUserTaskService userTaskService)
 {
     _userService     = userService;
     _userTaskService = userTaskService;
 }
示例#25
0
 public UserTaskController(IUserTaskService userTaskService, IMapper mapper, ILoggerService logger)
 {
     _userTaskService = userTaskService;
     _mapper          = mapper;
     _logger          = logger;
 }
示例#26
0
 public UserTaskController(IUserTaskService userTaskService, IMapper mapper)
 {
     _userTaskService = userTaskService;
     _mapper          = mapper;
 }
示例#27
0
 public TaskTrackController(ITaskTrackService taskTrackService, IUserTaskService userTaskService)
 {
     this.taskTrackService = taskTrackService;
     this.userTaskService  = userTaskService;
 }
示例#28
0
 public TaskGroupController(IUserTaskService userTaskService, ITaskGroupService taskGroupService, IUserService userService)
 {
     _userTaskService  = userTaskService;
     _taskGroupService = taskGroupService;
     _userService      = userService;
 }
示例#29
0
 public UserTasksController(IUserTaskService userTaskService)
 {
     _userTaskService = userTaskService;
 }
示例#30
0
 public ProjectController(IProjectService projectService, IUserTaskService userTaskService)
 {
     _projectService  = projectService;
     _userTaskService = userTaskService;
 }
示例#31
0
 public TasksManageController(ITaskService taskService, IVTaskService vTaskService, IUserTaskService userTaskService,
                              IVUserProfileService vUserProfileService, IVTaskStateService vTaskStateService, IVUserTaskService vUserTaskService, IMapper mapper)
     : base(taskService, vTaskService, userTaskService, vUserProfileService, vTaskStateService, vUserTaskService, mapper)
 {
 }
示例#32
0
 public UsersTaskController(IUserTaskService userTaskService, IProjectService projectService, IUserService userService)
 {
     _userTaskService = userTaskService;
     _projectService  = projectService;
     _userService     = userService;
 }
示例#33
0
 public UserTasksController(IUserTaskService userTaskService, IMapper mapper)
 {
     this.userTaskService = userTaskService;
     this.mapper          = mapper;
 }