From 4450b4dcd27d87f95bcbeeba697699c19fa53fc0 Mon Sep 17 00:00:00 2001 From: samuele Date: Fri, 23 Jan 2009 11:06:43 +0000 Subject: [PATCH] =?UTF-8?q?-=20Fix=20cancellabilit=C3=A0=20macchine/impian?= =?UTF-8?q?ti=20condizionata=20a=20interventi=20gi=C3=A0=20registrati=20-?= =?UTF-8?q?=20Fix=20comportamento=20ricerca=20impianti=20con=20dettaglio?= =?UTF-8?q?=20mostrato=20se=20gli=20impianti=20non=20lo=20sono=20(ricerca?= =?UTF-8?q?=20in=20child...)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://keyhammer.ath.cx/svn/WebGIM/trunk@37 3e04ef4b-3b25-4b6c-be27-bb5389ca777b --- WebSites/WebGIM/App_Code/DS_applicazione.xsd | 405 ++++++++++--------- WebSites/WebGIM/App_Code/DS_applicazione.xss | 4 +- WebSites/WebGIM/mod_impianti.ascx.cs | 72 ++-- WebSites/WebGIM/mod_macchine.ascx.cs | 10 +- 4 files changed, 270 insertions(+), 221 deletions(-) diff --git a/WebSites/WebGIM/App_Code/DS_applicazione.xsd b/WebSites/WebGIM/App_Code/DS_applicazione.xsd index 18aaf71..fb8cbd8 100644 --- a/WebSites/WebGIM/App_Code/DS_applicazione.xsd +++ b/WebSites/WebGIM/App_Code/DS_applicazione.xsd @@ -577,6 +577,37 @@ WHERE (numIntMtz = @numIntMtz) + + + + SELECT numIntMtz, richiesta, dataLav, turnoLav, matr, guasto, idxAmbito, descrAmbitoGuasto, idxPriorita, descrPriorita, isFermo, idxTipo, descrTipo, idxImpianto, + codImpianto, nomeImpianto, idxMacchina, codMacchina, nomeMacchina, descrizione, idxStato, DescrStato, presaInCarico, inizioIntervento, fineIntervento, + descrizioneIntervento, isPreventivabile, idxCausale, descrCausale +FROM v_intervExp +where idxImpianto=@idxImpianto +ORDER BY numIntMtz DESC + + + + + + + + + + + SELECT numIntMtz, richiesta, dataLav, turnoLav, matr, guasto, idxAmbito, descrAmbitoGuasto, idxPriorita, descrPriorita, isFermo, idxTipo, descrTipo, idxImpianto, + codImpianto, nomeImpianto, idxMacchina, codMacchina, nomeMacchina, descrizione, idxStato, DescrStato, presaInCarico, inizioIntervento, fineIntervento, + descrizioneIntervento, isPreventivabile, idxCausale, descrCausale +FROM v_intervExp +WHERE idxMacchina=@idxMacchina +ORDER BY numIntMtz DESC + + + + + + @@ -726,16 +757,16 @@ where idxStato=@idxStato - - + + - - + + @@ -748,15 +779,15 @@ where idxStato=@idxStato - - + + - + @@ -769,179 +800,7 @@ where idxStato=@idxStato - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -956,6 +815,23 @@ where idxStato=@idxStato + + + + + + + + + + + + + + + + + @@ -970,14 +846,169 @@ where idxStato=@idxStato - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -990,8 +1021,8 @@ where idxStato=@idxStato - - + + @@ -1004,15 +1035,15 @@ where idxStato=@idxStato - - + + - + diff --git a/WebSites/WebGIM/App_Code/DS_applicazione.xss b/WebSites/WebGIM/App_Code/DS_applicazione.xss index 497b443..2e4b176 100644 --- a/WebSites/WebGIM/App_Code/DS_applicazione.xss +++ b/WebSites/WebGIM/App_Code/DS_applicazione.xss @@ -13,7 +13,7 @@ - + @@ -73,7 +73,7 @@ 429 - 711 + 686 429 diff --git a/WebSites/WebGIM/mod_impianti.ascx.cs b/WebSites/WebGIM/mod_impianti.ascx.cs index fc643ce..6681aa1 100644 --- a/WebSites/WebGIM/mod_impianti.ascx.cs +++ b/WebSites/WebGIM/mod_impianti.ascx.cs @@ -147,35 +147,7 @@ public partial class mod_impianti : ApplicationUserControl base.aggiornaControlliDataGL(); grView.PageSize = _righeDataGridMed; } - /// - /// traduce gli header delle colonne - /// - /// - /// - protected void grView_DataBound(object sender, EventArgs e) - { - if (grView.Rows.Count > 0) - { - LinkButton lb; - // aggiorno gli headers - foreach (TableCell cella in grView.HeaderRow.Cells) - { - try - { - lb = (LinkButton)cella.Controls[0]; - lb.Text = traduci(lb.Text); - } - catch - { } - } - int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); - lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); - } - else - { - lblNumRec.Text = ""; - } - } + /// /// gestione evento richeista nuovo valore (mostra footer, ...) /// @@ -283,7 +255,14 @@ public partial class mod_impianti : ApplicationUserControl /// protected bool objIsNotRelated(object idxObj) { - return false;// taMacchine.getByIdxFase(idxObj.ToString()).Rows.Count == 0; + bool answ = false; + try + { + answ = (TA_app.obj.taInterventiMtz.getByIdxImpianto(Convert.ToInt32(idxObj)).Rows.Count == 0); + } + catch + { } + return answ; } /// /// elenco colonne del datagrid @@ -410,6 +389,39 @@ public partial class mod_impianti : ApplicationUserControl if (idx > 1 && numMacchineImpianto < 1) answ = true; return answ; } + /// + /// traduce gli header delle colonne + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) + { + if (grView.Rows.Count > 0) + { + LinkButton lb; + // aggiorno gli headers + foreach (TableCell cella in grView.HeaderRow.Cells) + { + try + { + lb = (LinkButton)cella.Controls[0]; + lb.Text = traduci(lb.Text); + } + catch + { } + } + int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); + lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); + } + else + { + lblNumRec.Text = ""; + if (eh_resetSelezione != null) + { + eh_resetSelezione(this, new EventArgs()); + } + } + } #endregion } \ No newline at end of file diff --git a/WebSites/WebGIM/mod_macchine.ascx.cs b/WebSites/WebGIM/mod_macchine.ascx.cs index 643b810..3dfbcfc 100644 --- a/WebSites/WebGIM/mod_macchine.ascx.cs +++ b/WebSites/WebGIM/mod_macchine.ascx.cs @@ -305,8 +305,14 @@ public partial class mod_macchine : ApplicationUserControl /// protected bool objIsNotRelated(object idxObj) { - // !!!FARE!!! - return true;// taMacchine.getByIdxFase(idxObj.ToString()).Rows.Count == 0; + bool answ = false; + try + { + answ = (TA_app.obj.taInterventiMtz.getByIdxMacchina(Convert.ToInt32(idxObj)).Rows.Count == 0); + } + catch + { } + return answ; } /// /// elenco colonne del datagrid