mirror of https://github.com/abpframework/abp.git
10 changed files with 168 additions and 71 deletions
@ -0,0 +1,11 @@ |
|||
@typeparam TEntity |
|||
@typeparam TResourceType |
|||
@using Volo.Abp.BlazoriseUI |
|||
@using Volo.Abp.Localization |
|||
|
|||
@if (PropertyInfo != null && Entity != null) |
|||
{ |
|||
<Field> |
|||
<Check TValue="bool" @bind-Checked="@Value">@PropertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)</Check> |
|||
</Field> |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
using Microsoft.AspNetCore.Components; |
|||
using Microsoft.Extensions.Localization; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.ObjectExtending; |
|||
|
|||
namespace Volo.Abp.BlazoriseUI.Components.ObjectExtending |
|||
{ |
|||
public partial class CheckExtensionProperty<TEntity, TResourceType> : ComponentBase |
|||
where TEntity : IHasExtraProperties |
|||
{ |
|||
[Inject] |
|||
public IStringLocalizerFactory StringLocalizerFactory { get; set; } |
|||
|
|||
[Parameter] |
|||
public TEntity Entity { get; set; } |
|||
|
|||
[Parameter] |
|||
public ObjectExtensionPropertyInfo PropertyInfo { get; set; } |
|||
|
|||
protected bool Value |
|||
{ |
|||
get |
|||
{ |
|||
return PropertyInfo.GetInputValueOrDefault<bool>(Entity.GetProperty(PropertyInfo.Name)); |
|||
} |
|||
set |
|||
{ |
|||
Entity.SetProperty(PropertyInfo.Name, value, false); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
@typeparam TEntity |
|||
@typeparam TResourceType |
|||
@using Volo.Abp.BlazoriseUI |
|||
@using Volo.Abp.Localization |
|||
|
|||
@if (PropertyInfo != null && Entity != null) |
|||
{ |
|||
<Field> |
|||
<FieldLabel>@PropertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)</FieldLabel> |
|||
<DateEdit TValue="DateTime?" |
|||
Pattern="@PropertyInfo.GetDateEditInputFormatOrNull()" |
|||
@bind-Date="@Value"> |
|||
</DateEdit> |
|||
|
|||
@*<input @bind=CurrentValue |
|||
@bind- |
|||
@bind:format="@propertyInfo.GetDateEditInputFormatOrNull()" |
|||
type="datetime-local" />*@ |
|||
</Field> |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
using Microsoft.AspNetCore.Components; |
|||
using Microsoft.Extensions.Localization; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.ObjectExtending; |
|||
|
|||
namespace Volo.Abp.BlazoriseUI.Components.ObjectExtending |
|||
{ |
|||
public partial class DateTimeExtensionProperty<TEntity, TResourceType> : ComponentBase |
|||
where TEntity : IHasExtraProperties |
|||
{ |
|||
[Inject] |
|||
public IStringLocalizerFactory StringLocalizerFactory { get; set; } |
|||
|
|||
[Parameter] |
|||
public TEntity Entity { get; set; } |
|||
|
|||
[Parameter] |
|||
public ObjectExtensionPropertyInfo PropertyInfo { get; set; } |
|||
|
|||
protected DateTime? Value |
|||
{ |
|||
get |
|||
{ |
|||
return PropertyInfo.GetInputValueOrDefault<DateTime?>(Entity.GetProperty(PropertyInfo.Name)); |
|||
} |
|||
set |
|||
{ |
|||
Entity.SetProperty(PropertyInfo.Name, value, false); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
@typeparam TEntity |
|||
@typeparam TResourceType |
|||
@using Volo.Abp.BlazoriseUI |
|||
@using Volo.Abp.Localization |
|||
|
|||
@if (PropertyInfo != null && Entity != null) |
|||
{ |
|||
<Field> |
|||
<FieldLabel>@PropertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)</FieldLabel>--> |
|||
<TimeEdit TValue="TimeSpan?" @bind-Time="@Value"> |
|||
</TimeEdit> |
|||
</Field> |
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
using Microsoft.AspNetCore.Components; |
|||
using Microsoft.Extensions.Localization; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.ObjectExtending; |
|||
|
|||
namespace Volo.Abp.BlazoriseUI.Components.ObjectExtending |
|||
{ |
|||
public partial class TimeExtensionProperty<TEntity, TResourceType> : ComponentBase |
|||
where TEntity : IHasExtraProperties |
|||
{ |
|||
[Inject] |
|||
public IStringLocalizerFactory StringLocalizerFactory { get; set; } |
|||
|
|||
[Parameter] |
|||
public TEntity Entity { get; set; } |
|||
|
|||
[Parameter] |
|||
public ObjectExtensionPropertyInfo PropertyInfo { get; set; } |
|||
|
|||
protected TimeSpan? Value |
|||
{ |
|||
get |
|||
{ |
|||
return PropertyInfo.GetInputValueOrDefault<TimeSpan?>(Entity.GetProperty(PropertyInfo.Name)); |
|||
} |
|||
set |
|||
{ |
|||
Entity.SetProperty(PropertyInfo.Name, value, false); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue