Exemplo n.º 1
0
        public override RequestResult <UserInfo> WebRequest(UserInfoEventData eventData)
        {
            UserClientServiceProxy userClientService = new UserClientServiceProxy(apiHost, httpClient);
            var res = userClientService.GetAsync(eventData.UserId).Result;

            if (res.Success)
            {
                SmartSystemCommonConsts.UserInfo = res.Result;
                Messenger.Default.Send(SmartSystemCommonConsts.UserInfo);
            }
            return(res);
        }
Exemplo n.º 2
0
        public override RequestResult <AbpUserConfiguration> WebRequest(UserLanguageEventData eventData)
        {
            if (string.IsNullOrEmpty(eventData.Culture))
            {
                return(null);
            }
            UserClientServiceProxy userClientService = new UserClientServiceProxy(apiHost, httpClient);

            userClientService.ChangeLanguageAsync(new ChangeUserLanguageDto()
            {
                LanguageName = eventData.Culture
            }).Wait();
            var tokenAuthClient = new TokenAuthClient(apiHost, httpClient);
            var obj2            = tokenAuthClient.GetUserConfiguraionAsync().Result;

            if (obj2.Success)
            {
                SmartSystemCommonConsts.UserConfiguration = obj2.Result;
                new BaseTranslate().Translate();
            }
            return(obj2);
        }