Пример #1
0
 public static PagedResult <ExerciseDTO> GetExercises(ExerciseSearchCriteria searchCriteria, PartialRetrievingInfo pageInfo)
 {
     return(exceptionHandling(delegate
     {
         pageInfo.PageSize = GetPageSize(150);
         return Instance.GetExercises(Token, searchCriteria, pageInfo);
     }));
 }
Пример #2
0
        public static ExerciseSearchCriteria CreatePersonalCriteria()
        {
            ExerciseSearchCriteria criteria = new ExerciseSearchCriteria();

            criteria.SearchGroups.Add(ExerciseSearchCriteriaGroup.Mine);
            criteria.SearchGroups.Add(ExerciseSearchCriteriaGroup.Global);
            criteria.SearchGroups.Add(ExerciseSearchCriteriaGroup.Favorites);
            return(criteria);
        }
Пример #3
0
        public static ExerciseSearchCriteria CreateAllCriteria()
        {
            ExerciseSearchCriteria criteria = new ExerciseSearchCriteria();

            //criteria.SearchGroups.Add(ExerciseSearchCriteriaGroup.Mine);
            //criteria.SearchGroups.Add(ExerciseSearchCriteriaGroup.Global);
            //criteria.SearchGroups.Add(ExerciseSearchCriteriaGroup.Other);
            return(criteria);
        }
Пример #4
0
        public PagedResult <ExerciseDTO> GetExercises(Token token, ExerciseSearchCriteria searchCriteria, PartialRetrievingInfo retrievingInfo)
        {
            BodyArchitect.Service.V2.InternalBodyArchitectService service = new V2.InternalBodyArchitectService(NHibernateContext.Current().Session);
            V2.Model.Token v2token = new V2.Model.Token(token.SessionId, token.Language);
            V2.Model.ExerciseSearchCriteria crit = new V2.Model.ExerciseSearchCriteria();
            V2.Model.PartialRetrievingInfo  nfo  = new V2.Model.PartialRetrievingInfo();
            crit = Mapper.Map <V2.Model.ExerciseSearchCriteria>(searchCriteria);
            nfo  = Mapper.Map <V2.Model.PartialRetrievingInfo>(retrievingInfo);

            var res = service.GetExercises(v2token, crit, nfo);
            var ret = Mapper.Map <V2.Model.PagedResult <V2.Model.ExerciseDTO>, PagedResult <ExerciseDTO> >(res);

            return(ret);
        }