//局部刷新 public ActionResult SymptomInfo(string UserId, string VisitId) { var user = Session["CurrentUser"] as UserAndRole; string DoctorId = user.UserId; SymptomsProfileViewModel SymptomInfoModel = new SymptomsProfileViewModel(); SymptomInfoModel.UserId = UserId; SymptomInfoModel.VisitId = VisitId; //加载症状列表 GetSymptomInfoList(ref SymptomInfoModel, DoctorId); ViewBag.MaxSynptomsNo = SymptomInfoModel.MaxSortNo; //SymptomInfoModel.ClinicalInfoList = GetClinicalInfoList(UserId); return PartialView("_SymptomInfo", SymptomInfoModel); }
//加载症状列表 public SymptomsProfileViewModel GetSymptomInfoList(ref SymptomsProfileViewModel model, string DoctorId) { string UserId = model.UserId; string VisitId = model.VisitId; DataSet SymptomsListds = _ServicesSoapClient.GetSymptomsList(UserId, VisitId); if (SymptomsListds.Tables.Count != 0) { DataTable SymptomsListdt = SymptomsListds.Tables[0]; List<SymptomInfo> list = new List<Models.SymptomInfo>(); int max = 0; foreach (DataRow dr in SymptomsListdt.Rows) { SymptomInfo item = new SymptomInfo(); item.SymptomsNo = Convert.ToInt32(dr["SynptomsNo"]); item.SymptomsType = dr["SymptomsType"].ToString(); item.SymptomsTypeName = dr["SymptomsTypeName"].ToString(); item.SymptomsCode = dr["SymptomsCode"].ToString(); item.SymptomsName = dr["SymptomsName"].ToString(); item.Description = dr["Description"].ToString(); item.RecordDate = ConvertDate(dr["RecordDate"].ToString()); item.RecordTime = ConvertTime(dr["RecordTime"].ToString()); item.Creator = dr["Creator"].ToString(); if (item.Creator == DoctorId) { item.IsAllowed = true; } else { item.IsAllowed = false; } list.Add(item); max = Convert.ToInt32(dr["SynptomsNo"]); } model.MaxSortNo = max; model.SymptomsList = list; } return model; }