42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Components;
|
|
using System.Net.Http;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Components.Authorization;
|
|
using Microsoft.AspNetCore.Components.Forms;
|
|
using Microsoft.AspNetCore.Components.Routing;
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
using Microsoft.AspNetCore.Components.Web.Virtualization;
|
|
using Microsoft.JSInterop;
|
|
using EgwCoreLib.Razor;
|
|
using EgwCoreLib.Razor.Data;
|
|
using StockMan.CORE;
|
|
using StockMan.CORE.Data;
|
|
using StockMan.CORE.Shared;
|
|
|
|
namespace StockMan.CORE.Components
|
|
{
|
|
public partial class VisualButtons
|
|
{
|
|
[Parameter]
|
|
public string idForJs { get; set; } = "";
|
|
|
|
[Parameter]
|
|
public EventCallback<bool> callbackForJs { get; set; }
|
|
|
|
[Inject]
|
|
protected IJSRuntime JSRuntime { get; set; } = null!;
|
|
|
|
protected bool editMode = false;
|
|
|
|
private async Task enableEdit()
|
|
{
|
|
await callbackForJs.InvokeAsync(editMode);
|
|
editMode = true;
|
|
await JSRuntime.InvokeVoidAsync("isEditing", idForJs);
|
|
}
|
|
}
|
|
} |