From 7cedbecfbe466117f669b11a10681c3c9e4a4541 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 3 Oct 2023 09:47:34 +0200 Subject: [PATCH] Completata bozza pagine + ctr principali --- MP-TAB-SERV/Components/AlarmsMan.razor | 5 ++ MP-TAB-SERV/Components/ControlsMan.razor | 5 ++ MP-TAB-SERV/Components/IobInfoMan.razor | 5 ++ MP-TAB-SERV/Components/IobInfoMan.razor.cs | 0 MP-TAB-SERV/Components/ProdPlanMan.razor | 5 ++ MP-TAB-SERV/Components/WorkShiftMan.razor | 5 ++ MP-TAB-SERV/Pages/Alarms.razor | 13 +++++ MP-TAB-SERV/Pages/Alarms.razor.cs | 45 ++++++++++++++++ MP-TAB-SERV/Pages/Controls.razor | 13 +++++ MP-TAB-SERV/Pages/Controls.razor.cs | 45 ++++++++++++++++ MP-TAB-SERV/Pages/Declarations.razor | 2 +- MP-TAB-SERV/Pages/IobInfo.razor | 13 +++++ MP-TAB-SERV/Pages/IobInfo.razor.cs | 63 ++++++++++++++++++++++ MP-TAB-SERV/Pages/Notes.razor | 2 +- MP-TAB-SERV/Pages/ProdPlan.razor | 13 +++++ MP-TAB-SERV/Pages/ProdPlan.razor.cs | 45 ++++++++++++++++ MP-TAB-SERV/Pages/Scrap.razor | 14 ++++- MP-TAB-SERV/Pages/Scrap.razor.cs | 53 +++++++++++------- MP-TAB-SERV/Pages/WorkShift.razor | 14 +++++ MP-TAB-SERV/Pages/WorkShift.razor.cs | 45 ++++++++++++++++ 20 files changed, 383 insertions(+), 22 deletions(-) create mode 100644 MP-TAB-SERV/Components/AlarmsMan.razor create mode 100644 MP-TAB-SERV/Components/ControlsMan.razor create mode 100644 MP-TAB-SERV/Components/IobInfoMan.razor create mode 100644 MP-TAB-SERV/Components/IobInfoMan.razor.cs create mode 100644 MP-TAB-SERV/Components/ProdPlanMan.razor create mode 100644 MP-TAB-SERV/Components/WorkShiftMan.razor create mode 100644 MP-TAB-SERV/Pages/Alarms.razor create mode 100644 MP-TAB-SERV/Pages/Alarms.razor.cs create mode 100644 MP-TAB-SERV/Pages/Controls.razor create mode 100644 MP-TAB-SERV/Pages/Controls.razor.cs create mode 100644 MP-TAB-SERV/Pages/IobInfo.razor create mode 100644 MP-TAB-SERV/Pages/IobInfo.razor.cs create mode 100644 MP-TAB-SERV/Pages/ProdPlan.razor create mode 100644 MP-TAB-SERV/Pages/ProdPlan.razor.cs create mode 100644 MP-TAB-SERV/Pages/WorkShift.razor create mode 100644 MP-TAB-SERV/Pages/WorkShift.razor.cs diff --git a/MP-TAB-SERV/Components/AlarmsMan.razor b/MP-TAB-SERV/Components/AlarmsMan.razor new file mode 100644 index 00000000..f88c457c --- /dev/null +++ b/MP-TAB-SERV/Components/AlarmsMan.razor @@ -0,0 +1,5 @@ +

AlarmsMan

+ +@code { + +} diff --git a/MP-TAB-SERV/Components/ControlsMan.razor b/MP-TAB-SERV/Components/ControlsMan.razor new file mode 100644 index 00000000..7e1c74cd --- /dev/null +++ b/MP-TAB-SERV/Components/ControlsMan.razor @@ -0,0 +1,5 @@ +

ControlsMan

+ +@code { + +} diff --git a/MP-TAB-SERV/Components/IobInfoMan.razor b/MP-TAB-SERV/Components/IobInfoMan.razor new file mode 100644 index 00000000..0ca74e68 --- /dev/null +++ b/MP-TAB-SERV/Components/IobInfoMan.razor @@ -0,0 +1,5 @@ +

IobInfoMan

+ +@code { + +} diff --git a/MP-TAB-SERV/Components/IobInfoMan.razor.cs b/MP-TAB-SERV/Components/IobInfoMan.razor.cs new file mode 100644 index 00000000..e69de29b diff --git a/MP-TAB-SERV/Components/ProdPlanMan.razor b/MP-TAB-SERV/Components/ProdPlanMan.razor new file mode 100644 index 00000000..6dc6ac4a --- /dev/null +++ b/MP-TAB-SERV/Components/ProdPlanMan.razor @@ -0,0 +1,5 @@ +

ProdPlanMan

+ +@code { + +} diff --git a/MP-TAB-SERV/Components/WorkShiftMan.razor b/MP-TAB-SERV/Components/WorkShiftMan.razor new file mode 100644 index 00000000..636e5d4b --- /dev/null +++ b/MP-TAB-SERV/Components/WorkShiftMan.razor @@ -0,0 +1,5 @@ +

WorkShiftMan

+ +@code { + +} diff --git a/MP-TAB-SERV/Pages/Alarms.razor b/MP-TAB-SERV/Pages/Alarms.razor new file mode 100644 index 00000000..2c43a4e6 --- /dev/null +++ b/MP-TAB-SERV/Pages/Alarms.razor @@ -0,0 +1,13 @@ +@page "/alarms" + +@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null) +{ + +} +else +{ +
+ +
+ +} diff --git a/MP-TAB-SERV/Pages/Alarms.razor.cs b/MP-TAB-SERV/Pages/Alarms.razor.cs new file mode 100644 index 00000000..4e0ed46c --- /dev/null +++ b/MP-TAB-SERV/Pages/Alarms.razor.cs @@ -0,0 +1,45 @@ +using global::Microsoft.AspNetCore.Components; +using MP.Data.DatabaseModels; +using MP.Data.Services; + +namespace MP_TAB_SERV.Pages +{ + public partial class Alarms + { + #region Protected Properties + + protected MappaStatoExpl? CurrMSE { get; set; } = null; + protected string IdxMacc { get; set; } = ""; + + [Inject] + protected MessageService MsgServ { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + protected override async Task OnInitializedAsync() + { + await ReloadData(); + } + + #endregion Protected Methods + + #region Private Methods + + private async Task ReloadData() + { + if (string.IsNullOrEmpty(IdxMacc)) + { + IdxMacc = await MsgServ.IdxMaccGet(); + // recupero MSE macchina.... + if (!string.IsNullOrEmpty(IdxMacc)) + { + CurrMSE = await MsgServ.GetMachineMse(IdxMacc); + } + } + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/MP-TAB-SERV/Pages/Controls.razor b/MP-TAB-SERV/Pages/Controls.razor new file mode 100644 index 00000000..e7d04849 --- /dev/null +++ b/MP-TAB-SERV/Pages/Controls.razor @@ -0,0 +1,13 @@ +@page "/controls" + +@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null) +{ + +} +else +{ +
+ +
+ +} diff --git a/MP-TAB-SERV/Pages/Controls.razor.cs b/MP-TAB-SERV/Pages/Controls.razor.cs new file mode 100644 index 00000000..2add5b0a --- /dev/null +++ b/MP-TAB-SERV/Pages/Controls.razor.cs @@ -0,0 +1,45 @@ +using global::Microsoft.AspNetCore.Components; +using MP.Data.DatabaseModels; +using MP.Data.Services; + +namespace MP_TAB_SERV.Pages +{ + public partial class Controls + { + #region Protected Properties + + protected MappaStatoExpl? CurrMSE { get; set; } = null; + protected string IdxMacc { get; set; } = ""; + + [Inject] + protected MessageService MsgServ { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + protected override async Task OnInitializedAsync() + { + await ReloadData(); + } + + #endregion Protected Methods + + #region Private Methods + + private async Task ReloadData() + { + if (string.IsNullOrEmpty(IdxMacc)) + { + IdxMacc = await MsgServ.IdxMaccGet(); + // recupero MSE macchina.... + if (!string.IsNullOrEmpty(IdxMacc)) + { + CurrMSE = await MsgServ.GetMachineMse(IdxMacc); + } + } + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/MP-TAB-SERV/Pages/Declarations.razor b/MP-TAB-SERV/Pages/Declarations.razor index 1b550280..06ded59e 100644 --- a/MP-TAB-SERV/Pages/Declarations.razor +++ b/MP-TAB-SERV/Pages/Declarations.razor @@ -9,5 +9,5 @@ else
- + } diff --git a/MP-TAB-SERV/Pages/IobInfo.razor b/MP-TAB-SERV/Pages/IobInfo.razor new file mode 100644 index 00000000..2050c2f2 --- /dev/null +++ b/MP-TAB-SERV/Pages/IobInfo.razor @@ -0,0 +1,13 @@ +@page "/iob-info" + +@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null) +{ + +} +else +{ +
+ +
+ +} diff --git a/MP-TAB-SERV/Pages/IobInfo.razor.cs b/MP-TAB-SERV/Pages/IobInfo.razor.cs new file mode 100644 index 00000000..665bca5d --- /dev/null +++ b/MP-TAB-SERV/Pages/IobInfo.razor.cs @@ -0,0 +1,63 @@ +using global::System; +using global::System.Collections.Generic; +using global::System.Linq; +using global::System.Threading.Tasks; +using global::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 MP_TAB_SERV; +using MP_TAB_SERV.Shared; +using MP_TAB_SERV.Components; +using MP.Data; +using MP.Data.DatabaseModels; +using MP.Data.DTO; +using MP.Data.Services; +using NLog; + +namespace MP_TAB_SERV.Pages +{ + public partial class IobInfo + { + #region Protected Properties + + protected MappaStatoExpl? CurrMSE { get; set; } = null; + protected string IdxMacc { get; set; } = ""; + + [Inject] + protected MessageService MsgServ { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + protected override async Task OnInitializedAsync() + { + await ReloadData(); + } + + #endregion Protected Methods + + #region Private Methods + + private async Task ReloadData() + { + if (string.IsNullOrEmpty(IdxMacc)) + { + IdxMacc = await MsgServ.IdxMaccGet(); + // recupero MSE macchina.... + if (!string.IsNullOrEmpty(IdxMacc)) + { + CurrMSE = await MsgServ.GetMachineMse(IdxMacc); + } + } + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/MP-TAB-SERV/Pages/Notes.razor b/MP-TAB-SERV/Pages/Notes.razor index 8219e73b..08082dcc 100644 --- a/MP-TAB-SERV/Pages/Notes.razor +++ b/MP-TAB-SERV/Pages/Notes.razor @@ -9,6 +9,6 @@ else
- + } diff --git a/MP-TAB-SERV/Pages/ProdPlan.razor b/MP-TAB-SERV/Pages/ProdPlan.razor new file mode 100644 index 00000000..4e58c0bf --- /dev/null +++ b/MP-TAB-SERV/Pages/ProdPlan.razor @@ -0,0 +1,13 @@ +@page "/prod-plan" + +@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null) +{ + +} +else +{ +
+ +
+ +} diff --git a/MP-TAB-SERV/Pages/ProdPlan.razor.cs b/MP-TAB-SERV/Pages/ProdPlan.razor.cs new file mode 100644 index 00000000..35b6135a --- /dev/null +++ b/MP-TAB-SERV/Pages/ProdPlan.razor.cs @@ -0,0 +1,45 @@ +using global::Microsoft.AspNetCore.Components; +using MP.Data.DatabaseModels; +using MP.Data.Services; + +namespace MP_TAB_SERV.Pages +{ + public partial class ProdPlan + { + #region Protected Properties + + protected MappaStatoExpl? CurrMSE { get; set; } = null; + protected string IdxMacc { get; set; } = ""; + + [Inject] + protected MessageService MsgServ { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + protected override async Task OnInitializedAsync() + { + await ReloadData(); + } + + #endregion Protected Methods + + #region Private Methods + + private async Task ReloadData() + { + if (string.IsNullOrEmpty(IdxMacc)) + { + IdxMacc = await MsgServ.IdxMaccGet(); + // recupero MSE macchina.... + if (!string.IsNullOrEmpty(IdxMacc)) + { + CurrMSE = await MsgServ.GetMachineMse(IdxMacc); + } + } + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/MP-TAB-SERV/Pages/Scrap.razor b/MP-TAB-SERV/Pages/Scrap.razor index ae639c3c..30e4ee4e 100644 --- a/MP-TAB-SERV/Pages/Scrap.razor +++ b/MP-TAB-SERV/Pages/Scrap.razor @@ -1,3 +1,13 @@ -

Scrap

- +@page "/scrap" +@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null) +{ + +} +else +{ +
+ +
+ +} diff --git a/MP-TAB-SERV/Pages/Scrap.razor.cs b/MP-TAB-SERV/Pages/Scrap.razor.cs index f27ad0f1..8e864810 100644 --- a/MP-TAB-SERV/Pages/Scrap.razor.cs +++ b/MP-TAB-SERV/Pages/Scrap.razor.cs @@ -1,28 +1,45 @@ -using global::System; -using global::System.Collections.Generic; -using global::System.Linq; -using global::System.Threading.Tasks; using global::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 MP_TAB_SERV; -using MP_TAB_SERV.Shared; -using MP_TAB_SERV.Components; -using MP.Data; using MP.Data.DatabaseModels; -using MP.Data.DTO; using MP.Data.Services; -using NLog; namespace MP_TAB_SERV.Pages { public partial class Scrap { + #region Protected Properties + + protected MappaStatoExpl? CurrMSE { get; set; } = null; + protected string IdxMacc { get; set; } = ""; + + [Inject] + protected MessageService MsgServ { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + protected override async Task OnInitializedAsync() + { + await ReloadData(); + } + + #endregion Protected Methods + + #region Private Methods + + private async Task ReloadData() + { + if (string.IsNullOrEmpty(IdxMacc)) + { + IdxMacc = await MsgServ.IdxMaccGet(); + // recupero MSE macchina.... + if (!string.IsNullOrEmpty(IdxMacc)) + { + CurrMSE = await MsgServ.GetMachineMse(IdxMacc); + } + } + } + + #endregion Private Methods } } \ No newline at end of file diff --git a/MP-TAB-SERV/Pages/WorkShift.razor b/MP-TAB-SERV/Pages/WorkShift.razor new file mode 100644 index 00000000..23ce07d9 --- /dev/null +++ b/MP-TAB-SERV/Pages/WorkShift.razor @@ -0,0 +1,14 @@ +@page "/workshift" + +@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null) +{ + +} +else +{ +
+ +
+ +} + diff --git a/MP-TAB-SERV/Pages/WorkShift.razor.cs b/MP-TAB-SERV/Pages/WorkShift.razor.cs new file mode 100644 index 00000000..b2091453 --- /dev/null +++ b/MP-TAB-SERV/Pages/WorkShift.razor.cs @@ -0,0 +1,45 @@ +using global::Microsoft.AspNetCore.Components; +using MP.Data.DatabaseModels; +using MP.Data.Services; + +namespace MP_TAB_SERV.Pages +{ + public partial class WorkShift + { + #region Protected Properties + + protected MappaStatoExpl? CurrMSE { get; set; } = null; + protected string IdxMacc { get; set; } = ""; + + [Inject] + protected MessageService MsgServ { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + protected override async Task OnInitializedAsync() + { + await ReloadData(); + } + + #endregion Protected Methods + + #region Private Methods + + private async Task ReloadData() + { + if (string.IsNullOrEmpty(IdxMacc)) + { + IdxMacc = await MsgServ.IdxMaccGet(); + // recupero MSE macchina.... + if (!string.IsNullOrEmpty(IdxMacc)) + { + CurrMSE = await MsgServ.GetMachineMse(IdxMacc); + } + } + } + + #endregion Private Methods + } +} \ No newline at end of file