diff --git a/Jenkinsfile b/Jenkinsfile index 84363965..860388db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=1360']) { + withEnv(['NEXT_BUILD_NUMBER=1362']) { // env.versionNumber = VersionNumber(versionNumberString : '6.12.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '6.12.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO' diff --git a/MP-MAG/BasePage.cs b/MP-MAG/BasePage.cs new file mode 100644 index 00000000..5f76a8be --- /dev/null +++ b/MP-MAG/BasePage.cs @@ -0,0 +1,45 @@ +using MapoDb; +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace MP_MAG +{ + public class BasePage : UserPage + { + #region Internal Fields + + /// + /// Oggetto datalayer specifico + /// + internal DataLayer DataLayerObj = new DataLayer(); + + #endregion Internal Fields + + #region Public Methods + + /// + /// effettua traduzione del lemma + /// + /// + /// + public string traduci(string lemma) + { + return user_std.UtSn.Traduci(lemma); + } + + /// + /// effettua traduzione in inglese del lemma + /// + /// + /// + public string traduciEn(string lemma) + { + return user_std.UtSn.TraduciEn(lemma); + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/MP-MAG/BaseUserControl.cs b/MP-MAG/BaseUserControl.cs index 1ec3c643..03c2a873 100644 --- a/MP-MAG/BaseUserControl.cs +++ b/MP-MAG/BaseUserControl.cs @@ -1,4 +1,5 @@ using MagData; +using MapoDb; using Newtonsoft.Json; using SteamWare; using System; @@ -10,6 +11,20 @@ namespace MP_MAG { public class BaseUserControl : System.Web.UI.UserControl { + #region Internal Fields + + /// + /// Oggetto datalayer specifico + /// + internal DataLayer DataLayerObj = new DataLayer(); + + /// + /// Oggetto datalayer specifico + /// + internal MagDataLayer MagDataLayerObj = new MagDataLayer(); + + #endregion Internal Fields + #region Public Events /// diff --git a/MP-MAG/MP-MAG.csproj b/MP-MAG/MP-MAG.csproj index 2aace609..60c3994c 100644 --- a/MP-MAG/MP-MAG.csproj +++ b/MP-MAG/MP-MAG.csproj @@ -274,6 +274,9 @@ + + ASPXCodeBehind + ASPXCodeBehind @@ -284,6 +287,13 @@ Global.asax + + jumper.aspx + ASPXCodeBehind + + + jumper.aspx + Site.Master @@ -306,12 +316,12 @@ EnrollDevice.aspx - - jumper.ascx + + jumper.aspx ASPXCodeBehind - - jumper.ascx + + jumper.aspx login.aspx @@ -439,6 +449,13 @@ cmp_footer.ascx + + cmp_jumper.ascx + ASPXCodeBehind + + + cmp_jumper.ascx + cmp_menuTop.ascx ASPXCodeBehind @@ -660,12 +677,14 @@ + Always + Always @@ -740,7 +759,7 @@ - + @@ -761,6 +780,7 @@ + diff --git a/MP-MAG/SMART/jumper.ascx b/MP-MAG/SMART/jumper.ascx deleted file mode 100644 index 440af664..00000000 --- a/MP-MAG/SMART/jumper.ascx +++ /dev/null @@ -1 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="jumper.ascx.cs" Inherits="MP_MAG.SMART.jumper" %> diff --git a/MP-MAG/SMART/jumper.aspx b/MP-MAG/SMART/jumper.aspx new file mode 100644 index 00000000..4f5e454c --- /dev/null +++ b/MP-MAG/SMART/jumper.aspx @@ -0,0 +1,19 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="jumper.aspx.cs" Inherits="MP_MAG.SMART.jumper" %> + +<%@ Register Src="~/WebUserControls/cmp_jumper.ascx" TagPrefix="uc1" TagName="cmp_jumper" %> + + + + + + + + + +
+
+ +
+
+ + \ No newline at end of file diff --git a/MP-MAG/SMART/jumper.aspx.cs b/MP-MAG/SMART/jumper.aspx.cs new file mode 100644 index 00000000..a9ee3f36 --- /dev/null +++ b/MP-MAG/SMART/jumper.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 MP_MAG.SMART +{ + public partial class jumper : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/MP-MAG/SMART/jumper.aspx.designer.cs b/MP-MAG/SMART/jumper.aspx.designer.cs new file mode 100644 index 00000000..816b0de9 --- /dev/null +++ b/MP-MAG/SMART/jumper.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 MP_MAG.SMART +{ + + + public partial class jumper + { + + /// + /// Controllo form1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Controllo cmp_jumper. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MP_MAG.WebUserControls.cmp_jumper cmp_jumper; + } +} diff --git a/MP-MAG/WebUserControls/cmp_jumper.ascx b/MP-MAG/WebUserControls/cmp_jumper.ascx new file mode 100644 index 00000000..f6b4a874 --- /dev/null +++ b/MP-MAG/WebUserControls/cmp_jumper.ascx @@ -0,0 +1 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_jumper.ascx.cs" Inherits="MP_MAG.WebUserControls.cmp_jumper" %> diff --git a/MP-MAG/SMART/jumper.ascx.cs b/MP-MAG/WebUserControls/cmp_jumper.ascx.cs similarity index 68% rename from MP-MAG/SMART/jumper.ascx.cs rename to MP-MAG/WebUserControls/cmp_jumper.ascx.cs index b1aab259..62fc1068 100644 --- a/MP-MAG/SMART/jumper.ascx.cs +++ b/MP-MAG/WebUserControls/cmp_jumper.ascx.cs @@ -6,9 +6,9 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; -namespace MP_MAG.SMART +namespace MP_MAG.WebUserControls { - public partial class jumper : System.Web.UI.UserControl + public partial class cmp_jumper : BaseUserControl { #region Protected Methods @@ -19,17 +19,27 @@ namespace MP_MAG.SMART int IdxODL = memLayer.ML.QSI("IdxODL"); string IdxMacchina = memLayer.ML.QSS("IdxMacchina"); int QtaUdc = memLayer.ML.QSI("QtaUdc"); - MagData.prodPrintData newProdPrintData = new MagData.prodPrintData(MatrOpr, IdxODL, IdxMacchina, QtaUdc); + bool isFinito = false; + // recupero articolo + var tabOdl = DataLayerObj.taODL.getByIdx(IdxODL, false); + if (tabOdl.Rows.Count > 0) + { + string codArt = tabOdl[0].CodArticolo; + var tabArt = MagDataLayerObj.taAA.getByKey(codArt); + if (tabArt.Rows.Count > 0) + { + isFinito = tabArt[0].CodStato == "FIN"; + } + } + MagData.prodPrintData newProdPrintData = new MagData.prodPrintData(MatrOpr, IdxODL, IdxMacchina, QtaUdc, isFinito); // salvo in oggetto dedicato... MagData.MagDataLayer.man.currProdPrintData = newProdPrintData; - + string tgtPage = ""; // se l'operatore in sessione è DIVERSO da quello appena inviato --> effettuo NUOVO login if (MatrOpr == memLayer.ML.IntSessionObj("MatrOpr")) { // rimando a pagina di stampa.. secondo tipo finiti / semilavorati - // FARE!!! verifica SL/FI (NON E' ancora implementato davvero - string tgtPage = newProdPrintData.isProdFinito ? "prtFiniti" : "prtSemilav"; - Response.Redirect(tgtPage); + tgtPage = newProdPrintData.isProdFinito ? "prtFiniti" : "prtSemilav"; } else { @@ -46,10 +56,11 @@ namespace MP_MAG.SMART // salvo in sessione memLayer.ML.setSessionVal("MatrOpr", MatrOpr); memLayer.ML.setSessionVal("UserAuthKey", UserAuthKey); + // redirect x login... + tgtPage = "tryLogin"; } - // redirect x login... - Response.Redirect("tryLogin"); } + Response.Redirect($"~/SMART/{tgtPage}"); } #endregion Protected Methods diff --git a/MP-MAG/SMART/jumper.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_jumper.ascx.designer.cs similarity index 85% rename from MP-MAG/SMART/jumper.ascx.designer.cs rename to MP-MAG/WebUserControls/cmp_jumper.ascx.designer.cs index 7ef40fc1..e6a52f7e 100644 --- a/MP-MAG/SMART/jumper.ascx.designer.cs +++ b/MP-MAG/WebUserControls/cmp_jumper.ascx.designer.cs @@ -8,9 +8,9 @@ //------------------------------------------------------------------------------ -namespace MP_MAG.SMART +namespace MP_MAG.WebUserControls { - public partial class jumper + public partial class cmp_jumper { } } diff --git a/MP-MAG/favicon.ico b/MP-MAG/favicon.ico index a3a79998..4f0e0ad0 100644 Binary files a/MP-MAG/favicon.ico and b/MP-MAG/favicon.ico differ diff --git a/MP-MAG/images/favicon.ico b/MP-MAG/images/favicon.ico new file mode 100644 index 00000000..4f0e0ad0 Binary files /dev/null and b/MP-MAG/images/favicon.ico differ diff --git a/MP-MAG/jumper.aspx b/MP-MAG/jumper.aspx new file mode 100644 index 00000000..931cd0a5 --- /dev/null +++ b/MP-MAG/jumper.aspx @@ -0,0 +1,19 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="jumper.aspx.cs" Inherits="MP_MAG.jumper" %> + +<%@ Register Src="~/WebUserControls/cmp_jumper.ascx" TagPrefix="uc1" TagName="cmp_jumper" %> + + + + + + + + + +
+
+ +
+
+ + \ No newline at end of file diff --git a/MP-MAG/jumper.aspx.cs b/MP-MAG/jumper.aspx.cs new file mode 100644 index 00000000..2687f880 --- /dev/null +++ b/MP-MAG/jumper.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 MP_MAG +{ + public partial class jumper : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/MP-MAG/jumper.aspx.designer.cs b/MP-MAG/jumper.aspx.designer.cs new file mode 100644 index 00000000..f0abe700 --- /dev/null +++ b/MP-MAG/jumper.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 MP_MAG +{ + + + public partial class jumper + { + + /// + /// Controllo form1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Controllo cmp_jumper. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MP_MAG.WebUserControls.cmp_jumper cmp_jumper; + } +} diff --git a/MagData/DS_Mag.Designer.cs b/MagData/DS_Mag.Designer.cs index 6862ab11..e197977a 100644 --- a/MagData/DS_Mag.Designer.cs +++ b/MagData/DS_Mag.Designer.cs @@ -1720,6 +1720,8 @@ namespace MagData { private global::System.Data.DataColumn columnCodArtExt; + private global::System.Data.DataColumn columnCodStato; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public AnagArtDataTable() { @@ -1777,6 +1779,14 @@ namespace MagData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn CodStatoColumn { + get { + return this.columnCodStato; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -1814,12 +1824,13 @@ namespace MagData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public AnagArtRow AddAnagArtRow(string CodArt, string DescrArt, string CodArtExt) { + public AnagArtRow AddAnagArtRow(string CodArt, string DescrArt, string CodArtExt, string CodStato) { AnagArtRow rowAnagArtRow = ((AnagArtRow)(this.NewRow())); object[] columnValuesArray = new object[] { CodArt, DescrArt, - CodArtExt}; + CodArtExt, + CodStato}; rowAnagArtRow.ItemArray = columnValuesArray; this.Rows.Add(rowAnagArtRow); return rowAnagArtRow; @@ -1852,6 +1863,7 @@ namespace MagData { this.columnCodArt = base.Columns["CodArt"]; this.columnDescrArt = base.Columns["DescrArt"]; this.columnCodArtExt = base.Columns["CodArtExt"]; + this.columnCodStato = base.Columns["CodStato"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1863,6 +1875,8 @@ namespace MagData { base.Columns.Add(this.columnDescrArt); this.columnCodArtExt = new global::System.Data.DataColumn("CodArtExt", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCodArtExt); + this.columnCodStato = new global::System.Data.DataColumn("CodStato", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodStato); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnCodArt}, true)); this.columnCodArt.AllowDBNull = false; @@ -1872,6 +1886,8 @@ namespace MagData { this.columnDescrArt.MaxLength = 250; this.columnCodArtExt.AllowDBNull = false; this.columnCodArtExt.MaxLength = 50; + this.columnCodStato.AllowDBNull = false; + this.columnCodStato.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -4693,6 +4709,17 @@ namespace MagData { this[this.tableAnagArt.CodArtExtColumn] = value; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string CodStato { + get { + return ((string)(this[this.tableAnagArt.CodStatoColumn])); + } + set { + this[this.tableAnagArt.CodStatoColumn] = value; + } + } } /// @@ -6669,6 +6696,7 @@ namespace MagData.DS_MagTableAdapters { tableMapping.ColumnMappings.Add("CodArt", "CodArt"); tableMapping.ColumnMappings.Add("DescrArt", "DescrArt"); tableMapping.ColumnMappings.Add("CodArtExt", "CodArtExt"); + tableMapping.ColumnMappings.Add("CodStato", "CodStato"); this._adapter.TableMappings.Add(tableMapping); } diff --git a/MagData/DS_Mag.xsd b/MagData/DS_Mag.xsd index f81717c9..412bd28e 100644 --- a/MagData/DS_Mag.xsd +++ b/MagData/DS_Mag.xsd @@ -246,6 +246,7 @@ FROM dbo.v_AnagArt + @@ -439,7 +440,7 @@ FROM dbo.ElencoPost2Queue - + dbo.stp_EAL_updatePList @@ -451,7 +452,7 @@ FROM dbo.ElencoPost2Queue - + dbo.stp_EAL_updateQuery @@ -615,7 +616,7 @@ SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC)< - + @@ -690,7 +691,7 @@ SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC)< - + @@ -845,7 +846,7 @@ SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC)< - + @@ -869,10 +870,17 @@ SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC)< + + + + + + + - + @@ -939,7 +947,7 @@ SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC)< - + @@ -959,7 +967,7 @@ SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC)< - + @@ -995,7 +1003,7 @@ SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC)< - + @@ -1050,7 +1058,7 @@ SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC)< - + diff --git a/MagData/DS_Mag.xss b/MagData/DS_Mag.xss index da964cc4..2cf42dbd 100644 --- a/MagData/DS_Mag.xss +++ b/MagData/DS_Mag.xss @@ -4,15 +4,16 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/MagData/Objects.cs b/MagData/Objects.cs index 159d097f..328661c2 100644 --- a/MagData/Objects.cs +++ b/MagData/Objects.cs @@ -136,12 +136,14 @@ namespace MagData /// /// /// - public prodPrintData(int MatrOpr, int IdxOdl, string IdxMacchina, int QtaUdc) + /// + public prodPrintData(int MatrOpr, int IdxOdl, string IdxMacchina, int QtaUdc, bool isProdFinito) { this.MatrOpr = MatrOpr; this.IdxOdl = IdxOdl; this.IdxMacchina = IdxMacchina; this.QtaUdc = QtaUdc; + this.isProdFinito = isProdFinito; } public prodPrintData() @@ -150,6 +152,7 @@ namespace MagData this.IdxOdl = 0; this.IdxMacchina = ""; this.QtaUdc = 1; + this.isProdFinito = false; } #endregion Public Constructors @@ -167,10 +170,9 @@ namespace MagData public int IdxOdl { get; set; } /// - /// Indica se si tratta di un FINITO (cs semilavorato) - /// FIXME TODO FARE !!!! + /// Indica se si tratta di un FINITO (vs semilavorato) /// - public bool isProdFinito { get; set; } = true; + public bool isProdFinito { get; set; } /// /// Matricola Operatore