//加载症状列表 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; }
public static void GetSymptomsList(ServicesSoapClient _ServicesSoapClient, ref SymptomsViewModel sy) { DataSet SymptomsDS = new DataSet(); DataTable SymptomsInfoList = new DataTable(); SymptomsDS = _ServicesSoapClient.GetSymptomsListByPId(sy.PId); SymptomsInfoList = SymptomsDS.Tables[0]; foreach (DataRow SymptomsDR in SymptomsInfoList.Rows) { SymptomInfo SymptomInfoItem = new SymptomInfo(); String Date = string.Empty; String Time = string.Empty; SymptomInfoItem.UserId = sy.PId; SymptomInfoItem.VisitId = SymptomsDR["VisitId"].ToString(); SymptomInfoItem.SymptomsNo = Convert.ToInt32(SymptomsDR["SynptomsNo"]); SymptomInfoItem.SymptomsTypeName = SymptomsDR["SymptomsTypeName"].ToString(); SymptomInfoItem.SymptomsName = SymptomsDR["SymptomsName"].ToString(); SymptomInfoItem.Description = SymptomsDR["Description"].ToString(); SymptomInfoItem.RecordDate = Functions.ConvertDate(SymptomsDR["RecordDate"].ToString()); SymptomInfoItem.RecordTime = Functions.ConvertTime(SymptomsDR["RecordTime"].ToString()); SymptomInfoItem.ReInUserId = SymptomsDR["ReInUserId"].ToString(); if (SymptomInfoItem.ReInUserId == sy.UserId) { SymptomInfoItem.IsAllowed = true; } else { SymptomInfoItem.IsAllowed = false; } sy.SymptomsList.Add(SymptomInfoItem); } }