/// <summary> /// 删除 /// </summary> /// <param name="id">文章ID</param> /// <returns></returns> public JsonResult Delete(int id) { //删除附件 var _commonModel = commomModelService.Find(id); if (_commonModel == null) { return(Json(false)); } //删除附件文件 foreach (var _attachment in _commonModel.Attachment) { System.IO.File.Delete(Server.MapPath(_attachment.FileParth)); } if (commomModelService.Delete(_commonModel)) { return(Json(true)); } else { return(Json(false)); } }
// // GET: /Member/Consultation/ public ActionResult Index(int id) { return(PartialView(commonModelService.Find(id).Consultation)); }