예제 #1
0
        public ResponseMessage VisitorDetailControllerService(VisitorDataPayLoad data)
        {
            var jsonString = JsonConvert.SerializeObject(data);
            var content    = new StringContent(jsonString, Encoding.UTF8, "application/json");
            var response   = _client.PostAsync(GetVisitorDetailUrl, content).Result;
            //
            var             rep = response.Content.ReadAsStringAsync();
            ResponseMessage msg = JsonConvert.DeserializeObject <ResponseMessage>(rep.Result);

            //
            return(msg);
        }
예제 #2
0
        public async System.Threading.Tasks.Task <ResponseMessage> CheckOutVisitor(VisitorDataPayLoad data)
        {
            var jsonString = JsonConvert.SerializeObject(data);
            var content    = new StringContent(jsonString, Encoding.UTF8, "application/json");
            var response   = await _client.PostAsync(CheckOutVisitorUrl, content);

            //
            var rep = response.Content.ReadAsStringAsync();
            //response.EnsureSuccessStatusCode();
            //string responseString = await response.Content.ReadAsStringAsync();
            ResponseMessage msg = JsonConvert.DeserializeObject <ResponseMessage>(rep.Result);

            //
            return(msg);
        }
예제 #3
0
        public async System.Threading.Tasks.Task <ResponseMessage> GuestControllerService(VisitorDataPayLoad data)
        {
            var jsonString = JsonConvert.SerializeObject(data);
            var content    = new StringContent(jsonString, Encoding.UTF8, "application/json");
            var response   = await _client.PostAsync(GuestListControllerUrl, content);

            //
            var             rep = response.Content.ReadAsStringAsync();
            ResponseMessage msg = JsonConvert.DeserializeObject <ResponseMessage>(rep.Result);

            //
            return(msg);
        }