public ViewResultBase Details() { if (!string.IsNullOrEmpty(Request["isTooltip"])) { Guid id; if (Guid.TryParse(Request["id"], out id)) { var data = ButtonInfo.Create(base.EntityType.GetData(id)); return(new PartialViewResult { ViewName = "Partials/Details", ViewData = new ViewDataDictionary(data) }); } else { throw new ValidationException("非法的Guid标识" + Request["id"]); } } else if (!string.IsNullOrEmpty(Request["isInner"])) { return(new PartialViewResult { ViewName = "Partials/Details" }); } else { return(this.View()); } }
public ActionResult GetInfo(Guid?id) { if (!id.HasValue) { throw new ValidationException("未传入标识"); } return(this.JsonResult(ButtonInfo.Create(base.EntityType.GetData(id.Value)))); }