public ViewResultBase Details()
 {
     if (!string.IsNullOrEmpty(Request["isTooltip"]))
     {
         Guid id;
         if (Guid.TryParse(Request["id"], out id))
         {
             var data = AppSystemInfo.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(AppSystemInfo.Create(base.EntityType.GetData(id.Value))));
 }
 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()));
     }
 }
Beispiel #4
0
 /// <summary>创建应用系统
 /// </summary>
 public void Handle(ICommandContext context, CreateAppSystem command)
 {
     _lockService.ExecuteInLock(typeof(AppSystem).Name, () =>
     {
         _accountService.CheckExist(command.AccountId);
         var info = new AppSystemInfo(
             command.Code,
             command.Name,
             command.AccountId,
             command.ReMark);
         var appSystem = new AppSystem(
             command.AggregateRootId,
             info,
             command.SafeKey);
         context.Add(appSystem);
     });
 }
    void Awake()
    {
#if !UNITY_EDITOR && UNITY_ANDROID
        ApplicationUtility.instance.GetAppName();
#endif
        if (mOnlyInstance == null)
        {
            mOnlyInstance = this;

            //初始化系统信息
            AppSystemInfo.InitSysInfos();
            OnLoad();
        }
        else
        {
            GameObject.Destroy(this.gameObject);
        }
    }
Beispiel #6
0
    public void ConnectServerSucceed()
    {
        GameDebug.Log("连接到服务器成功");

        LoginActionParam param = new LoginActionParam();

        param.ClientVer    = AppSystemInfo.GetAppVersion();
        param.UserName     = mUserName;
        param.Passwd       = mPasswd;
        param.TencentLogin = mTencentLogin;

        param.OpenId       = PlatformSDK.OpenId;
        param.Platform     = PlatformSDK.Platform;
        param.AccessToken  = PlatformSDK.AccessToken;
        param.PayToken     = PlatformSDK.PayToken;
        param.Pf           = PlatformSDK.Pf;
        param.PfKey        = PlatformSDK.PfKey;
        param.RegChannel   = PlatformSDK.RegChannel;
        param.SetupChannel = PlatformSDK.SetupChannel;
        param.ClientSystem = PlatformSDK.ClientSystem;
        param.TXPlat       = PlatformSDK.TXPlat;

        Net.Instance.DoAction((int)MESSAGE_ID.ID_MSG_LOGIN, param, true);
    }