//done //获取所有科室名称 public HttpResponseMessage GetAllClinic() { // 只需要获取名字就可以了 // Clinic表获取所有名称 ArrayList list = PatientHelper.GetAllClinic(); HttpResponseMessage response = new HttpResponseMessage(); if (list == null) { response.Content = new StringContent("查询失败"); response.StatusCode = HttpStatusCode.NotFound; } else if (list.Count == 0) { response.Content = new StringContent("查询列表空"); response.StatusCode = HttpStatusCode.OK; } else { response.Content = new StringContent(JsonObjectConverter.ObjectToJson(list)); response.StatusCode = HttpStatusCode.OK; } return(response); }