diff --git a/MP-IO/Controllers/WebAPI/DbMaintController.cs b/MP-IO/Controllers/WebAPI/DbMaintController.cs new file mode 100644 index 00000000..fb038bbd --- /dev/null +++ b/MP-IO/Controllers/WebAPI/DbMaintController.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; + +namespace MP_IO.Controllers.WebAPI +{ + public class DbMaintController : ApiController + { + #region Public Methods + + // DELETE api//5 + public void Delete(int id) + { + } + + /// + /// GET api/DbMaint + /// Esegue tutte le manutenzioni configurate x il DB + /// + /// + /// + [CacheFilter(TimeDuration = 5)] + [HttpGet] + public string Get() + { + return $"DbMaint executed - {DateTime.Now}"; + } + + /// + /// GET api/DbMaint/parameter + /// Esegue una singola manutenzione configurata x il DB + /// + /// + /// + [CacheFilter(TimeDuration = 5)] + [HttpGet] + public string Get(string id) + { + return $"DbMaint requested: {id} - {DateTime.Now}"; + } + + // POST api/ + public void Post([FromBody] string value) + { + } + + // PUT api//5 + public void Put(int id, [FromBody] string value) + { + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/MP-IO/MP-IO.csproj b/MP-IO/MP-IO.csproj index 06568143..e39703cf 100644 --- a/MP-IO/MP-IO.csproj +++ b/MP-IO/MP-IO.csproj @@ -304,6 +304,7 @@ + default.aspx diff --git a/MP-MON/App_Start/WebApiConfig.cs b/MP-MON/App_Start/WebApiConfig.cs new file mode 100644 index 00000000..e0c350dd --- /dev/null +++ b/MP-MON/App_Start/WebApiConfig.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.Http; + +namespace MP_MON +{ + public static class WebApiConfig + { + public static void Register(HttpConfiguration config) + { + config.MapHttpAttributeRoutes(); + + config.Routes.MapHttpRoute( + name: "DefaultApi", + routeTemplate: "api/{controller}/{id}", + defaults: new { id = RouteParameter.Optional } + ); + } + } +} diff --git a/MP-MON/Controllers/DbTaskController.cs b/MP-MON/Controllers/DbTaskController.cs new file mode 100644 index 00000000..f8315f0f --- /dev/null +++ b/MP-MON/Controllers/DbTaskController.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; + +namespace MP_MON.Controllers +{ + public class DbTaskController : ApiController + { + // GET: api/DbTask + public IEnumerable Get() + { + return new string[] { "value1", "value2" }; + } + + // GET: api/DbTask/5 + public string Get(int id) + { + return "value"; + } + + // POST: api/DbTask + public void Post([FromBody]string value) + { + } + + // PUT: api/DbTask/5 + public void Put(int id, [FromBody]string value) + { + } + + // DELETE: api/DbTask/5 + public void Delete(int id) + { + } + } +} diff --git a/MP-MON/MP-MON.csproj b/MP-MON/MP-MON.csproj index e257e9d7..6a8edfcd 100644 --- a/MP-MON/MP-MON.csproj +++ b/MP-MON/MP-MON.csproj @@ -147,6 +147,9 @@ ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll + + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll @@ -190,6 +193,12 @@ ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll + + ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll + + + ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll + ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll @@ -235,6 +244,8 @@ + + diff --git a/MP-MON/MP-MON.csproj.user b/MP-MON/MP-MON.csproj.user index 009e2263..8765882c 100644 --- a/MP-MON/MP-MON.csproj.user +++ b/MP-MON/MP-MON.csproj.user @@ -20,6 +20,8 @@ Debug|Any CPU + ApiControllerWithActionsScaffolder + root/Controller diff --git a/MP-MON/Web.config b/MP-MON/Web.config index 1f51fc68..583d1aff 100644 --- a/MP-MON/Web.config +++ b/MP-MON/Web.config @@ -118,7 +118,12 @@ - + + + + + + @@ -131,7 +136,6 @@ - + \ No newline at end of file diff --git a/MP-MON/packages.config b/MP-MON/packages.config index bb3eabeb..7d56a952 100644 --- a/MP-MON/packages.config +++ b/MP-MON/packages.config @@ -17,6 +17,10 @@ + + + + diff --git a/MP-TAB/Demo.aspx b/MP-TAB/Demo.aspx new file mode 100644 index 00000000..fe44e321 --- /dev/null +++ b/MP-TAB/Demo.aspx @@ -0,0 +1,116 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Bootstrap.Master" AutoEventWireup="true" CodeBehind="Demo.aspx.cs" Inherits="MoonProTablet.Demo" %> + + + + +
+
+

M.I.E.T.

+
+
+
+
+ START +
+
+ Status: waiting +
+
+ STOP +
+
+
+
+

Val 01

+
+ +
+
+
Realtime Data
+ <%: DateTime.Now %> +
+
+

Val 02

+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
InizioDurataNome# rec
2020-11-12 09:05:3600:15:35Demo recording 01900USB
2020-11-11 09:05:3600:05:35Demo recording 02900USB
2020-11-10 09:05:3600:10:35Demo recording 03900USB
2020-11-09 09:05:3600:25:35Demo recording 04900USB
2020-11-08 09:05:3600:14:35Demo recording 05900USB
2020-11-07 09:05:3600:35:35Demo recording 06900USB
+
+
+
+ +
+
\ No newline at end of file diff --git a/MP-TAB/Demo.aspx.cs b/MP-TAB/Demo.aspx.cs new file mode 100644 index 00000000..6b46e007 --- /dev/null +++ b/MP-TAB/Demo.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace MoonProTablet +{ + public partial class Demo : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/MP-TAB/Demo.aspx.designer.cs b/MP-TAB/Demo.aspx.designer.cs new file mode 100644 index 00000000..5cc7a064 --- /dev/null +++ b/MP-TAB/Demo.aspx.designer.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace MoonProTablet +{ + + + public partial class Demo + { + + /// + /// Controllo lbtStart. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtStart; + + /// + /// Controllo lbtStop. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtStop; + } +} diff --git a/MP-TAB/MP-TAB.csproj b/MP-TAB/MP-TAB.csproj index 04912a04..edbc3695 100644 --- a/MP-TAB/MP-TAB.csproj +++ b/MP-TAB/MP-TAB.csproj @@ -454,6 +454,7 @@ + @@ -469,6 +470,9 @@ + + + @@ -778,6 +782,13 @@ Default.aspx + + Demo.aspx + ASPXCodeBehind + + + Demo.aspx + DettaglioMacchina.aspx diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.cs index 457b7e2f..ecdbc4ba 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.cs @@ -998,12 +998,7 @@ namespace MoonProTablet.WebUserControls protected void lbtStartAttr_Click(object sender, EventArgs e) { /*************************************************** - * * DA VALUTARE (x macchine tipo linea con + impianti... es valvital) SE - * - creare una gestione ALTERNATIVA sul server che preveda impianto LEADER e impianti follower (RIGIDAMENTE CONFIGURATI) - * - ogni volta che si fa setup LEADER --> si ripete su impianti FOLLOWER (eventi!!!) - * - viene fatto reset contapezzi sui follower (+ altre operazioni opzionali, ES imposstazione nome commessa, quantità, articolo...) - * - viene fatto reset + nuovo ODL (con stessi articoli e quantità) su follower, SENZA avere gestione x ODL di un codice esterno (quindi registra TUTTO ma NON RITORNERA' dati on avendo link verso esterno) - * - serve NUOVA TABELLA delle macchine LEADER | FOLLOWER (1:n) e gestione da MP/IO + * comprende gestione machineSlave x fix ODL master --> slave * ***************************************************/ diff --git a/MP-TAB/images/GraphDemo01.png b/MP-TAB/images/GraphDemo01.png new file mode 100644 index 00000000..1063227a Binary files /dev/null and b/MP-TAB/images/GraphDemo01.png differ diff --git a/MP-TAB/images/GraphDemo02.png b/MP-TAB/images/GraphDemo02.png new file mode 100644 index 00000000..04a045a7 Binary files /dev/null and b/MP-TAB/images/GraphDemo02.png differ diff --git a/MP-TAB/images/gauge.png b/MP-TAB/images/gauge.png new file mode 100644 index 00000000..b1aaf1fc Binary files /dev/null and b/MP-TAB/images/gauge.png differ