public ViewResultBase Details()
 {
     if (!string.IsNullOrEmpty(Request["isTooltip"]))
     {
         Guid id;
         if (Guid.TryParse(Request["id"], out id))
         {
             var data = CatalogInfo.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)
     {
         FunctionState function;
         if (AcDomain.FunctionSet.TryGetFunction(id.Value, out function))
         {
             EntityTypeState functionEntityType;
             if (!AcDomain.EntityTypeSet.TryGetEntityType(new Coder("Ac", "Function"), out functionEntityType))
             {
                 throw new GeneralException();
             }
             var functionInfo = FunctionInfo.Create(functionEntityType.GetData(id.Value));
             functionInfo.Add("Name", functionInfo["Description"]);
             CatalogState parentCatalog;
             if (!AcDomain.CatalogSet.TryGetCatalog((Guid)functionInfo["ResourceTypeId"], out parentCatalog))
             {
                 throw new GeneralException();
             }
             functionInfo.Add("ParentCode", parentCatalog.Code);
             functionInfo.Add("ParentName", parentCatalog.Name);
             functionInfo.Add("CategoryCode", "operation");
             functionInfo.Add("CategoryName", "绑定在资源类型上的操作");
             return(this.JsonResult(functionInfo));
         }
         var recordInfo = CatalogInfo.Create(base.EntityType.GetData(id.Value));
         if (recordInfo == null)
         {
             return(this.JsonResult(GetEmptyCatalogInfo()));
         }
         AppSystemState appSystem;
         if (AcDomain.AppSystemSet.TryGetAppSystem(id.Value, out appSystem))
         {
             EntityTypeState appSystemEntityType;
             if (!AcDomain.EntityTypeSet.TryGetEntityType(new Coder("Ac", "AppSystem"), out appSystemEntityType))
             {
                 throw new GeneralException();
             }
             recordInfo.Add("data", AppSystemInfo.Create(appSystemEntityType.GetData(id.Value)));
         }
         return(this.JsonResult(recordInfo));
     }
     else
     {
         return(this.JsonResult(GetEmptyCatalogInfo()));
     }
 }