示例#1
0
        // 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));
        }
示例#2
0
        // 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));
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }
示例#5
0
        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));
        }
示例#6
0
        public ServiceResponseResult processGetRequest(string pServiceURL)
        {
            RestClientService restClient = new RestClientService();

            return(restClient.processGetRequest(pServiceURL));
        }
示例#7
0
        //----------------- 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));
        }