From a32c7c6ffb2a3d61026bdb61e73513c511e4e91a Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 16 Mar 2021 12:56:04 +0100 Subject: [PATCH] =?UTF-8?q?aggiunto=20step=20x=20assegnazioen=20amcchina?= =?UTF-8?q?=20attivit=C3=A0=20pianificate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MP-ADM/WebUserControls/cmp_PODL_OUT.ascx | 22 +++++++-- MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.cs | 44 ++++++++++++++++++ .../cmp_PODL_OUT.ascx.designer.cs | 45 ++++++++++++++++++ MP-ADM/WebUserControls/cmp_planApprove.ascx | 8 ++-- MapoDb/DS_Plan.Designer.cs | 32 ++++++++++++- MapoDb/DS_Plan.xsd | 46 ++++++++++++------- 6 files changed, 172 insertions(+), 25 deletions(-) diff --git a/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx b/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx index c1448d32..cd0cf040 100644 --- a/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx +++ b/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx @@ -6,17 +6,33 @@
-
+

PODL attivi

-
+
- + +
+
+
+
+
+
+ +
+
+ + + + +
+ Riassegna +
diff --git a/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.cs b/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.cs index 867c0dfc..0db5ea0f 100644 --- a/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.cs +++ b/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.cs @@ -130,6 +130,17 @@ namespace MP_ADM.WebUserControls } } divActions.Visible = showActions; + divMachine.Visible = showActions; + } + + private void fixSetMachine() + { + ddlSelMacchina.Enabled = chkReassign.Checked; + lbtReassignMachine.Visible = chkReassign.Checked; + if (!chkReassign.Checked) + { + ddlSelMacchina.SelectedIndex = 0; + } } /// @@ -157,6 +168,7 @@ namespace MP_ADM.WebUserControls private void updateGrView() { grView.DataBind(); + checkActions(); raiseNewVal(); } @@ -199,6 +211,11 @@ namespace MP_ADM.WebUserControls checkActions(); } + protected void chkReassign_CheckedChanged(object sender, EventArgs e) + { + fixSetMachine(); + } + protected void chkSelect_CheckedChanged(object sender, EventArgs e) { checkActions(); @@ -280,6 +297,30 @@ namespace MP_ADM.WebUserControls updateGrView(); } + protected void lbtReassignMachine_Click(object sender, EventArgs e) + { + int IdxPromessa = 0; + int IdxOdl = 0; + string idxMacchina2Reass = ddlSelMacchina.SelectedValue; + if (!string.IsNullOrEmpty(idxMacchina2Reass)) + { + foreach (GridViewRow riga in grView.Rows) + { + if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible) + { + int.TryParse(((Label)riga.FindControl("lblIdxOdl")).Text, out IdxOdl); + if (IdxOdl == 0) + { + int.TryParse(((Label)riga.FindControl("lblIdxPromessa")).Text, out IdxPromessa); + // riassegno! + DataLayerObj.taPromOut.updMacchina(IdxPromessa, idxMacchina2Reass); + } + } + } + } + updateGrView(); + } + /// /// Richiesto abbassamento priorità = ANTICIPA /// @@ -322,6 +363,7 @@ namespace MP_ADM.WebUserControls { base.OnInit(e); _idxGridView = "IdxPromessa"; + fixSetMachine(); } protected override void OnLoad(EventArgs e) @@ -331,6 +373,7 @@ namespace MP_ADM.WebUserControls { grView.PageSize = pageSize; divActions.Visible = false; + divMachine.Visible = false; } } @@ -422,6 +465,7 @@ namespace MP_ADM.WebUserControls public void resetSelezione() { divActions.Visible = false; + divMachine.Visible = false; memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); grView.SelectedIndex = -1; grView.DataBind(); diff --git a/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.designer.cs b/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.designer.cs index dd7b4a77..d180156f 100644 --- a/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.designer.cs +++ b/MP-ADM/WebUserControls/cmp_PODL_OUT.ascx.designer.cs @@ -32,6 +32,51 @@ namespace MP_ADM.WebUserControls /// protected global::System.Web.UI.WebControls.Label lblUnass; + /// + /// Controllo divMachine. + /// + /// + /// 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.HtmlGenericControl divMachine; + + /// + /// Controllo chkReassign. + /// + /// + /// 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.CheckBox chkReassign; + + /// + /// Controllo ddlSelMacchina. + /// + /// + /// 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.DropDownList ddlSelMacchina; + + /// + /// Controllo odsMac. + /// + /// + /// 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.ObjectDataSource odsMac; + + /// + /// Controllo lbtReassignMachine. + /// + /// + /// 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 lbtReassignMachine; + /// /// Controllo divActions. /// diff --git a/MP-ADM/WebUserControls/cmp_planApprove.ascx b/MP-ADM/WebUserControls/cmp_planApprove.ascx index 39513e4f..9a088104 100644 --- a/MP-ADM/WebUserControls/cmp_planApprove.ascx +++ b/MP-ADM/WebUserControls/cmp_planApprove.ascx @@ -157,10 +157,10 @@
- APPROVA e PIANIFICA -
- approvazione e pianificazione richieste selezionate -
+ APPROVA e PIANIFICA +
+ approvazione e pianificazione richieste selezionate +
diff --git a/MapoDb/DS_Plan.Designer.cs b/MapoDb/DS_Plan.Designer.cs index 3a488eeb..27e33c11 100644 --- a/MapoDb/DS_Plan.Designer.cs +++ b/MapoDb/DS_Plan.Designer.cs @@ -11572,7 +11572,7 @@ SELECT idxPromessa, KeyRichiesta, KeyBCode, Attivabile, IdxODL, CodArticolo, Cod [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_PODL_OUT_exp"; @@ -11631,6 +11631,13 @@ SELECT idxPromessa, KeyRichiesta, KeyBCode, Attivabile, IdxODL, CodArticolo, Cod this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Attivabile", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[7].Connection = this.Connection; + this._commandCollection[7].CommandText = "dbo.stp_PODL_OUT_updMacchina"; + this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -11721,6 +11728,29 @@ SELECT idxPromessa, KeyRichiesta, KeyBCode, Attivabile, IdxODL, CodArticolo, Cod return dataTable; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Plan.PromesseOUTDataTable updMacchina(global::System.Nullable IdxPromessa, string IdxMacchina) { + this.Adapter.SelectCommand = this.CommandCollection[7]; + if ((IdxPromessa.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxPromessa.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((IdxMacchina == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(IdxMacchina)); + } + DS_Plan.PromesseOUTDataTable dataTable = new DS_Plan.PromesseOUTDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] diff --git a/MapoDb/DS_Plan.xsd b/MapoDb/DS_Plan.xsd index cd699d9e..da7c2cfe 100644 --- a/MapoDb/DS_Plan.xsd +++ b/MapoDb/DS_Plan.xsd @@ -482,6 +482,18 @@ FROM v_PODL_OUT_exp + + + + dbo.stp_PODL_OUT_updMacchina + + + + + + + + @@ -768,7 +780,7 @@ ORDER BY TotOreRich DESC - + @@ -781,7 +793,7 @@ ORDER BY TotOreRich DESC - + @@ -811,7 +823,7 @@ ORDER BY TotOreRich DESC - + @@ -834,7 +846,7 @@ ORDER BY TotOreRich DESC - + @@ -857,7 +869,7 @@ ORDER BY TotOreRich DESC - + @@ -976,7 +988,7 @@ ORDER BY TotOreRich DESC - + @@ -1032,7 +1044,7 @@ ORDER BY TotOreRich DESC - + @@ -1158,7 +1170,7 @@ ORDER BY TotOreRich DESC - + @@ -1180,7 +1192,7 @@ ORDER BY TotOreRich DESC - + @@ -1194,7 +1206,7 @@ ORDER BY TotOreRich DESC - + @@ -1210,7 +1222,7 @@ ORDER BY TotOreRich DESC - + @@ -1232,7 +1244,7 @@ ORDER BY TotOreRich DESC - + @@ -1254,7 +1266,7 @@ ORDER BY TotOreRich DESC - + @@ -1274,7 +1286,7 @@ ORDER BY TotOreRich DESC - + @@ -1293,7 +1305,7 @@ ORDER BY TotOreRich DESC - + @@ -1359,8 +1371,8 @@ ORDER BY TotOreRich DESC - - + + \ No newline at end of file