public void GetDoctorName() { try { Dictionary <string, string> prament = new Dictionary <string, string>(); prament.Add("pageNo", "1"); prament.Add("pageSize", "1000"); //暂时没有分页就一页传大点 prament.Add("hospital.id", HelperClass.hospitalId); //医院主键 prament.Add("dept.id", HelperClass.deptId); //科室主键 Xr.RtCall.Model.RestSharpHelper.ReturnResult <List <string> >(InterfaceAddress.DoctorName, prament, Method.POST, result => { #region switch (result.ResponseStatus) { case ResponseStatus.Completed: if (result.StatusCode == System.Net.HttpStatusCode.OK) { Log4net.LogHelper.Info("请求结果:" + string.Join(",", result.Data.ToArray())); JObject objT = JObject.Parse(string.Join(",", result.Data.ToArray())); if (string.Compare(objT["state"].ToString(), "true", true) == 0) { listScheduling = objT["result"]["list"].ToObject <List <DoctorScheduling> >(); if (Convert.ToBoolean(AppContext.AppConfig.IsDoctorClinic)) { listScheduling = (from docotr in listScheduling where docotr.id == HelperClass.doctorId select docotr).ToList(); } List <string> listName = new List <string>(); List <Xr.Common.Controls.Item> listitem = new List <Common.Controls.Item>(); foreach (var item in listScheduling) { Xr.Common.Controls.Item it = new Common.Controls.Item(); it.name = item.name; it.value = item.id; it.tag = item.id; it.parentId = ""; listitem.Add(it); } _context.Send((s) => this.menuDoctor.setDataSource(listitem), null); _context.Send((s) => menuDoctor.EditValue(HelperClass.doctorId), null); } else { _context.Send((s) => Xr.Common.MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, Form1.pCurrentWin), null); } } break; } #endregion }); } catch (Exception ex) { Log4net.LogHelper.Error("叫号获取医生错误信息:" + ex.Message); } }
//dynamic listNum; /// <summary> /// 日期排班号源 /// </summary> /// <param name="time">日期</param> public void TimeScheduling(string time) { try { list = new List <string>(); Dictionary <string, string> prament = new Dictionary <string, string>(); prament.Add("hospitalId", HelperClass.hospitalId); //医院主键 prament.Add("deptId", HelperClass.deptId); //科室主键 prament.Add("doctorId", HelperClass.doctorId); //医生主键 prament.Add("workDate", time); //排班日期 prament.Add("type", "1"); //类型:0公开预约号源、1诊间预约号源 Xr.RtCall.Model.RestSharpHelper.ReturnResult <List <string> >(InterfaceAddress.findTimeNum, prament, Method.POST, result => { #region switch (result.ResponseStatus) { case ResponseStatus.Completed: if (result.StatusCode == System.Net.HttpStatusCode.OK) { Log4net.LogHelper.Info("请求结果:" + string.Join(",", result.Data.ToArray())); JObject objT = JObject.Parse(string.Join(",", result.Data.ToArray())); if (string.Compare(objT["state"].ToString(), "true", true) == 0) { List <TimeNum> timenum = objT["result"].ToObject <List <TimeNum> >(); List <Xr.Common.Controls.Item> listitem = new List <Common.Controls.Item>(); foreach (var item in timenum) { Xr.Common.Controls.Item it = new Common.Controls.Item(); it.name = item.beginTime + "-" + item.endTime + "" + "<" + item.num + ">"; it.value = item.id; it.tag = item.beginTime + "-" + item.endTime + "#" + item.mzType; it.parentId = item.id; if (item.mzType == "2") //特需门诊显红色 { it.spcialBColor = "Red"; } listitem.Add(it); } _context.Send((s) => this.menuList.setDataSource(listitem), null); } else { _context.Send((s) => Xr.Common.MessageBoxUtils.Show(objT["message"].ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, Form1.pCurrentWin), null); } } break; } #endregion }); } catch (Exception ex) { Log4net.LogHelper.Error("获取日期排班号源错误信息:" + ex.Message); } }