コード例 #1
0
        public bool Delete(Customer_Data data) //Read 함수;
        {
            HttpResponseMessage response = client.DeleteAsync("Customer/" + data.no).Result;

            if (response.IsSuccessStatusCode)
            {
                return(true);
            }
            return(false);
        }
コード例 #2
0
        public bool Update(Customer_Data data) //Read 함수;
        {
            MediaTypeFormatter  JsonMessage = new JsonMediaTypeFormatter();
            HttpContent         content     = new ObjectContent <Customer_Data>(data, JsonMessage);
            HttpResponseMessage response    = client.PutAsync("Customer/" + data.no, content).Result;

            if (response.IsSuccessStatusCode)
            {
                return(true);
            }
            return(false);
        }