Exemple #1
0
        public GetGeneralResponse <IEnumerable <SupportView> > GetSupports(int pageSize, int pageNumber,
                                                                           Guid customerID, IList <Sort> sort)
        {
            GetGeneralResponse <IEnumerable <SupportView> > response = new GetGeneralResponse <IEnumerable <SupportView> >();

            try
            {
                Query     query = new Query();
                Criterion CustomerIDCriteria = new Criterion("Customer.ID", customerID, CriteriaOperator.Equal);
                query.Add(CustomerIDCriteria);

                int index = (pageNumber - 1) * pageSize;
                int count = pageSize;

                Response <Support> supports = _supportRepository.FindByQuery(query, sort);

                response.data       = supports.data.ConvertToSupportViews();
                response.totalCount = supports.totalCount;
            }
            catch (Exception)
            {
                throw;
            }
            return(response);
        }