diff --git a/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx b/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx index bd1feab1..0d033828 100644 --- a/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx +++ b/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx @@ -1,11 +1,12 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_anagBlocchi.ascx.cs" Inherits="GMW.WebUserControls.mod_anagBlocchi" %> +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_anagBlocchi.ascx.cs" + Inherits="GMW.WebUserControls.mod_anagBlocchi" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
+ OnRowUpdating="grView_RowUpdating" DataKeyNames="IdxBlocco" DataSourceID="ods"> @@ -26,11 +27,18 @@ Visible="false" /> - <%-- + <%--  --%> + + + + - + CommandArgument='<%# Eval("IdxBlocco") %>' ToolTip='<%# traduci("Delete") %>' + Visible='<%# delEnabled(Eval("IdxBlocco")) %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina , SteamWare.dimImg.small) %>' /> @@ -132,9 +139,8 @@ + OnInserting="recuperaFooter" OnInserted="ods_Updated" OnUpdated="ods_Updated" + DeleteMethod="DeleteQuery" InsertMethod="Insert" UpdateMethod="UpdateQuery"> diff --git a/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx.cs b/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx.cs index 204f0e7d..d2bd3805 100644 --- a/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx.cs @@ -1,5 +1,6 @@ using System; using System.Data; +using System.Web.UI; using System.Web.UI.WebControls; using SteamWare; using GMW_data; @@ -323,6 +324,11 @@ namespace GMW.WebUserControls /// protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) { + // evento come nuovo... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } } /// /// determina se sia eliminabile il record (=non usato) @@ -372,6 +378,86 @@ namespace GMW.WebUserControls grView.DataBind(); } + /// + /// salvo in session che il prox comando è creare oggetti child... + /// + /// + /// + protected void imgCreaChild_Click(object sender, ImageClickEventArgs e) + { + SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "creaChildObj"); + } + /// + /// in caso di aggiornamento verifico se sia salvato un comando clona... + /// + /// + /// + protected void grView_RowUpdating(object sender, GridViewUpdateEventArgs e) + { + // carico l'idx dell'oggetto + int _idxBlocco = Convert.ToInt32(e.Keys["IdxBlocco"]); + // quale comando? + string _comando = ""; + if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand")) + { + _comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand"); + SteamWare.memLayer.ML.emptySessionVal("nextObjCommand"); + } + // verifico il tipo di richiesta (up/down level, clona o update normale + switch (_comando) + { + case "creaChildObj": + utils.obj.taSTP.stp_celleCreaMancantiBlocco(memLayer.ML.confReadString("CodCS"), _idxBlocco); + updateOdsDaFiltro(); + grView.EditIndex = -1; + grView.DataBind(); + // sollevo evento nuovo valore... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + // blocco update! + e.Cancel = true; + break; + //case "revObj": + // Mod_userLog1.comportamento = logControlMode.hideLog; + // TA_app.obj.taSP.sp_aumentaRevCiclo(_idxCiclo, user_brembo.UtSn.userNameAD); + // updateOdsDaFiltro(); + // grView.DataBind(); + // // blocco update! + // e.Cancel = true; + // // nuovo metodo batch di caricamento... + // GTD.FAO.accodaCaricamentoPdfSuDoc(_idxCiclo); + // break; + //case "mostraNote": + // // blocco update! + // e.Cancel = true; + // Mod_userLog1.filtroNote = string.Format("{0}#", _idxCiclo); + // Mod_userLog1.comportamento = logControlMode.showLog; + break; + default: + // faccio update! + break; + } + + } + /// + /// verifica se sia necessario creare obj child + /// + /// + /// + public bool childObjNeeded(object idx) + { + bool answ = false; + int idxBlocco = Convert.ToInt32(idx); + // conto disavanzo... + int? delta = 0; + utils.obj.taSTP.stp_ContaDeltaCelleBlocco(idxBlocco, ref delta); + if (!delta.HasValue) delta = 0; + if (delta > 0) answ = true; + return answ; + } + #endregion } } \ No newline at end of file diff --git a/GMW/GMW/WebUserControls/mod_confMag.ascx b/GMW/GMW/WebUserControls/mod_confMag.ascx index c2fd1920..289cdacf 100644 --- a/GMW/GMW/WebUserControls/mod_confMag.ascx +++ b/GMW/GMW/WebUserControls/mod_confMag.ascx @@ -1,6 +1,13 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_confMag.ascx.cs" Inherits="GMW.WebUserControls.mod_confMag" %> - +
+ + + - + @@ -21,14 +28,12 @@ -
+
+ +
+
@@ -11,7 +18,7 @@
- - - - - +
- -
+
+ +
+ + @@ -39,8 +44,8 @@ - - + - - + diff --git a/GMW/GMW/anagMagazzini.aspx.cs b/GMW/GMW/anagMagazzini.aspx.cs index 6e5a7733..e1c95f9c 100644 --- a/GMW/GMW/anagMagazzini.aspx.cs +++ b/GMW/GMW/anagMagazzini.aspx.cs @@ -13,6 +13,18 @@ namespace GMW { mod_anagMagazzini1.eh_selValore += new EventHandler(mod_anagMagazzini1_eh_selValore); mod_anagMagazzini1.eh_resetSelezione += new EventHandler(mod_anagMagazzini1_eh_resetSelezione); + mod_anagBlocchi1.eh_nuovoValore += new EventHandler(mod_anagBlocchi1_eh_nuovoValore); + mod_tipoCella1.eh_nuovoValore += new EventHandler(mod_tipoCella1_eh_nuovoValore); + } + + void mod_tipoCella1_eh_nuovoValore(object sender, EventArgs e) + { + mod_confMag1.doUpdate(); + } + + void mod_anagBlocchi1_eh_nuovoValore(object sender, EventArgs e) + { + mod_confMag1.doUpdate(); } void mod_anagMagazzini1_eh_resetSelezione(object sender, EventArgs e) @@ -24,9 +36,11 @@ namespace GMW void mod_anagMagazzini1_eh_selValore(object sender, EventArgs e) { - // mostro i 3 moduli aggiuntivi! + // mostro i moduli aggiuntivi! pnlMagStat.Visible = true; pnlMagConf.Visible = true; + // chiamo update esplicito calcoli + mod_confMag1.doUpdate(); } } } diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index dfecd6a9..479ecdba 100644 Binary files a/GMW/GMW/bin/GMW.dll and b/GMW/GMW/bin/GMW.dll differ diff --git a/GMW/GMW/bin/GMW_data.dll b/GMW/GMW/bin/GMW_data.dll index 65975314..41925ffa 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/images/ShowDetail.png b/GMW/GMW/images/ShowDetail.png new file mode 100644 index 00000000..251350ec Binary files /dev/null and b/GMW/GMW/images/ShowDetail.png differ diff --git a/GMW/GMW/images/createChildObj.png b/GMW/GMW/images/createChildObj.png new file mode 100644 index 00000000..c95f6b15 Binary files /dev/null and b/GMW/GMW/images/createChildObj.png differ diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index dfecd6a9..479ecdba 100644 Binary files a/GMW/GMW/obj/Debug/GMW.dll and b/GMW/GMW/obj/Debug/GMW.dll differ diff --git a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache index 858fff69..c5706d3f 100644 Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_data/DS_Utility.Designer.cs b/GMW/GMW_data/DS_Utility.Designer.cs index d9d142e1..3c4649fa 100644 --- a/GMW/GMW_data/DS_Utility.Designer.cs +++ b/GMW/GMW_data/DS_Utility.Designer.cs @@ -820,7 +820,7 @@ namespace GMW_data.DS_UtilityTableAdapters { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.IDbCommand[2]; + this._commandCollection = new global::System.Data.IDbCommand[5]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[0])).Connection = new global::System.Data.SqlClient.SqlConnection(global::GMW_data.Properties.Settings.Default.GMWConnectionString); ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[0])).CommandText = "dbo.stp_ContaCelle4Tipo"; @@ -837,6 +837,30 @@ namespace GMW_data.DS_UtilityTableAdapters { ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMag", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[1])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotCelle", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Connection = new global::System.Data.SqlClient.SqlConnection(global::GMW_data.Properties.Settings.Default.GMWConnectionString); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).CommandText = "dbo.stp_ContaCelleBlocco"; + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).CommandType = global::System.Data.CommandType.StoredProcedure; + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).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, "", "", "")); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMag", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FiltAttive", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PosAssegnata", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[2])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotCelle", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).Connection = new global::System.Data.SqlClient.SqlConnection(global::GMW_data.Properties.Settings.Default.GMWConnectionString); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).CommandText = "dbo.stp_ContaDeltaCelleBlocco"; + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).CommandType = global::System.Data.CommandType.StoredProcedure; + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).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, "", "", "")); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxBlocco", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[3])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DeltaCelle", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).Connection = new global::System.Data.SqlClient.SqlConnection(global::GMW_data.Properties.Settings.Default.GMWConnectionString); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).CommandText = "dbo.stp_celleCreaMancantiBlocco"; + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).CommandType = global::System.Data.CommandType.StoredProcedure; + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).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, "", "", "")); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + ((global::System.Data.SqlClient.SqlCommand)(this._commandCollection[4])).Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxBlocco", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -930,6 +954,137 @@ namespace GMW_data.DS_UtilityTableAdapters { } return returnValue; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int stp_ContaCelleBlocco(string CodCS, string CodMag, global::System.Nullable FiltAttive, global::System.Nullable PosAssegnata, ref global::System.Nullable TotCelle) { + global::System.Data.SqlClient.SqlCommand command = ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[2])); + if ((CodCS == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(CodCS)); + } + if ((CodMag == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(CodMag)); + } + if ((FiltAttive.HasValue == true)) { + command.Parameters[3].Value = ((bool)(FiltAttive.Value)); + } + else { + command.Parameters[3].Value = global::System.DBNull.Value; + } + if ((PosAssegnata.HasValue == true)) { + command.Parameters[4].Value = ((int)(PosAssegnata.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; + } + if ((TotCelle.HasValue == true)) { + command.Parameters[5].Value = ((int)(TotCelle.Value)); + } + else { + command.Parameters[5].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + if (((command.Parameters[5].Value == null) + || (command.Parameters[5].Value.GetType() == typeof(global::System.DBNull)))) { + TotCelle = new global::System.Nullable(); + } + else { + TotCelle = new global::System.Nullable(((int)(command.Parameters[5].Value))); + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int stp_ContaDeltaCelleBlocco(global::System.Nullable IdxBlocco, ref global::System.Nullable DeltaCelle) { + global::System.Data.SqlClient.SqlCommand command = ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[3])); + if ((IdxBlocco.HasValue == true)) { + command.Parameters[1].Value = ((int)(IdxBlocco.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((DeltaCelle.HasValue == true)) { + command.Parameters[2].Value = ((int)(DeltaCelle.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + if (((command.Parameters[2].Value == null) + || (command.Parameters[2].Value.GetType() == typeof(global::System.DBNull)))) { + DeltaCelle = new global::System.Nullable(); + } + else { + DeltaCelle = new global::System.Nullable(((int)(command.Parameters[2].Value))); + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int stp_celleCreaMancantiBlocco(string CodCS, global::System.Nullable IdxBlocco) { + global::System.Data.SqlClient.SqlCommand command = ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[4])); + if ((CodCS == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(CodCS)); + } + if ((IdxBlocco.HasValue == true)) { + command.Parameters[2].Value = ((int)(IdxBlocco.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } } /// diff --git a/GMW/GMW_data/DS_Utility.xsd b/GMW/GMW_data/DS_Utility.xsd index 6b0259c4..209ef37f 100644 --- a/GMW/GMW_data/DS_Utility.xsd +++ b/GMW/GMW_data/DS_Utility.xsd @@ -67,6 +67,45 @@ ORDER BY label + + + + dbo.stp_ContaCelleBlocco + + + + + + + + + + + + + + + dbo.stp_ContaDeltaCelleBlocco + + + + + + + + + + + + dbo.stp_celleCreaMancantiBlocco + + + + + + + + @@ -77,21 +116,21 @@ ORDER BY label - + - + - + diff --git a/GMW/GMW_data/DS_Utility.xss b/GMW/GMW_data/DS_Utility.xss index 9bb894fe..8cbb1994 100644 --- a/GMW/GMW_data/DS_Utility.xss +++ b/GMW/GMW_data/DS_Utility.xss @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index 65975314..41925ffa 100644 Binary files a/GMW/GMW_data/bin/Debug/GMW_data.dll and b/GMW/GMW_data/bin/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll index 65975314..41925ffa 100644 Binary files a/GMW/GMW_data/obj/Debug/GMW_data.dll and b/GMW/GMW_data/obj/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll b/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll index 5352a715..f33d2bdf 100644 Binary files a/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll and b/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll index 7ef1fc54..61badbb5 100644 Binary files a/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll and b/GMW/GMW_data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll differ
 
+
@@ -54,8 +59,8 @@
+
diff --git a/GMW/GMW/WebUserControls/mod_confMag.ascx.cs b/GMW/GMW/WebUserControls/mod_confMag.ascx.cs index c2d55a86..fc71c2b3 100644 --- a/GMW/GMW/WebUserControls/mod_confMag.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_confMag.ascx.cs @@ -14,12 +14,22 @@ namespace GMW.WebUserControls protected override void OnInit(EventArgs e) { base.OnInit(e); + } + + public void doUpdate() + { + bindControlli(); + } + + protected override void bindControlli() + { fixLabels(); fixValues(); } private void fixValues() { + lblTotaleImpieghi.Text = traduci("lblTotaleImpieghi"); lblTotCelleDaTipo.Text = traduci("lblTotCelleDaTipo"); lblTotCelleDaBlocchi.Text = traduci("lblTotCelleDaBlocchi"); lblDettImpieghiBlocchi.Text = traduci("lblDettImpieghiBlocchi"); @@ -31,16 +41,61 @@ namespace GMW.WebUserControls private void fixLabels() { + showImpieghiTotali(); + showImpieghiBlocco(); + } + + private void showImpieghiBlocco() + { + // calcolo valori: attive assegnate + int? celleAttiveAss = 0; + utils.obj.taSTP.stp_ContaCelleBlocco(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), true, 1, ref celleAttiveAss); + if (!celleAttiveAss.HasValue) celleAttiveAss = 0; + // calcolo valori: attive assegnate + int? celleAttiveNonAss = 0; + utils.obj.taSTP.stp_ContaCelleBlocco(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), true, 0, ref celleAttiveNonAss); + if (!celleAttiveNonAss.HasValue) celleAttiveNonAss = 0; + + // calcolo valori: NON attive assegnate + int? celleNonAttiveAss = 0; + utils.obj.taSTP.stp_ContaCelleBlocco(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), false, 1, ref celleNonAttiveAss); + if (!celleNonAttiveAss.HasValue) celleNonAttiveAss = 0; + // calcolo valori: NONattive assegnate + int? celleNonAttiveNonAss = 0; + utils.obj.taSTP.stp_ContaCelleBlocco(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), false, 0, ref celleNonAttiveNonAss); + if (!celleNonAttiveNonAss.HasValue) celleNonAttiveNonAss = 0; + // altri valori + lblAssAtt.Text = celleAttiveAss.ToString(); + lblAssInatt.Text = celleNonAttiveAss.ToString(); + lblNonAssAtt.Text = celleAttiveNonAss.ToString(); + lblNonAssInatt.Text = celleNonAttiveNonAss.ToString(); + } + + private void showImpieghiTotali() + { + // calcolo valori int? totCelleTipo = 0; utils.obj.taSTP.stp_ContaCelle4Tipo(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), ref totCelleTipo); - lblNumCelleDaTipo.Text = totCelleTipo.ToString(); + if (!totCelleTipo.HasValue) totCelleTipo = 0; int? totCelleBlocchi = 0; utils.obj.taSTP.stp_ContaCelle4Blocchi(memLayer.ML.confReadString("CodCS"), memLayer.ML.StringSessionObj("CodMag_sel"), ref totCelleBlocchi); + if (!totCelleBlocchi.HasValue) totCelleBlocchi = 0; + // controllo cosa inserire nel check... + Style ctrlStyle = new Style(); + if (totCelleBlocchi == totCelleTipo) + { + ctrlStyle.CssClass = "valOk"; + } + else + { + ctrlStyle.CssClass = "valKo"; + } + // applico style + lblNumCelleDaTipo.ApplyStyle(ctrlStyle); + lblNumCelleDaBlocchi.ApplyStyle(ctrlStyle); + // inserisco valori + lblNumCelleDaTipo.Text = totCelleTipo.ToString(); lblNumCelleDaBlocchi.Text = totCelleBlocchi.ToString(); - lblAssAtt.Text = "0"; - lblAssInatt.Text = "0"; - lblNonAssAtt.Text = "0"; - lblNonAssInatt.Text = "0"; } } } \ No newline at end of file diff --git a/GMW/GMW/WebUserControls/mod_confMag.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_confMag.ascx.designer.cs index 818b83a9..30e8600b 100644 --- a/GMW/GMW/WebUserControls/mod_confMag.ascx.designer.cs +++ b/GMW/GMW/WebUserControls/mod_confMag.ascx.designer.cs @@ -13,6 +13,15 @@ namespace GMW.WebUserControls { public partial class mod_confMag { + /// + /// lblTotaleImpieghi control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblTotaleImpieghi; + /// /// lblTotCelleDaTipo control. /// diff --git a/GMW/GMW/WebUserControls/mod_tipoCella.ascx.cs b/GMW/GMW/WebUserControls/mod_tipoCella.ascx.cs index 2c325556..62ffb047 100644 --- a/GMW/GMW/WebUserControls/mod_tipoCella.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_tipoCella.ascx.cs @@ -323,6 +323,11 @@ namespace GMW.WebUserControls /// protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) { + // evento come nuovo... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } } /// /// determina se sia eliminabile il record (=non usato) diff --git a/GMW/GMW/anagMagazzini.aspx b/GMW/GMW/anagMagazzini.aspx index efb8a23f..1c2ad65d 100644 --- a/GMW/GMW/anagMagazzini.aspx +++ b/GMW/GMW/anagMagazzini.aspx @@ -13,14 +13,14 @@ -
+
-
+