57 lines
1.4 KiB
C#
57 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using WebDoorCreator.Data.DbModels;
|
|
using WebDoorCreator.UI.Data;
|
|
|
|
namespace WebDoorCreator.UI.Components.Hardware
|
|
{
|
|
public partial class HardwareNewPanel
|
|
{
|
|
#region Public Properties
|
|
|
|
[Parameter]
|
|
public int DoorId { get; set; } = 0;
|
|
|
|
[Parameter]
|
|
public bool HwAdded { get; set; } = false;
|
|
|
|
[Parameter]
|
|
public string HwCode { get; set; } = "";
|
|
|
|
[Parameter]
|
|
public string Lingua { get; set; } = "EN";
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Properties
|
|
|
|
protected List<DoorOpModel>? DoorOpList { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected WebDoorCreatorService WDCService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override async Task OnParametersSetAsync()
|
|
{
|
|
await ReloadData();
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Methods
|
|
|
|
private async Task ReloadData()
|
|
{
|
|
var ListRecord = await WDCService.DoorOpGetByDoorId(DoorId);
|
|
var tempListVal = await WDCService.ListValuesGetAll(HwCode, "Folder");
|
|
if (ListRecord != null)
|
|
{
|
|
DoorOpList = ListRecord.Where(x => (x.DoorId == DoorId) && (x.ObjectId == HwCode)).ToList();
|
|
}
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |