diff --git a/GWMS.Data/Controllers/GWMSController.cs b/GWMS.Data/Controllers/GWMSController.cs
index d0b062a..056cf0c 100644
--- a/GWMS.Data/Controllers/GWMSController.cs
+++ b/GWMS.Data/Controllers/GWMSController.cs
@@ -458,6 +458,29 @@ namespace GWMS.Data.Controllers
return done;
}
+ ///
+ /// Elimina un item WeekPlan
+ ///
+ ///
+ ///
+ public bool WeekPlanDelete(WeekPlanModel selRecord)
+ {
+ bool done = false;
+ try
+ {
+ var item2del = dbCtx
+ .DbSetPlantSupplWeekPlan
+ .Where(x => x.WeekPlanId == selRecord.WeekPlanId)
+ .FirstOrDefault();
+ dbCtx.DbSetPlantSupplWeekPlan.Remove(item2del);
+ dbCtx.SaveChanges();
+ done = true;
+ }
+ catch (Exception exc)
+ { }
+ return done;
+ }
+
///
/// Aggiorna un item WeekPlan
///
diff --git a/GWMS.UI/Components/WeekPlanEditor.razor b/GWMS.UI/Components/WeekPlanEditor.razor
index 5ab81b9..caaf8b2 100644
--- a/GWMS.UI/Components/WeekPlanEditor.razor
+++ b/GWMS.UI/Components/WeekPlanEditor.razor
@@ -9,6 +9,7 @@
@inject MessageService AppMService
@inject GWMSDataService DataService
@inject IConfiguration Configuration
+@inject IJSRuntime JSRuntime