diff --git a/WebSites/WebGIM/App_Code/DS_applicazione.xsd b/WebSites/WebGIM/App_Code/DS_applicazione.xsd index fb8cbd8..ebd9c86 100644 --- a/WebSites/WebGIM/App_Code/DS_applicazione.xsd +++ b/WebSites/WebGIM/App_Code/DS_applicazione.xsd @@ -746,6 +746,95 @@ where idxStato=@idxStato + + + + + + DELETE FROM [dbo].[InterventoOpMtz] WHERE (([numIntMtz] = @Original_numIntMtz) AND ([matrOp] = @Original_matrOp)) + + + + + + + + + INSERT INTO [dbo].[InterventoOpMtz] ([numIntMtz], [matrOp], [durataMinuti]) VALUES (@numIntMtz, @matrOp, @durataMinuti) + + + + + + + + + + SELECT numIntMtz, matrOp, durataMinuti FROM dbo.InterventoOpMtz + + + + + + UPDATE [dbo].[InterventoOpMtz] SET [numIntMtz] = @numIntMtz, [matrOp] = @matrOp, [durataMinuti] = @durataMinuti WHERE (([numIntMtz] = @Original_numIntMtz) AND ([matrOp] = @Original_matrOp)) + + + + + + + + + + + + + + + + + + + + + SELECT numIntMtz, matrOp, durataMinuti +FROM InterventoOpMtz +WHERE (numIntMtz = @numIntMtz) AND (matrOp = @matrOp) + + + + + + + + + + + SELECT numIntMtz, matrOp, durataMinuti FROM dbo.InterventoOpMtz +where numIntMtz=@numIntMtz + + + + + + + + + + UPDATE InterventoOpMtz +SET matrOp = @matrOp, durataMinuti = @durataMinuti +WHERE (numIntMtz = @Original_numIntMtz) AND (matrOp = @Original_matrOp) + + + + + + + + + + + @@ -757,16 +846,16 @@ where idxStato=@idxStato - - + + - - + + @@ -779,7 +868,186 @@ where idxStato=@idxStato - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -787,6 +1055,83 @@ where idxStato=@idxStato + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -797,259 +1142,18 @@ where idxStato=@idxStato - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1096,6 +1200,11 @@ where idxStato=@idxStato + + + + + @@ -1106,6 +1215,7 @@ where idxStato=@idxStato + \ No newline at end of file diff --git a/WebSites/WebGIM/App_Code/DS_applicazione.xss b/WebSites/WebGIM/App_Code/DS_applicazione.xss index 2e4b176..cda5111 100644 --- a/WebSites/WebGIM/App_Code/DS_applicazione.xss +++ b/WebSites/WebGIM/App_Code/DS_applicazione.xss @@ -6,19 +6,20 @@ --> - - - - - - - - - - + + + + + + + + + + + - + 1034 @@ -30,7 +31,7 @@ - + 1187 @@ -42,7 +43,7 @@ - + 937 @@ -54,7 +55,7 @@ - + 511 @@ -66,7 +67,7 @@ - + 810 @@ -78,7 +79,7 @@ - + 364 @@ -90,7 +91,7 @@ - + 297 @@ -102,5 +103,17 @@ + + + + 686 + 722 + + + 790 + 722 + + + \ No newline at end of file diff --git a/WebSites/WebGIM/App_Code/TA_app.cs b/WebSites/WebGIM/App_Code/TA_app.cs index cf2d665..17573e5 100644 --- a/WebSites/WebGIM/App_Code/TA_app.cs +++ b/WebSites/WebGIM/App_Code/TA_app.cs @@ -19,6 +19,7 @@ public class TA_app public DS_applicazioneTableAdapters.v_intervExpTableAdapter taInterventiMtz; public DS_applicazioneTableAdapters.AnagStatiTableAdapter taStati; public DS_applicazioneTableAdapters.AnagPrioritaTableAdapter taPrior; + public DS_applicazioneTableAdapters.InterventoOpMtzTableAdapter taIntOpMtz; #endregion @@ -61,6 +62,10 @@ public class TA_app { taPrior = new DS_applicazioneTableAdapters.AnagPrioritaTableAdapter(); } + if (taIntOpMtz == null) + { + taIntOpMtz = new DS_applicazioneTableAdapters.InterventoOpMtzTableAdapter(); + } } /// /// Singleton diff --git a/WebSites/WebGIM/Web.config b/WebSites/WebGIM/Web.config index eca60fd..17ba662 100644 --- a/WebSites/WebGIM/Web.config +++ b/WebSites/WebGIM/Web.config @@ -99,7 +99,11 @@ - + + + + + diff --git a/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config b/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config index 076a347..b153eb3 100644 --- a/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config +++ b/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config @@ -30,6 +30,10 @@ + + + + diff --git a/WebSites/WebGIM/mod_anagAmbitiGuasto.ascx b/WebSites/WebGIM/mod_anagAmbitiGuasto.ascx index ae7b066..8ce8da5 100644 --- a/WebSites/WebGIM/mod_anagAmbitiGuasto.ascx +++ b/WebSites/WebGIM/mod_anagAmbitiGuasto.ascx @@ -2,8 +2,7 @@ Inherits="mod_anagAmbitiGuasto" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> + DataKeyNames="idxAmbito" DataSourceID="ods" OnDataBound="grView_DataBound" OnRowEditing="grView_RowEditing"> @@ -25,7 +24,8 @@ ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' /> - + - - + - + - + @@ -65,8 +62,7 @@ TargetControlID="imgDelete"> - - + diff --git a/WebSites/WebGIM/mod_dettaglioIntervento.ascx b/WebSites/WebGIM/mod_dettaglioIntervento.ascx index d10b33a..f9cec2a 100644 --- a/WebSites/WebGIM/mod_dettaglioIntervento.ascx +++ b/WebSites/WebGIM/mod_dettaglioIntervento.ascx @@ -1,4 +1,5 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_dettaglioIntervento.ascx.cs" Inherits="mod_dettaglioIntervento" %> +<%@ Register src="mod_interventoOpMtz.ascx" tagname="mod_interventoOpMtz" tagprefix="uc1" %> @@ -6,6 +7,7 @@ onclick="btnEditFull_Click" /> + diff --git a/WebSites/WebGIM/mod_impianti.ascx.cs b/WebSites/WebGIM/mod_impianti.ascx.cs index 6681aa1..94732e8 100644 --- a/WebSites/WebGIM/mod_impianti.ascx.cs +++ b/WebSites/WebGIM/mod_impianti.ascx.cs @@ -328,7 +328,8 @@ public partial class mod_impianti : ApplicationUserControl // reset selezione... resetSelezione(); // i primi valori ("0") di default sono "ND"... li inserisco come standard... - TA_app.obj.taImpianti.Insert("0000", "-- [NUOVO] Nome Impianto non definito --", "tipo n.d.", DateTime.Today, DateTime.Today.AddYears(10)); + string codImp = memLayer.ML.confReadstring("defaultCodImp"); + TA_app.obj.taImpianti.Insert(codImp, "-- [NUOVO] Nome Impianto non definito --", "tipo n.d.", DateTime.Today, DateTime.Today.AddYears(10)); grView.DataBind(); } /// diff --git a/WebSites/WebGIM/mod_interventoOpMtz.ascx b/WebSites/WebGIM/mod_interventoOpMtz.ascx new file mode 100644 index 0000000..3c3048f --- /dev/null +++ b/WebSites/WebGIM/mod_interventoOpMtz.ascx @@ -0,0 +1,102 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_interventoOpMtz.ascx.cs" + Inherits="mod_interventoOpMtz" %> +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebSites/WebGIM/mod_interventoOpMtz.ascx.cs b/WebSites/WebGIM/mod_interventoOpMtz.ascx.cs new file mode 100644 index 0000000..83f5a13 --- /dev/null +++ b/WebSites/WebGIM/mod_interventoOpMtz.ascx.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using SteamWare; + +public partial class mod_interventoOpMtz : ApplicationUserControl +{ + public event EventHandler eh_selezioneValore; + public event EventHandler eh_resetSelezione; + /// + /// evento dati associati a controllo + /// + /// + /// + 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 = ""; + } + } + /// + /// reset delle selezioni + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + if (eh_resetSelezione != null) + { + eh_resetSelezione(this, new EventArgs()); + } + } + /// + /// seleziono valore in editing... + /// + /// + /// + protected void grView_RowEditing(object sender, GridViewEditEventArgs e) + { + // seleziono la riga corrente... + grView.SelectedIndex = e.NewEditIndex; + } + /// + /// gestione evento inserimento nuovo record standard (se ZERO presenti) + /// + /// + /// + protected void btnNewFromEmpty_Click(object sender, EventArgs e) + { + // reset selezione... + resetSelezione(); + int numIntMtz = memLayer.ML.IntSessionObj("numIntMtz_sel"); + string matr = memLayer.ML.confReadstring("defaultMatr"); + TA_app.obj.taIntOpMtz.Insert(numIntMtz, matr, 0); + grView.DataBind(); + } + /// + /// restituisce un booleano se sia abilitato inserimento nuovi valori (solo se NON C'E' GIA' un operatore con amtricola di default...) + /// + /// + public bool canInsertNew() + { + bool answ = false; + int numIntMtz = memLayer.ML.IntSessionObj("numIntMtz_sel"); + string matr = memLayer.ML.confReadstring("defaultMatr"); + try + { + answ = (TA_app.obj.taIntOpMtz.getByMatrNumIntMtz(numIntMtz, matr).Rows.Count == 0); + } + catch + { } + return answ; + } +} diff --git a/WebSites/WebGIM/mod_macchine.ascx.cs b/WebSites/WebGIM/mod_macchine.ascx.cs index 3dfbcfc..a962eac 100644 --- a/WebSites/WebGIM/mod_macchine.ascx.cs +++ b/WebSites/WebGIM/mod_macchine.ascx.cs @@ -403,7 +403,8 @@ public partial class mod_macchine : ApplicationUserControl // reset selezione... resetSelezione(); // i primi valori ("0") di default sono "ND"... li inserisco come standard... - TA_app.obj.taMacchine.Insert(1, "0000", "-- [NUOVA] Nome Macchina non definito --", "modello n.d.", "", DateTime.Now.Year, 0, 0, DateTime.Today, DateTime.Today.AddYears(10)); + string codMacc = memLayer.ML.confReadstring("defaultCodMacc"); + TA_app.obj.taMacchine.Insert(1, codMacc, "-- [NUOVA] Nome Macchina non definito --", "modello n.d.", "", DateTime.Now.Year, 0, 0, DateTime.Today, DateTime.Today.AddYears(10)); grView.DataBind(); } /// diff --git a/WebSites/WebGIM/test.aspx b/WebSites/WebGIM/test.aspx index 95ba70c..d9cfb5d 100644 --- a/WebSites/WebGIM/test.aspx +++ b/WebSites/WebGIM/test.aspx @@ -1,16 +1,6 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %> +<%@ Page Title="" Language="C#" MasterPageFile="~/Ajax.master" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %> - - - - - - - - - - - - - + + + diff --git a/WebSites/WebGIM/test.aspx.cs b/WebSites/WebGIM/test.aspx.cs index 606595f..b7780d4 100644 --- a/WebSites/WebGIM/test.aspx.cs +++ b/WebSites/WebGIM/test.aspx.cs @@ -8,14 +8,6 @@ public partial class test : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { -#if false - reportExporter re = new reportExporter(); - re.popolaPdfStream(reportRichiesto.RichiestaIntervento, "1"); - Response.Clear(); - Response.ContentType = re.mimeType; - Response.AddHeader("content-disposition", "attachment; filename=WebGIM." + re.fileNameExtension); - Response.BinaryWrite(re.renderedBytes); - Response.End(); -#endif + } }