Example #1
0
        public Activity GetActivityEntries(Activity activity, NodeVisit visit)
        {
            LogicAuditBaseManager.ValidateByRole(visit, SystemRoleType.Program);

            activity.Entries = _activityDao.GetActivityEntries(activity.Id);

            return(activity);
        }
Example #2
0
        public int DeleteActivities(ActivitySearchParams search, NodeVisit visit)
        {
            LogicAuditBaseManager.ValidateByRole(visit, SystemRoleType.Admin);

            bool addFlowIsNullQuery;

            if (!FilterSearchParamsForVisit(search, visit, out addFlowIsNullQuery))
            {
                return(0);
            }

            return(_activityDao.DeleteActivities(search, addFlowIsNullQuery));
        }
Example #3
0
        public SortableCollection <Activity> Search(ActivitySearchParams search,
                                                    NodeVisit visit,
                                                    bool includeActivityEntries)
        {
            LogicAuditBaseManager.ValidateByRole(visit, SystemRoleType.Program);

            bool addFlowIsNullQuery;

            if (!FilterSearchParamsForVisit(search, visit, out addFlowIsNullQuery))
            {
                return(null);
            }

            return(_activityDao.Search(search, addFlowIsNullQuery, includeActivityEntries));
        }
Example #4
0
        public IList <Activity> GetRecentActivities(int maxNumToReturn, bool returnUsernames,
                                                    NodeVisit visit)
        {
            LogicAuditBaseManager.ValidateByRole(visit, SystemRoleType.Program);

            ActivitySearchParams search = new ActivitySearchParams();

            bool addFlowIsNullQuery;

            if (!FilterSearchParamsForVisit(search, visit, out addFlowIsNullQuery))
            {
                return(null);
            }

            IList <Activity> activities =
                _activityDao.GetRecentActivities(search, addFlowIsNullQuery,
                                                 maxNumToReturn, returnUsernames);

            return(activities);
        }