示例#1
0
        public async Task SaveICO(ICOInput input)
        {
            try
            {
                var user = await _userRepository.FirstOrDefaultAsync(item => item.Id == AbpSession.UserId);

                if (user != null)
                {
                    user.CompanyTenant    = input.CompanyTenant;
                    user.TokenDescription = input.TokenDescription;
                    user.TokenName        = input.TokenName;
                    user.WiredInstruction = input.WiredInstruction;
                    await _userRepository.UpdateAsync(user);
                }
            }
            catch (Exception ex)
            {
                throw new UserFriendlyException(ex.Message);
            }
        }
示例#2
0
        public async Task <ICOInput> GetICO()
        {
            try
            {
                var user = await _userRepository.FirstOrDefaultAsync(item => item.Id == AbpSession.UserId);

                if (user != null)
                {
                    var outputICO = new ICOInput()
                    {
                        CompanyTenant    = user.CompanyTenant,
                        TokenDescription = user.TokenDescription,
                        TokenName        = user.TokenName,
                        WiredInstruction = user.WiredInstruction
                    };
                    return(outputICO);
                }
                throw new Exception();
            }
            catch (Exception ex)
            {
                throw new UserFriendlyException(ex.Message);
            }
        }