示例#1
0
        public HttpResponseMessage GetEmployeeDutyTime(string employeeId)
        {
            HttpResponseMessage response = new HttpResponseMessage();
            // 返回医生值班的时间
            // employee表找到duty_id
            // duty表找到所有数据

            Duty employeeDuty = PatientHelper.GetEmployeeDutyTime(employeeId);

            //duty不存在
            if (employeeDuty == null)
            {
                response.Content    = new StringContent("医生Id错误,或医生没有值班信息");
                response.StatusCode = HttpStatusCode.NotFound;
            }
            else
            {
                response.Content    = new StringContent(JsonObjectConverter.ObjectToJson(employeeDuty));
                response.StatusCode = HttpStatusCode.OK;
            }

            return(response);
        }