Ejemplo n.º 1
0
        protected override async Task OnInitializedAsync()
        {
            cryptoId = base.Options;

            cryptoEntity = await cryptoService.FindAsync(cryptoId);

            await base.OnInitializedAsync();
        }
Ejemplo n.º 2
0
        private async Task ValidatorByName(EditContext editContext)
        {
            BCryptoEntity other = await this.cryptoService.FindBySecretAsync(cryptoEntity.Secret);

            if (other != null && StringUtils.IsNotEqual(cryptoEntity.Id, other.Id))
            {
                messageStore.Add(editContext.Field(nameof(BCryptoEntity.Secret)), "密码重复了");
            }
        }
Ejemplo n.º 3
0
        protected override async Task OnInitializedAsync()
        {
            cryptoId = base.Options ?? null;

            if (StringUtils.IsBlank(cryptoId))
            {
                cryptoEntity = new BCryptoEntity();
            }
            else
            {
                cryptoEntity = await cryptoService.FindCloneAsync(cryptoId);
            }

            await base.OnInitializedAsync();
        }