Ejemplo n.º 1
0
        protected override Task RenderOutputAsync(RegisterProviderContext context, RegisterProviderOutput <OutputModel> output)
        {
            output.WithTitle("Batch import result")
            .AppendDataTable(
                elements: output.Model,
                tableClass: "text-center table-hover",
                theadClass: "thead-light");

            return(Task.CompletedTask);
        }
Ejemplo n.º 2
0
        protected override Task RenderInputAsync(RegisterProviderContext context, RegisterProviderOutput <InputModel> output)
        {
            output.WithTitle("Batch team register")
            .AppendValidationSummary()
            .AppendSelect(
                @for: __model => __model.AffiliationId,
                items: output.Model.Affiliations.Values.Select(a => new SelectListItem(a.Name, $"{a.Id}")))
            .AppendSelect(
                @for: __model => __model.CategoryId,
                items: output.Model.Categories.Values.Select(c => new SelectListItem(c.Name, $"{c.Id}")))
            .AppendTextArea(
                @for: __model => __model.TeamNames,
                comment: "队伍名称,每个一行,区分大小写和空格,提交后会绑定新用户并重置密码。");

            return(Task.CompletedTask);
        }
Ejemplo n.º 3
0
 /// <inheritdoc />
 protected override sealed Task RenderOutputAsync(RegisterProviderContext context, RegisterProviderOutput <StatusMessageModel> output)
 => throw new System.NotSupportedException();
Ejemplo n.º 4
0
 Task IRegisterProvider.RenderOutputAsync(RegisterProviderContext context, RegisterProviderOutput output)
 => RenderOutputAsync(context, (RegisterProviderOutput <TOutputModel>)output);
Ejemplo n.º 5
0
 /// <inheritdoc cref="IRegisterProvider.RenderOutputAsync(RegisterProviderContext, RegisterProviderOutput)" />
 protected abstract Task RenderOutputAsync(RegisterProviderContext context, RegisterProviderOutput <TOutputModel> output);