private bool GetMedicalAdvice(string zyID, out DataTable dtM, out DataTable dtD) { bool result = false; dtM = null; dtD = null; JObject jo = null; string sEntity = null, sReq = null, sData = null; //请求体字符串,响应返回字符串,返回区数据字符串 string apiUrl = Global.WebApiUrl + "/api/frame/report/getDataEx"; void myGetData(ref DataTable dt) { //本地函数根据请求返回结果数据表 sReq = WebApiMethod.RequestJsonPostMethod(apiUrl, sEntity, out string sMsg); if (!string.IsNullOrEmpty(sReq)) { JObject joM = JObject.Parse(sReq); sData = joM["list"].ToString(); dt = JsonConvert.DeserializeObject<DataTable>(sData); } } try { //1跟住院id取得住院信息 jo = JObject.FromObject(new { RPT_ID = "YCHZ_YZXX_M", pageSize = 10000, auth = Global.WebApiAuth, PARAS = new { ZYID = zyID } }); sEntity = jo.ToString(); myGetData(ref dtM); } catch (Exception E) { MessageBox.Show("获取住院信息失败! " + E.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } return result; }