diff --git a/WebSites/WebGIM/Style.css b/WebSites/WebGIM/Style.css index e811ecd..d143cff 100644 --- a/WebSites/WebGIM/Style.css +++ b/WebSites/WebGIM/Style.css @@ -13,6 +13,21 @@ color:Black; } +.semaforoVerde +{ + color: Green; +} +.semaforoGiallo +{ + color: Orange; + font-weight: bold; +} +.semaforoRosso +{ + color: Red; + font-weight: bold; +} + /* @group Calendario */ .calSel diff --git a/WebSites/WebGIM/mod_elencoRichieste.ascx b/WebSites/WebGIM/mod_elencoRichieste.ascx index 1a90ca6..6f2de1d 100644 --- a/WebSites/WebGIM/mod_elencoRichieste.ascx +++ b/WebSites/WebGIM/mod_elencoRichieste.ascx @@ -4,7 +4,7 @@
area filtraggi vari
-
+
- <%-- + -   - - - - - - - - - - - --%> - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - <%-- + + + + + + + + + + + + - + - - - + - - - - - - - - - --%> + + FilterExpression=" codImpianto LIKE '%{0}%' OR nomeImpianto LIKE '%{0}%' OR codMacchina LIKE '%{0}%' OR nomeMacchina LIKE '%{0}%' OR descrizione LIKE '%{0}%' "> diff --git a/WebSites/WebGIM/mod_elencoRichieste.ascx.cs b/WebSites/WebGIM/mod_elencoRichieste.ascx.cs index 17db424..aac458c 100644 --- a/WebSites/WebGIM/mod_elencoRichieste.ascx.cs +++ b/WebSites/WebGIM/mod_elencoRichieste.ascx.cs @@ -16,128 +16,6 @@ public partial class mod_elencoRichieste : ApplicationUserControl protected string _idxGridViewExt; protected bool _showNewBtn = false; - /// - /// imposta errore non cancellabilità per record correlati - /// - protected void setNoDeletableErrorMessage() - { - // mostro avviso di non cancellabilità... - lblWarning.Text = traduci("notDeletable_hasChild"); - lblWarning.Visible = true; - grView.DataBind(); - } - /// - /// esegue cancellazione record - /// - protected void doDelete() - { - // posso cancellare... - lblWarning.Visible = false; - ods.Delete(); - } - /// - /// Valida la cancellazione per i dati mostrati dal gridView - /// richiede sia preventivamentedichiarato _idxGridView - /// - /// - /// - protected virtual void validaDelete(object sender, ObjectDataSourceMethodEventArgs e) - { - int idx = Convert.ToInt32(e.InputParameters[string.Format("Original_{0}", _idxGridView)]); - if (objIsNotRelated(idx)) - { - // annullo cancellazione... - e.Cancel = true; - // seleziono record... metto in session valore idx e poi ridisegno... - SteamWare.memLayer.ML.setSessionVal(_idxGridView, idx); - setNoDeletableErrorMessage(); - } - else - { - doDelete(); - } - } - - /// - /// recupera i dati di un nuovo record contenuti nel footer di un gridView; - /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...) - /// - /// - /// - protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e) - { - //recupero la riga footer... - DataColumnCollection colonne = colonneObj(); - string nomeCol; - string tipoColonna = ""; - foreach (DataColumn colonna in colonne) - { - nomeCol = colonna.ColumnName; - // cerco un textbox o quello che sia... - if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null) - { - tipoColonna = "textBox"; - } - else if (grView.FooterRow.FindControl(string.Format("cal_{0}", nomeCol)) != null) - { - tipoColonna = "calTextBox"; - } - else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null) - { - tipoColonna = "dropDownList"; - } - else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null) - { - tipoColonna = "checkBox"; - } - else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null) - { - tipoColonna = "selAjax"; - } - // in base al tipo salvo negli inputparameters dell'ODS - switch (tipoColonna) - { - case "textBox": - e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text; - break; - case "calTextBox": - e.InputParameters[nomeCol] = Convert.ToDateTime(((TextBox)grView.FooterRow.FindControl(string.Format("cal_{0}", nomeCol))).Text); - break; - case "dropDownList": - e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue; - break; - case "checkBox": - e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).Checked; - break; - case "selAjax": - e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore; - break; - default: - break; - } - tipoColonna = ""; - } - } - /// - /// inserisce nuovo valore da footer - /// - /// - /// - protected void lblIns_click(object sender, EventArgs e) - { - // click su inserimento, chiamo il metodo insert dell'ObjectDataSource - ods.Insert(); - } - /// - /// annulla inserimento nuovo valore da footer - /// - /// - /// - protected void lblCanc_click(object sender, EventArgs e) - { - // annullo inserimento: nascondo footer, bind controlli... - grView.FooterRow.Visible = false; - } /// /// aggiorna controlli datagrid e numero righe in pagina @@ -276,15 +154,6 @@ public partial class mod_elencoRichieste : ApplicationUserControl #region area codice variabile - /// - /// verifica complessiva non esistenza record child - /// - /// - /// - protected bool objIsNotRelated(object idxObj) - { - return false;// taMacchine.getByIdxFase(idxObj.ToString()).Rows.Count == 0; - } /// /// elenco colonne del datagrid /// @@ -331,15 +200,6 @@ public partial class mod_elencoRichieste : ApplicationUserControl } } /// - /// svuoto da cache post update - /// - /// - /// - protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) - { - // svuoto da cache... - } - /// /// in caso di aggiornamento verifico se sia salvato un comando clona... /// /// @@ -371,6 +231,67 @@ public partial class mod_elencoRichieste : ApplicationUserControl break; } } - + /// + /// formatta il tooltip del ferma dalle... + /// + /// + /// + public string formatFermaDalle(object dataOraFermo) + { + return string.Format("{0}: {1:dd/MM/yy HH:mm}", traduci("inizioFermata"), dataOraFermo); + } + /// + /// restituice lo stile css dato lo stato dell'intervento + /// + /// + /// + public string stileDaStato(object idxStato) + { + string answ = "semaforoRosso"; + try + { + answ = TA_app.obj.taStati.getByIdxStato(Convert.ToInt32(idxStato))[0].stile; + } + catch + { } + return answ; + } + /// + /// restituice lo stile css data la priorità dell'intervento + /// + /// + /// + public string stileDaPrior(object idxPrior) + { + string answ = "semaforoRosso"; + try + { + answ = TA_app.obj.taPrior.getByIdxPriorita(Convert.ToInt32(idxPrior))[0].stile; + } + catch + { } + return answ; + } + /// + /// restituisce un testo trimamto a maxChar caratteri + /// + /// + /// + /// + public string trimmaTesto(object _testo, object _maxChar) + { + string answ = ""; + string testo = _testo.ToString(); + int maxChar = Convert.ToInt32(_maxChar); + if (testo.Length <= maxChar) + { + answ = testo; + } + else + { + answ = string.Format("{0}...", testo.Substring(0, maxChar)); + } + return answ; + } #endregion } diff --git a/WebSites/WebGIM/mod_priorita.ascx b/WebSites/WebGIM/mod_priorita.ascx index 3cb0f94..7c3c28a 100644 --- a/WebSites/WebGIM/mod_priorita.ascx +++ b/WebSites/WebGIM/mod_priorita.ascx @@ -45,6 +45,20 @@ + + + + + + + + + + + @@ -73,6 +87,7 @@ + @@ -84,5 +99,6 @@ + diff --git a/WebSites/WebGIM/mod_priorita.ascx.cs b/WebSites/WebGIM/mod_priorita.ascx.cs index 941c802..d7636a7 100644 --- a/WebSites/WebGIM/mod_priorita.ascx.cs +++ b/WebSites/WebGIM/mod_priorita.ascx.cs @@ -90,7 +90,7 @@ public partial class mod_priorita : ApplicationUserControl { logger.lg.scriviLog("Errore nel recupero del max idx di prorità", tipoLog.EXCEPTION); } - taPrior.Insert(nextFree, "-- [NUOVA] non definita --"); + taPrior.Insert(nextFree, "-- [NUOVA] non definita --", "semaforoVerde"); grView.DataBind(); } } \ No newline at end of file