Exemple #1
0
        protected void Query()
        {
            if (!form.IsValid())
            {
                return;
            }

            Components = ComponentService.GetComponents(productId, SelectedVersionId.Value);

            EmptyMessage = null;
            table.MarkAsRequireRender();
            RequireRender = true;
        }
 protected void ProductSelected(BChangeEventArgs <BSelectOptionBase <int?> > arg)
 {
     Steps.Clear();
     table.MarkAsRequireRender();
     RequireRender = true;
     if (arg.NewValue.Value.HasValue)
     {
         productId       = arg.NewValue.Value.Value;
         productVersions = ProductService.GetProductVersions(arg.NewValue.Value.Value);
         Versions        = productVersions.ToDictionary(x => x.Id, x => x.Version);
     }
     else
     {
         productId = 0;
         productVersions.Clear();
         Versions.Clear();
     }
 }
        protected async Task EditAsync(object product)
        {
            var productModel = product as ProductModel;
            var parameters   = new Dictionary <string, object>();

            parameters.Add(nameof(ProductEdit.ProductModel), new CreateProductModel()
            {
                Description      = productModel.Description,
                GitHub           = productModel.GitHub,
                Id               = productModel.Id,
                NugetPackageName = productModel.NugetPackageName
            });
            await DialogService.ShowDialogAsync <ProductEdit>("更新产品基本信息", parameters);

            products = productService.GetProducts();
            table.MarkAsRequireRender();
            RequireRender = true;
        }
Exemple #4
0
 protected void SetData(IList <T> datas = null, int?Total = 0)
 {
     datas ??= new List <T>();
     Datas     = datas;
     DataCount = Total ?? 0;
     searchForm?.MarkAsRequireRender();
     table?.MarkAsRequireRender();
     StateHasChanged();
 }
Exemple #5
0
        private async Task RefreshUsersAsync()
        {
            if (table == null)
            {
                return;
            }
            Users = await UserService.GetUsersAsync();

            table.MarkAsRequireRender();
            RequireRender = true;
            StateHasChanged();
        }
Exemple #6
0
 private Task RefreshRolesAsync()
 {
     if (table == null)
     {
         return(Task.CompletedTask);
     }
     RoleModels = UserService.GetRoles();
     table.MarkAsRequireRender();
     RequireRender = true;
     StateHasChanged();
     return(Task.CompletedTask);
 }
Exemple #7
0
        private async Task LoadDatas()
        {
            var RoleClaimResponse = await NetService.QueryRoleClaims(RoleId);

            if (RoleClaimResponse.IsSuccess)
            {
                Claims = RoleClaimResponse.Data;
                table?.MarkAsRequireRender();
                RequireRender = true;
                this.StateHasChanged();
            }
        }
        public async Task <Task> RefreshAsync()
        {
            if (table == null)
            {
                return(Task.CompletedTask);
            }

            isLoading = true;
            var condition = searchForm.GetValue <ConnectionEntity>();

            Connections = await ConnectionService.GetListAsync(condition.ConnectionName);

            isLoading = false;
            table.MarkAsRequireRender();
            RequireRender = true;
            StateHasChanged();
            return(Task.CompletedTask);
        }
Exemple #9
0
 internal async Task Submit()
 {
     condition = searchForm.GetValue <SearchCondition>();
     Datas     = AllDatas.Where(x => x.Name.Contains(condition.Name)).ToList();
     table.MarkAsRequireRender();
 }