Class AbpCrudPageBase<TAppService, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput, TListViewModel, TCreateViewModel, TUpdateViewModel>
Inheritance
System.Object
AbpCrudPageBase<TAppService, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput, TListViewModel, TCreateViewModel, TUpdateViewModel>
Assembly: Volo.Abp.BlazoriseUI.dll
Syntax
public abstract class AbpCrudPageBase<TAppService, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput, TListViewModel, TCreateViewModel, TUpdateViewModel> : OwningComponentBase where TAppService : ICrudAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput> where TGetOutputDto : IEntityDto<TKey> where TGetListOutputDto : IEntityDto<TKey> where TGetListInput : new()
where TCreateInput : class where TUpdateInput : class where TListViewModel : IEntityDto<TKey> where TCreateViewModel : class, new()
where TUpdateViewModel : class, new()
Type Parameters
| Name |
Description |
| TAppService |
|
| TGetOutputDto |
|
| TGetListOutputDto |
|
| TKey |
|
| TGetListInput |
|
| TCreateInput |
|
| TUpdateInput |
|
| TListViewModel |
|
| TCreateViewModel |
|
| TUpdateViewModel |
|
Constructors
AbpCrudPageBase()
Declaration
protected AbpCrudPageBase()
Fields
CreateModal
Declaration
protected Modal CreateModal
Field Value
CurrentPage
Declaration
protected int CurrentPage
Field Value
| Type |
Description |
| System.Int32 |
|
CurrentSorting
Declaration
protected string CurrentSorting
Field Value
| Type |
Description |
| System.String |
|
EditingEntity
Declaration
protected TUpdateViewModel EditingEntity
Field Value
| Type |
Description |
| TUpdateViewModel |
|
EditingEntityId
Declaration
protected TKey EditingEntityId
Field Value
EditModal
Declaration
protected Modal EditModal
Field Value
Entities
Declaration
protected IReadOnlyList<TListViewModel> Entities
Field Value
| Type |
Description |
| System.Collections.Generic.IReadOnlyList<TListViewModel> |
|
NewEntity
Declaration
protected TCreateViewModel NewEntity
Field Value
| Type |
Description |
| TCreateViewModel |
|
TotalCount
Declaration
protected int? TotalCount
Field Value
| Type |
Description |
| System.Nullable<System.Int32> |
|
Properties
AppService
Declaration
protected TAppService AppService { get; set; }
Property Value
| Type |
Description |
| TAppService |
|
AuthorizationService
Declaration
protected IAuthorizationService AuthorizationService { get; set; }
Property Value
| Type |
Description |
| IAuthorizationService |
|
CreatePolicyName
Declaration
protected string CreatePolicyName { get; set; }
Property Value
| Type |
Description |
| System.String |
|
DeletePolicyName
Declaration
protected string DeletePolicyName { get; set; }
Property Value
| Type |
Description |
| System.String |
|
HasCreatePermission
Declaration
public bool HasCreatePermission { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
HasDeletePermission
Declaration
public bool HasDeletePermission { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
HasUpdatePermission
Declaration
public bool HasUpdatePermission { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
ObjectMapper
Declaration
protected IObjectMapper ObjectMapper { get; }
Property Value
| Type |
Description |
| IObjectMapper |
|
ObjectMapperContext
Declaration
protected Type ObjectMapperContext { get; set; }
Property Value
| Type |
Description |
| System.Type |
|
PageSize
Declaration
protected virtual int PageSize { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
UiLocalizer
Declaration
protected IStringLocalizer<AbpUiResource> UiLocalizer { get; set; }
Property Value
| Type |
Description |
| IStringLocalizer<AbpUiResource> |
|
UiMessageService
Declaration
protected IUiMessageService UiMessageService { get; set; }
Property Value
UpdatePolicyName
Declaration
protected string UpdatePolicyName { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Methods
CheckCreatePolicyAsync()
Declaration
protected virtual Task CheckCreatePolicyAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
CheckDeletePolicyAsync()
Declaration
protected virtual Task CheckDeletePolicyAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
CheckPolicyAsync(String)
Calls IAuthorizationService.CheckAsync for the given .
Throws if given policy was not granted for the current user.
Does nothing if is null or empty.
Declaration
protected virtual Task CheckPolicyAsync(string policyName)
Parameters
| Type |
Name |
Description |
| System.String |
policyName |
A policy name to check
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
CheckUpdatePolicyAsync()
Declaration
protected virtual Task CheckUpdatePolicyAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
CloseCreateModalAsync()
Declaration
protected virtual Task CloseCreateModalAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
CloseEditModalAsync()
Declaration
protected virtual Task CloseEditModalAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
CreateEntityAsync()
Declaration
protected virtual Task CreateEntityAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
CreateGetListInputAsync()
Declaration
protected virtual Task<TGetListInput> CreateGetListInputAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TGetListInput> |
|
DeleteEntityAsync(TListViewModel)
Declaration
protected virtual Task DeleteEntityAsync(TListViewModel entity)
Parameters
| Type |
Name |
Description |
| TListViewModel |
entity |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
GetDeleteConfirmationMessage(TListViewModel)
Declaration
protected virtual string GetDeleteConfirmationMessage(TListViewModel entity)
Parameters
| Type |
Name |
Description |
| TListViewModel |
entity |
|
Returns
| Type |
Description |
| System.String |
|
GetEntitiesAsync()
Declaration
protected virtual Task GetEntitiesAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
LazyGetRequiredService<TService>(ref TService)
Declaration
protected TService LazyGetRequiredService<TService>(ref TService reference)
Parameters
| Type |
Name |
Description |
| TService |
reference |
|
Returns
| Type |
Description |
| TService |
|
Type Parameters
| Name |
Description |
| TService |
|
LazyGetRequiredService<TRef>(Type, ref TRef)
Declaration
protected TRef LazyGetRequiredService<TRef>(Type serviceType, ref TRef reference)
Parameters
| Type |
Name |
Description |
| System.Type |
serviceType |
|
| TRef |
reference |
|
Returns
Type Parameters
MapToCreateInput(TCreateViewModel)
Declaration
protected virtual TCreateInput MapToCreateInput(TCreateViewModel createViewModel)
Parameters
| Type |
Name |
Description |
| TCreateViewModel |
createViewModel |
|
Returns
| Type |
Description |
| TCreateInput |
|
MapToEditingEntity(TGetOutputDto)
Declaration
protected virtual TUpdateViewModel MapToEditingEntity(TGetOutputDto entityDto)
Parameters
| Type |
Name |
Description |
| TGetOutputDto |
entityDto |
|
Returns
| Type |
Description |
| TUpdateViewModel |
|
MapToUpdateInput(TUpdateViewModel)
Declaration
protected virtual TUpdateInput MapToUpdateInput(TUpdateViewModel updateViewModel)
Parameters
| Type |
Name |
Description |
| TUpdateViewModel |
updateViewModel |
|
Returns
| Type |
Description |
| TUpdateInput |
|
OnDataGridReadAsync(DataGridReadDataEventArgs<TListViewModel>)
Declaration
protected virtual Task OnDataGridReadAsync(DataGridReadDataEventArgs<TListViewModel> e)
Parameters
| Type |
Name |
Description |
| DataGridReadDataEventArgs<TListViewModel> |
e |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
OpenCreateModalAsync()
Declaration
protected virtual Task OpenCreateModalAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
OpenEditModalAsync(TKey)
Declaration
protected virtual Task OpenEditModalAsync(TKey id)
Parameters
| Type |
Name |
Description |
| TKey |
id |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
SetPermissionsAsync()
Declaration
protected virtual Task SetPermissionsAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
UpdateEntityAsync()
Declaration
protected virtual Task UpdateEntityAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Extension Methods