Esempio n. 1
0
        // GET api/<controller>
        public List <VolunteerActivity> Get()
        {
            var currentUser = User.Identity.Name;
            //We need this for list of activities for specific users.
            var currentUserActivities = repo.GetAllActivitiesForCurrentUser(currentUser);

            return(currentUserActivities);
        }
Esempio n. 2
0
        // GET api/<controller>/
        public CalculationsViewModel Get()
        {
            var currentUser = User.Identity.Name;

            repo.GetAllActivitiesForCurrentUser(currentUser);
            var calcVM = new CalculationsViewModel();

            calcVM.totalHours   = repo.calculateYTDNumberHours(currentUser);
            calcVM.totalMileage = repo.calculateYTDMileage(currentUser);
            calcVM.totalDollars = repo.calculateYTDDollarsContributed(currentUser);
            return(calcVM);
        }