public XDocument QueryList(CampaignonlineregListRequest request) { var filter = string.Empty; var fetchXml = $@"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' count='{request.PageSize}' page='{request.PageIndex}'> <entity name='mcs_campaignonlinereg'> <all-attributes /> <order attribute='createdon' descending='false' /> <link-entity name='contact' from='contactid' to='mcs_contactid' link-type='inner' alias='aa'> <filter type='and'> <condition attribute='mcs_userid' operator='eq' value='{request.UserId}' /> </filter> </link-entity> <link-entity name='campaign' from='campaignid' to='mcs_campaignid' link-type='inner' alias='bb'> <all-attributes/> </link-entity> </entity> </fetch>"; return(XDocument.Parse(fetchXml)); }
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 Task <SalesOrderListResponse> getlist(CampaignonlineregListRequest req) { return(_campaignonlineregService.getlist(req)); }
public async Task <NewtonsoftJsonActionResult <SalesOrderListResponse> > QueryList(CampaignonlineregListRequest request) { var list = await app.getlist(request); return(list); }