예제 #1
0
        public async Task <IEnumerable <ActivityDto> > GetActivities()
        {
            var activities = await _Repo.GetActivities();

            IEnumerable <ActivityDto> dto = _Mapper.Map <IEnumerable <ActivityDto> >(activities);

            return(dto);
        }
        /// <summary>
        /// Called when an attached view's Loaded event fires.
        /// </summary>
        /// <param name="view"/>
        protected override void OnViewLoaded(object view)
        {
            base.OnViewLoaded(view);

            Activities = _activitiesRepository.GetActivities().ToList();

            GetNextRecord();
        }
예제 #3
0
        public UserActivityTracker(
            IActivityRecordsRepository activityRecordsRepository,
            IActivitiesRepository activitiesRepository,
            IActivityTrackingSettings settings,
            IUserInputTracker inputTracker)
        {
            _activityRecordsRepository = activityRecordsRepository;
            _settings = settings;
            _inputTracker = inputTracker;

            List<Activity> activities = activitiesRepository.GetActivities().ToList();
            _defaultActivity = activities[0];
            _breakActivity = activities[1];
            _homeActivity = activities[5];
        }
예제 #4
0
        public UserActivityTracker(
            IActivityRecordsRepository activityRecordsRepository,
            IActivitiesRepository activitiesRepository,
            IActivityTrackingSettings settings,
            IUserInputTracker inputTracker)
        {
            _activityRecordsRepository = activityRecordsRepository;
            _settings     = settings;
            _inputTracker = inputTracker;

            List <Activity> activities = activitiesRepository.GetActivities().ToList();

            _defaultActivity = activities[0];
            _breakActivity   = activities[1];
            _homeActivity    = activities[5];
        }
예제 #5
0
 public IEnumerable <ActivitiesAC> GetActivities()
 {
     return(_activitiesRepository.GetActivities());
 }
예제 #6
0
        public IEnumerable <ActivityTemplate> GetStagesbyID(int projectid)
        {
            IEnumerable <ProjectActivityPlan> projectactivityplanlist = new List <ProjectActivityPlan>();
            IEnumerable <ActivityTemplate>    stages = new List <ActivityTemplate>();
            List <ProjectActivityPlanModel>   ProjectPlanModelList = new List <ProjectActivityPlanModel>();

            projectactivityplanlist = ProjectActivityPlanRepository.GetProjectActivityPlans().Where(c => c.ProjectID == projectid && c.ParentID == "0");
            List <string> templist = new List <string>();

            foreach (var projectplan in projectactivityplanlist)
            {
                templist.Add(projectplan.TemplateID);
            }

            stages = ActivitiesRepository.GetActivities().Where(c => templist.Contains(c.TemplateID));
            return(stages);
        }
예제 #7
0
        public IEnumerable <ActivityTemplate> GetActivities()
        {
            var activities = ActivitiesRepository.GetActivities();

            return(activities);
        }
예제 #8
0
        public IActionResult Activity()
        {
            IEnumerable <Activity> activities = activitiesRepository.GetActivities().Select(mapper.Map <Activity>);;

            return(View());
        }
예제 #9
0
        public Task <List <Activity> > Handle(ActivitiesListQuery request, CancellationToken cancellationToken)
        {
            Task <List <Activity> > activities = _repository.GetActivities();

            return(activities);
        }