Esempio n. 1
0
        public ResponseMessage GetThisStaffAppointmentListControllerService(AppointmentDataPayload data)
        {
            var jsonString = JsonConvert.SerializeObject(data);
            var content    = new StringContent(jsonString, Encoding.UTF8, "application/json");
            var response   = _client.PostAsync(GetThisStaffAppointmentListControllerUrl, content).Result;
            //
            var             rep = response.Content.ReadAsStringAsync();
            ResponseMessage msg = JsonConvert.DeserializeObject <ResponseMessage>(rep.Result);

            //
            return(msg);
        }
Esempio n. 2
0
        public async System.Threading.Tasks.Task <ResponseMessage> UpdateThisAppointmentControllerService(AppointmentDataPayload data)
        {
            var jsonString = JsonConvert.SerializeObject(data);
            var content    = new StringContent(jsonString, Encoding.UTF8, "application/json");
            var response   = await _client.PostAsync(UpdateThisAppointmentControllerUrl, content);

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

            //
            return(msg);
        }
Esempio n. 3
0
        public async System.Threading.Tasks.Task <ResponseMessage> CheckIfAppointmentExistService(AppointmentDataPayload data)
        {
            var jsonString = JsonConvert.SerializeObject(data);
            var content    = new StringContent(jsonString, Encoding.UTF8, "application/json");
            var response   = await _client.PostAsync(CheckIfAppointmentExistUrl, content);

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

            //
            return(msg);
        }