From 16890d6fb47255abbc8f2ab272f975dd1a58fbd7 Mon Sep 17 00:00:00 2001 From: samuele Date: Wed, 28 Jan 2009 11:45:26 +0000 Subject: [PATCH] pRIMA VERSIONE INSERIMENTO INTERVENTI mTZ PROGRAMMATA git-svn-id: https://keyhammer.ath.cx/svn/WebGIM/trunk@46 3e04ef4b-3b25-4b6c-be27-bb5389ca777b --- WebSites/WebGIM/App_Code/DS_applicazione.xsd | 96 +++++++++++++++++ WebSites/WebGIM/App_Code/DS_applicazione.xss | 39 +++---- WebSites/WebGIM/App_Code/DS_utility.xsd | 95 ++++++++++++----- WebSites/WebGIM/App_Code/DS_utility.xss | 15 +-- WebSites/WebGIM/App_Code/TA_app.cs | 5 + WebSites/WebGIM/Style.css | 63 ++++++----- WebSites/WebGIM/mod_dataOra.ascx | 8 +- WebSites/WebGIM/mod_dettMtzProg.ascx | 105 ++++++++++++++++++- WebSites/WebGIM/mod_dettMtzProg.ascx.cs | 67 ++++++++++++ WebSites/WebGIM/mod_elencoMtzProg.ascx | 6 +- WebSites/WebGIM/mod_elencoMtzProg.ascx.cs | 17 +++ WebSites/WebGIM/mod_insertRichiesta.ascx | 16 +-- WebSites/WebGIM/mtzProg.aspx | 15 +-- WebSites/WebGIM/mtzProg.aspx.cs | 13 +++ WebSites/WebGIM/sql/GIM_0002.sql | 2 +- 15 files changed, 454 insertions(+), 108 deletions(-) diff --git a/WebSites/WebGIM/App_Code/DS_applicazione.xsd b/WebSites/WebGIM/App_Code/DS_applicazione.xsd index ebd9c86..c24ad09 100644 --- a/WebSites/WebGIM/App_Code/DS_applicazione.xsd +++ b/WebSites/WebGIM/App_Code/DS_applicazione.xsd @@ -835,6 +835,70 @@ WHERE (numIntMtz = @Original_numIntMtz) AND (matrOp = @Original_matrOp) + + + + + + DELETE FROM [MtzProgrammata] WHERE (([idxIntPro] = @Original_idxIntPro)) + + + + + + + + INSERT INTO [MtzProgrammata] ([idxMacchina], [inizio], [codFrequenza], [cadenza], [descrizione], [idxPriorita], [isFermo], [idxTipo]) VALUES (@idxMacchina, @inizio, @codFrequenza, @cadenza, @descrizione, @idxPriorita, @isFermo, @idxTipo) + + + + + + + + + + + + + + + SELECT idxIntPro, idxMacchina, inizio, codFrequenza, cadenza, descrizione, idxPriorita, isFermo, idxTipo +FROM MtzProgrammata + + + + + + UPDATE [MtzProgrammata] SET [idxMacchina] = @idxMacchina, [inizio] = @inizio, [codFrequenza] = @codFrequenza, [cadenza] = @cadenza, [descrizione] = @descrizione, [idxPriorita] = @idxPriorita, [isFermo] = @isFermo, [idxTipo] = @idxTipo WHERE (([idxIntPro] = @Original_idxIntPro)) + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1157,6 +1221,34 @@ WHERE (numIntMtz = @Original_numIntMtz) AND (matrOp = @Original_matrOp) + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1205,6 +1297,10 @@ WHERE (numIntMtz = @Original_numIntMtz) AND (matrOp = @Original_matrOp) + + + + diff --git a/WebSites/WebGIM/App_Code/DS_applicazione.xss b/WebSites/WebGIM/App_Code/DS_applicazione.xss index cda5111..d9f1999 100644 --- a/WebSites/WebGIM/App_Code/DS_applicazione.xss +++ b/WebSites/WebGIM/App_Code/DS_applicazione.xss @@ -6,20 +6,21 @@ --> - - - - - - - - - - - + + + + + + + + + + + + - + 1034 @@ -31,7 +32,7 @@ - + 1187 @@ -43,7 +44,7 @@ - + 937 @@ -55,7 +56,7 @@ - + 511 @@ -67,7 +68,7 @@ - + 810 @@ -79,7 +80,7 @@ - + 364 @@ -91,7 +92,7 @@ - + 297 @@ -103,7 +104,7 @@ - + 686 diff --git a/WebSites/WebGIM/App_Code/DS_utility.xsd b/WebSites/WebGIM/App_Code/DS_utility.xsd index ba1e401..8c0f45a 100644 --- a/WebSites/WebGIM/App_Code/DS_utility.xsd +++ b/WebSites/WebGIM/App_Code/DS_utility.xsd @@ -165,6 +165,23 @@ WHERE (conditio = @conditio) + + + + + + SELECT value, label FROM dbo.v_selFreq + + + + + + + + + + + @@ -176,8 +193,8 @@ WHERE (conditio = @conditio) - - + + @@ -190,23 +207,23 @@ WHERE (conditio = @conditio) - - + + - + - - + + @@ -219,8 +236,8 @@ WHERE (conditio = @conditio) - - + + @@ -233,22 +250,7 @@ WHERE (conditio = @conditio) - - - - - - - - - - - - - - - - + @@ -256,16 +258,51 @@ WHERE (conditio = @conditio) + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -305,5 +342,9 @@ WHERE (conditio = @conditio) + + + + \ No newline at end of file diff --git a/WebSites/WebGIM/App_Code/DS_utility.xss b/WebSites/WebGIM/App_Code/DS_utility.xss index 2e75899..73f3a77 100644 --- a/WebSites/WebGIM/App_Code/DS_utility.xss +++ b/WebSites/WebGIM/App_Code/DS_utility.xss @@ -6,13 +6,14 @@ --> - - - - - - - + + + + + + + + \ 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 17573e5..47a5171 100644 --- a/WebSites/WebGIM/App_Code/TA_app.cs +++ b/WebSites/WebGIM/App_Code/TA_app.cs @@ -20,6 +20,7 @@ public class TA_app public DS_applicazioneTableAdapters.AnagStatiTableAdapter taStati; public DS_applicazioneTableAdapters.AnagPrioritaTableAdapter taPrior; public DS_applicazioneTableAdapters.InterventoOpMtzTableAdapter taIntOpMtz; + public DS_applicazioneTableAdapters.MtzProgrammataTableAdapter taMtzPro; #endregion @@ -66,6 +67,10 @@ public class TA_app { taIntOpMtz = new DS_applicazioneTableAdapters.InterventoOpMtzTableAdapter(); } + if (taMtzPro == null) + { + taMtzPro = new DS_applicazioneTableAdapters.MtzProgrammataTableAdapter(); + } } /// /// Singleton diff --git a/WebSites/WebGIM/Style.css b/WebSites/WebGIM/Style.css index 87458cd..d520ba8 100644 --- a/WebSites/WebGIM/Style.css +++ b/WebSites/WebGIM/Style.css @@ -2,58 +2,65 @@ .fixedVal { - background-color:#cdcdcd; - text-align:center; - color:Black; + background-color: #cdcdcd; + text-align: center; + color: Black; } .fixedValLeft { - background-color:#cdcdcd; - text-align:left; - color:Black; + background-color: #cdcdcd; + text-align: left; + color: Black; } .textEv_1 { - background-color:#cdffcd; - text-align:center; - color:Black; + background-color: #cdffcd; + text-align: center; + color: Black; } .textEv_1Left { - background-color:#cdffcd; - text-align:left; - color:Black; + background-color: #cdffcd; + text-align: left; + color: Black; } .textEv_2 { - background-color:#99cc00; - text-align:center; - color:Black; + background-color: #99cc00; + text-align: center; + color: Black; } .textEv_2Left { - background-color:#99cc00; - text-align:left; - color:Black; + background-color: #99cc00; + text-align: left; + color: Black; } .textEv_Read { - background-color:#ccfefe; - text-align:center; - color:Black; + background-color: #ccfefe; + text-align: center; + color: Black; } .textEv_ReadLeft { - background-color:#ccfefe; - text-align:left; - color:Black; + background-color: #ccfefe; + text-align: left; + color: Black; +} + +.bloccoDiv +{ + border-bottom: solid 1px green; + padding-bottom: 1px; + margin-bottom: 5px; } .semaforoVerde @@ -459,7 +466,7 @@ } .barraTitolo { - background-color: #FF7A00;/* #4C90FF; */ + background-color: #FF7A00; /* #4C90FF; */ vertical-align: middle; height: 20pt; } @@ -485,8 +492,7 @@ INPUT .tableContenuto { padding: 0px; - margin: 2px; - /* con questo Table va a full screen */ + margin: 2px; /* con questo Table va a full screen */ width: 99%; } .topContrDx @@ -2816,8 +2822,7 @@ grViewBorder padding: 1px 1px 1px 1px; border-width: 2px; border-style: solid; - background-color: #AAB8C9; - /*background: #DEDEFF;*/ + background-color: #AAB8C9; /*background: #DEDEFF;*/ text-decoration: none; } .btnDisabled diff --git a/WebSites/WebGIM/mod_dataOra.ascx b/WebSites/WebGIM/mod_dataOra.ascx index 2b46a0f..49feebb 100644 --- a/WebSites/WebGIM/mod_dataOra.ascx +++ b/WebSites/WebGIM/mod_dataOra.ascx @@ -2,7 +2,7 @@ <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

- + @@ -10,17 +10,17 @@

- +

- +

- + diff --git a/WebSites/WebGIM/mod_dettMtzProg.ascx b/WebSites/WebGIM/mod_dettMtzProg.ascx index c579b6a..b8ea767 100644 --- a/WebSites/WebGIM/mod_dettMtzProg.ascx +++ b/WebSites/WebGIM/mod_dettMtzProg.ascx @@ -1,3 +1,102 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_dettMtzProg.ascx.cs" Inherits="mod_dettMtzProg" %> -dettaglio editabile
-dell'intervento programmato \ No newline at end of file +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_dettMtzProg.ascx.cs" + Inherits="mod_dettMtzProg" %> +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> + + + + + + + + + + + + + + +
+

+ +

+
+
+ + +
+
+ +
+
+
+
+
+ + + + + + +
+
+
+
+
+ + + + +
+
+
+ + + +
+
+
+
+ +
+
+
+ + + + +
+
+
+
+
+ + + + +
+
+
+ + +
+
+
+ + +
diff --git a/WebSites/WebGIM/mod_dettMtzProg.ascx.cs b/WebSites/WebGIM/mod_dettMtzProg.ascx.cs index fc5cad6..5aef33a 100644 --- a/WebSites/WebGIM/mod_dettMtzProg.ascx.cs +++ b/WebSites/WebGIM/mod_dettMtzProg.ascx.cs @@ -3,11 +3,78 @@ using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using SteamWare; public partial class mod_dettMtzProg : System.Web.UI.UserControl { + public event EventHandler eh_newInserted; + protected void Page_Load(object sender, EventArgs e) { + if (!Page.IsPostBack) + { + traduciObj(); + setupValori(); + } + } + private void setupValori() + { + txtDataInizio.Text = DateTime.Now.ToString("dd/MM/yy"); + txtCadenza.Text = "1"; + } + + private void traduciObj() + { + lblInsNewIntPro.Text = traduci("lblInsNewIntPro"); + lblDescrMtzPro.Text = traduci("lblDescrMtzPro"); + lblInizioMtzPro.Text = traduci("lblInizioMtzPro"); + lblPrior.Text = traduci("lblPrior"); + chkImpFermo.Text = traduci("chkImpFermo"); + lblTipoGuasto.Text = traduci("lblTipoGuasto"); + lblFreq.Text = traduci("lblFreq"); + lblCadenza.Text = traduci("lblCadenza"); + btnCreaMtzPro.Text = traduci("btnCreaMtzPro"); + lblMacchineInteressate.Text = traduci("lblMacchineInteressate"); + rfvCad.Text = traduci("cadIntReq"); + rfvDescrizione.Text = traduci("descrIntReq"); + rfvData.Text = traduci("dataReq"); + } + /// + /// wrap traduzione + /// + /// + /// + public string traduci(object lemma) + { + return user_std.UtSn.Traduci(lemma.ToString()); + } + protected void btnCreaMtzPro_Click(object sender, EventArgs e) + { + // spazzo TUTTE le righe del controllo... + foreach (ListItem riga in listMacchine.Items) + { + // se è selezionata creo riga anche x lei... + if (riga.Selected) + { + creaInterventoMtzPro(Convert.ToInt32(riga.Value)); + } + } + // resetto selezioni e controlli... + txtDescrizione.Text = ""; + txtCercaMacchine.Text = "*"; + listMacchine.SelectedIndex = -1; + if (eh_newInserted != null) + { + eh_newInserted(this, new EventArgs()); + } + } + /// + /// crea un intervento di mtz programmata x la macchina con idx passato + /// + /// + private void creaInterventoMtzPro(int idx) + { + TA_app.obj.taMtzPro.Insert(idx, Convert.ToDateTime(txtDataInizio.Text), ddlFreq.SelectedValue, Convert.ToInt32(txtCadenza.Text), txtDescrizione.Text.Trim(), Convert.ToInt32(ddlPrior.SelectedValue), chkImpFermo.Checked, Convert.ToInt32(ddlTipo.SelectedValue)); } } diff --git a/WebSites/WebGIM/mod_elencoMtzProg.ascx b/WebSites/WebGIM/mod_elencoMtzProg.ascx index a24697d..30b74aa 100644 --- a/WebSites/WebGIM/mod_elencoMtzProg.ascx +++ b/WebSites/WebGIM/mod_elencoMtzProg.ascx @@ -1,2 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_elencoMtzProg.ascx.cs" Inherits="mod_elencoMtzProg" %> -tabella elenco manutenzioni, con ricerca abilitata... \ No newline at end of file +
+ +
+
+tabella elenco manutenzioni, con ricerca abilitata...
diff --git a/WebSites/WebGIM/mod_elencoMtzProg.ascx.cs b/WebSites/WebGIM/mod_elencoMtzProg.ascx.cs index a5ba57d..1cffb88 100644 --- a/WebSites/WebGIM/mod_elencoMtzProg.ascx.cs +++ b/WebSites/WebGIM/mod_elencoMtzProg.ascx.cs @@ -3,11 +3,28 @@ using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using SteamWare; public partial class mod_elencoMtzProg : System.Web.UI.UserControl { + public event EventHandler eh_newReq; + protected void Page_Load(object sender, EventArgs e) { } + protected void btnNew_Click(object sender, EventArgs e) + { + if (eh_newReq != null) + { + eh_newReq(this, new EventArgs()); + } + } + /// + /// aggiorno il controllo + /// + public void doUpdate() + { + // + } } diff --git a/WebSites/WebGIM/mod_insertRichiesta.ascx b/WebSites/WebGIM/mod_insertRichiesta.ascx index 128bda6..41b5516 100644 --- a/WebSites/WebGIM/mod_insertRichiesta.ascx +++ b/WebSites/WebGIM/mod_insertRichiesta.ascx @@ -11,17 +11,17 @@

-

-

-
@@ -65,7 +65,7 @@

- @@ -89,7 +89,7 @@

-

-
- +
@@ -116,6 +116,8 @@
+
diff --git a/WebSites/WebGIM/mtzProg.aspx b/WebSites/WebGIM/mtzProg.aspx index 793ab80..311b4a1 100644 --- a/WebSites/WebGIM/mtzProg.aspx +++ b/WebSites/WebGIM/mtzProg.aspx @@ -3,15 +3,10 @@ <%@ Register Src="mod_elencoMtzProg.ascx" TagName="mod_elencoMtzProg" TagPrefix="uc1" %> <%@ Register Src="mod_dettMtzProg.ascx" TagName="mod_dettMtzProg" TagPrefix="uc2" %> +<%@ Register Src="mod_fixCal.ascx" TagName="mod_fixCal" TagPrefix="uc3" %> - - - - - -
- - - -
+ +
+ +
diff --git a/WebSites/WebGIM/mtzProg.aspx.cs b/WebSites/WebGIM/mtzProg.aspx.cs index 6deaefb..e25a314 100644 --- a/WebSites/WebGIM/mtzProg.aspx.cs +++ b/WebSites/WebGIM/mtzProg.aspx.cs @@ -8,6 +8,19 @@ public partial class mtzProg : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { + mod_elencoMtzProg1.eh_newReq += new EventHandler(mod_elencoMtzProg1_eh_newReq); + mod_dettMtzProg1.eh_newInserted += new EventHandler(mod_dettMtzProg1_eh_newInserted); + } + void mod_dettMtzProg1_eh_newInserted(object sender, EventArgs e) + { + // nascondo dettaglio inserimento nuovi e aggiorno tabella elenco... + mod_dettMtzProg1.Visible = false; + mod_elencoMtzProg1.doUpdate(); + } + + void mod_elencoMtzProg1_eh_newReq(object sender, EventArgs e) + { + mod_dettMtzProg1.Visible = true; } } diff --git a/WebSites/WebGIM/sql/GIM_0002.sql b/WebSites/WebGIM/sql/GIM_0002.sql index ff3b7b2..8605b6c 100644 --- a/WebSites/WebGIM/sql/GIM_0002.sql +++ b/WebSites/WebGIM/sql/GIM_0002.sql @@ -36,7 +36,7 @@ INSERT INTO dbo.AnagAmbitoGuasto VALUES (6, N'mancanza energia') INSERT INTO dbo.AnagAmbitoGuasto (idxAmbito, descrAmbitoGuasto) - VALUES (7, N'preventivo') + VALUES (7, N'Mtz programmata') INSERT INTO dbo.AnagAmbitoGuasto (idxAmbito, descrAmbitoGuasto) VALUES (8, N'errata programmazione')