// Cierre de Sorteos en Servidor public async Task <ServiceResponseResult> closeDrawInServerAsync(DateTime pDrawDate, long pGroupId) { var jsonObject = this.generateDrawClosingJson(pDrawDate, pGroupId, 2); string urlEndPoint = ServiceConectionConstants.CLOSING_DRAW_RESOURCE_URL; RestClientService restClient = new RestClientService(); return(await restClient.processHttpRequestAsync(urlEndPoint, jsonObject, SystemConstants.HTTP_POST_METHOD)); }
// Cierre de Sorteos en Servidor public async Task <ServiceResponseResult> syncWinnerNumbersToServerAsync(LTD_LotteryDraw pDraw, string[] pWinningNumberArray) { var jsonObject = this.generateWinnerSyncJson(pDraw, pWinningNumberArray); //Console.WriteLine("Request Ganadores: " + jsonObject); string urlEndPoint = ServiceConectionConstants.WINNER_NUMBERS_RESOURCE_URL; RestClientService restClient = new RestClientService(); return(await restClient.processHttpRequestAsync(urlEndPoint, jsonObject, SystemConstants.HTTP_POST_METHOD)); }
public async Task <ServiceResponseResult> syncListToServerAsync(LTL_LotteryList pListObject, List <LND_ListNumberDetail> pListNumberDetail) { var jsonObject = this.generateNewListToSync(pListObject, pListNumberDetail); //Console.WriteLine("Request Venta: " + jsonObject); string urlEndPoint = ServiceConectionConstants.LIST_RESOURCE_URL; RestClientService restClient = new RestClientService(); return(await restClient.processHttpRequestAsync(urlEndPoint, jsonObject, SystemConstants.HTTP_POST_METHOD)); }
public ServiceResponseResult reverseListToServer(LTL_LotteryList pListObject) { var jsonObject = this.generateSimpleListObject(pListObject, SystemConstants.LIST_STATUS_CANCELED, SystemConstants.SYNC_STATUS_COMPLETED); Console.WriteLine("Request Reversión: " + jsonObject); string urlEndPoint = ServiceConectionConstants.ROOT_LIST_RESOURCE_URL + "/" + pListObject.LTL_Id + "/"; RestClientService restClient = new RestClientService(); return(restClient.processHttpRequest(urlEndPoint, jsonObject, SystemConstants.HTTP_PUT_METHOD)); }
public ServiceResponseResult syncListToServer(LTL_LotteryList pListObject, List <LND_ListNumberDetail> pListNumberDetail, Func <ServiceResponseResult, bool> processResponseFunction) { var jsonObject = this.generateNewListToSync(pListObject, pListNumberDetail); //Console.WriteLine("Request Venta: " + jsonObject); string urlEndPoint = ServiceConectionConstants.LIST_RESOURCE_URL; RestClientService restClient = new RestClientService(); //return restClient.processHttpRequest(urlEndPoint, jsonObject, SystemConstants.HTTP_POS_METHOD); return(restClient.processAsyncHttpRequest(urlEndPoint, jsonObject, SystemConstants.HTTP_POST_METHOD, processResponseFunction)); }
public ServiceResponseResult processGetRequest(string pServiceURL) { RestClientService restClient = new RestClientService(); return(restClient.processGetRequest(pServiceURL)); }
//----------------- Métodos utilitarios para acceder a servicios -----------------// public ServiceResponseResult callHttpRequest(string pServiceURL, Object pJsonObject, string pHttpMethod) { RestClientService restClient = new RestClientService(); return(restClient.processHttpRequest(pServiceURL, pJsonObject, pHttpMethod)); }