public async Task <SalesOrderListResponse> getlist(CampaignonlineregListRequest req) { try { var crmRequestHelper = new CrmRequestHelper(); var response = new SalesOrderListResponse() { }; XDocument fetchXdoc = null; fetchXdoc = _campaignonlineregRepository.QueryList(req); var entities = await crmRequestHelper.ExecuteAsync(_crmService, entityName, fetchXdoc); response.orders = entities.Results;; response.ALLTotalCount = entities.Count; response.PageSize = req.PageSize; response.CurrentPage = req.PageIndex; return(response); } catch (Exception ex) { throw ex; } }
public async Task <SalesOrderListResponse> getlist(SalesOrderListRequest salesOrderListRequest) { try { var crmRequestHelper = new CrmRequestHelper(); var response = new SalesOrderListResponse() { }; XDocument fetchXdoc = null; fetchXdoc = await _salesorderRepository.GetListFetchXml(salesOrderListRequest); var entities = await crmRequestHelper.ExecuteAsync(_crmService, entityName, fetchXdoc); response.orders = entities.Results;; response.ALLTotalCount = entities.Count; response.PageSize = salesOrderListRequest.PageSize; response.CurrentPage = salesOrderListRequest.PageIndex; return(response); } catch (Exception ex) { throw ex; } }