/// <summary> /// 显示病例详情 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Detail(int id) { ViewBag.CurrentUser = CurrentUser; if (CurrentUser != null) { ViewBag.Collection = AccountMgr.GetUserCollection(CurrentUser.id, ContentType.病例, id); } var obj = PatientCaseMgr.GetPatientCase(id); #region 将病例图片列表自定义序列化为json字符串 if (obj.patientcase_image.Count > 0) { var json = string.Empty; foreach (var img in obj.patientcase_image) { json += string.Format(@"{{ url: '/FileUpload/patientcase/{0}/{1}', caption: '{2}' }}, ", id.ToString(), img.cmn_image.path, img.description); } ViewBag.ImagesJson = "[" + json + "]"; } #endregion return(View(obj)); }
/// <summary> /// 显示指定会诊病例的编辑界面 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Edit(int id) { ViewBag.CurrentUser = CurrentUser; var obj = PatientCaseMgr.GetPatientCase(id); return(View(obj)); }