Exemple #1
0
        protected override async Task OnInitializedAsync()
        {
            tagId = base.Options;

            tagEntity = await tagService.FindAsync(tagId);

            await base.OnInitializedAsync();
        }
Exemple #2
0
        private async Task ValidatorByName(EditContext editContext)
        {
            BTagEntity other = await this.tagService.FindByNameAsync(tagEntity.Name);

            if (other != null && StringUtils.IsNotEqual(tagEntity.Id, other.Id))
            {
                // _times += 1; 跟踪同一个页面的验证次数
                // messageStore.Add(editContext.Field("Name"), "名字重复了 [第" + _times + "次验证]");
                messageStore.Add(editContext.Field("Name"), "名字重复了");
                // StateHasChanged();
            }
        }
Exemple #3
0
        protected override async Task OnInitializedAsync()
        {
            tagId = base.Options ?? null;

            if (StringUtils.IsBlank(tagId))
            {
                tagEntity = new BTagEntity();
            }
            else
            {
                tagEntity = await tagService.FindCloneAsync(tagId);
            }

            await base.OnInitializedAsync();
        }