diff --git a/.vs/WebSCR/v14/.suo b/.vs/WebSCR/v14/.suo index 6fa401b..36dd91f 100644 Binary files a/.vs/WebSCR/v14/.suo and b/.vs/WebSCR/v14/.suo differ diff --git a/DataUploader/Web.config b/DataUploader/Web.config index 6ce6f6c..9c93831 100644 --- a/DataUploader/Web.config +++ b/DataUploader/Web.config @@ -8,7 +8,6 @@ - diff --git a/DataUploader/bin/DataUploader.dll.config b/DataUploader/bin/DataUploader.dll.config index 6ce6f6c..9c93831 100644 --- a/DataUploader/bin/DataUploader.dll.config +++ b/DataUploader/bin/DataUploader.dll.config @@ -8,7 +8,6 @@ - diff --git a/WebSCR/Web.config b/WebSCR/Web.config index 30697e4..2c5e43d 100644 --- a/WebSCR/Web.config +++ b/WebSCR/Web.config @@ -14,6 +14,7 @@ + diff --git a/WebSCR/WebUserControls/mod_giornata.ascx.cs b/WebSCR/WebUserControls/mod_giornata.ascx.cs index 5b8e781..54c792a 100644 --- a/WebSCR/WebUserControls/mod_giornata.ascx.cs +++ b/WebSCR/WebUserControls/mod_giornata.ascx.cs @@ -124,6 +124,7 @@ namespace WebSCR.WebUserControls /// protected void DayPilotCalendar1_TimeRangeSelected(object sender, DayPilot.Web.Ui.Events.TimeRangeSelectedEventArgs e) { +#if false // verifico di avere la squadra selezionata... if (memLayer.ML.StringSessionObj("elencoSquadre").Length > 0) { @@ -163,8 +164,10 @@ namespace WebSCR.WebUserControls { errMessGiorn = "Prego selezionare UNA squadra per procedere"; } - doUpdate(); + doUpdate(); +#endif } +#if false /// /// richiesta refresh COMPLETO della pagina /// @@ -178,7 +181,8 @@ namespace WebSCR.WebUserControls { memLayer.ML.setSessionVal("needRefresh", value); } - } + } +#endif public void doUpdate() { diff --git a/WebSCR/WebUserControls/mod_impegno.ascx.cs b/WebSCR/WebUserControls/mod_impegno.ascx.cs index 42ba16a..4ad0f0b 100644 --- a/WebSCR/WebUserControls/mod_impegno.ascx.cs +++ b/WebSCR/WebUserControls/mod_impegno.ascx.cs @@ -76,6 +76,7 @@ namespace WebSCR.WebUserControls protected void odsImpegni_Deleted(object sender, ObjectDataSourceStatusEventArgs e) { + memLayer.ML.setSessionVal("errorMess", "Record Eliminato"); Response.Redirect(SteamWare.devicesAuthProxy.pagCorrente); } } diff --git a/WebSCR/WebUserControls/mod_pianificazione.ascx.cs b/WebSCR/WebUserControls/mod_pianificazione.ascx.cs index 324c9ab..80c78d9 100644 --- a/WebSCR/WebUserControls/mod_pianificazione.ascx.cs +++ b/WebSCR/WebUserControls/mod_pianificazione.ascx.cs @@ -18,18 +18,18 @@ namespace WebSCR.WebUserControls /// protected void Page_Load(object sender, EventArgs e) { + // fix visibilità... fixVisibility(); if (!Page.IsPostBack) { + // se c'è imposto matricola... + txtMatrOp.Text = matrOp; + // fix filtri... mod_filtroZona.Zona = memLayer.ML.confReadString("zonaDef"); mod_filtroPeriodo.numGG = memLayer.ML.confReadInt("numGgDef"); // reimposto selezione squadre... mod_selSquadre.selezionaDaSession(); - // se c'è imposto matricola... - if (matrOp != "") - { - txtMatrOp.Text = matrOp; - } + // refresh refreshDetail(); } mod_filtroZona.eh_selIndir += mod_filtroZona_eh_selIndir; @@ -76,6 +76,9 @@ namespace WebSCR.WebUserControls /// private void fixVisibility() { + // imposto (se c'è) errore + lblWarning.Text = errorMess; + // imposto filtraggi zona... mod_dispPeriodo.Zona = mod_filtroZona.Zona; mod_filtroPeriodo.Visible = true; @@ -103,6 +106,8 @@ namespace WebSCR.WebUserControls } else if (qsVal("Action") == "EDIT") { + errorMess = "EDIT"; + lblWarning.Text = "EDIT"; // controllo if (qsVal("Data") != "") { @@ -128,28 +133,6 @@ namespace WebSCR.WebUserControls // mostro giornata mod_giornata.Visible = true; } - - -#if false - if (qsVal("Data") != "") - { - if (qsVal("IdxImpegno") != "") - { - // salvo parametri in sessione - saveSessParam(); - - mod_impegno.Visible = true; - mod_dettInt.Visible = true; - mod_fileImpegno.Visible = true; - mod_fileUpload.Visible = true; - mod_compSquadra.Visible = true; - } - else - { - mod_giornata.Visible = true; - } - } -#endif } /// @@ -195,6 +178,24 @@ namespace WebSCR.WebUserControls return answ; } } + public string errorMess + { + get + { + string answ = ""; + try + { + answ = memLayer.ML.StringSessionObj("errorMess"); + } + catch + { } + return answ; + } + set + { + memLayer.ML.setSessionVal("errorMess", value); + } + } public string currDoc { get @@ -214,7 +215,6 @@ namespace WebSCR.WebUserControls /// private void creaImpegno() { - string errMessGiorn = ""; if (codSquadra != "") { // verifico di avere MatrOP selezionata @@ -224,6 +224,7 @@ namespace WebSCR.WebUserControls if (currDoc != "") { DateTime inizio = DateTime.Now; + DateTime fine = inizio; DateTime adesso = inizio; try { @@ -231,50 +232,46 @@ namespace WebSCR.WebUserControls } catch { } + try + { + fine = Convert.ToDateTime(qsVal("end")); + } + catch + { } if (inizio != adesso) { - -#if false - // recupero OC se in sessione... - string doc = memLayer.ML.StringSessionObj("currDoc"); - // tolto doc default a zero... - //if (doc == "") doc = "OC00000000"; - // prendo la squadra selezionata - //string squadra = mod_selSquadre.selected[0].ToString(); - string squadra = memLayer.ML.StringSessionObj("elencoSquadre").Split(',')[0].ToString(); - // selezionato periodo, salvo evento inizio... - DtProxy.man.taImp.insertQuery(inizio, "INDIC", squadra, doc, yearSel); -#endif + int durataTot = Convert.ToInt32(fine.Subtract(inizio).TotalMinutes); // selezionato periodo, salvo evento inizio... - DtProxy.man.taImp.insertQuery(inizio, "INDIC", codSquadra, currDoc, yearSel); + DtProxy.man.taImp.insertQuery(inizio, durataTot, codSquadra, currDoc, yearSel, matrOp, DateTime.Now); // consumo il doc selezionato e quindi rimuovo da sessione... memLayer.ML.emptySessionVal("currDoc"); + // matricola operatore: eventualmente qui inserire condizioni scadenza avanzate... if (memLayer.ML.confReadBool("svuotaMatrOp")) { // rimuovo matrOp memLayer.ML.emptySessionVal("matrOp"); } + errorMess = "..."; } else { - errMessGiorn = "Prego indicare inizio attività per procedere"; + errorMess= "Prego indicare inizio attività per procedere"; } } else { - errMessGiorn = "Prego indicare documento OC/DC per procedere"; + errorMess = "Prego indicare documento OC/DC per procedere"; } } else { - errMessGiorn = "Prego indicare Matricola Operatore per procedere"; + errorMess = "Prego indicare Matricola Operatore per procedere"; } } else { - errMessGiorn = "Prego selezionare UNA squadra per procedere"; + errorMess = "Prego selezionare UNA squadra per procedere"; } - lblWarning.Text = errMessGiorn; } /// @@ -323,18 +320,7 @@ namespace WebSCR.WebUserControls memLayer.ML.setSessionVal("CodSquadra", CodSquadra); memLayer.ML.setSessionVal("DataImp", DataImp); } - - /// - /// anno selezionato - /// - public string errMessGiorn - { - get - { - return memLayer.ML.StringSessionObj("errMessGiorn"); - - } - } + /// /// nuovo record impegno... @@ -352,6 +338,8 @@ namespace WebSCR.WebUserControls /// void mod_filtroZona_eh_selIndir(object sender, EventArgs e) { + errorMess = "Selezionato Documento"; + lblWarning.Text = errorMess; refreshDetail(); mod_giornata.doUpdate(); } @@ -433,6 +421,8 @@ namespace WebSCR.WebUserControls if (txtMatrOp.Text.Trim() != "") { memLayer.ML.setSessionVal("matrOp", txtMatrOp.Text.Trim()); + errorMess = "Selezionato Operatore"; + lblWarning.Text = errorMess; mod_giornata.doUpdate(); } else diff --git a/WebSCR/WebUserControls/mod_selSquadre.ascx.cs b/WebSCR/WebUserControls/mod_selSquadre.ascx.cs index 36d5683..ca3860b 100644 --- a/WebSCR/WebUserControls/mod_selSquadre.ascx.cs +++ b/WebSCR/WebUserControls/mod_selSquadre.ascx.cs @@ -69,6 +69,8 @@ namespace WebSCR.WebUserControls } elencoSquadre = string.Join(",", selected); memLayer.ML.setSessionVal("elencoSquadre", elencoSquadre); + memLayer.ML.setSessionVal("errorMess", "Sel.Squadra"); + } } diff --git a/WebSCR/bin/SteamWare.dll b/WebSCR/bin/SteamWare.dll index 1c149cd..f817d50 100644 Binary files a/WebSCR/bin/SteamWare.dll and b/WebSCR/bin/SteamWare.dll differ diff --git a/WebSCR/bin/WebSCR.dll b/WebSCR/bin/WebSCR.dll index 696d4fa..df47e76 100644 Binary files a/WebSCR/bin/WebSCR.dll and b/WebSCR/bin/WebSCR.dll differ diff --git a/WebSCR/bin/WebSCR.dll.config b/WebSCR/bin/WebSCR.dll.config index 30697e4..2c5e43d 100644 --- a/WebSCR/bin/WebSCR.dll.config +++ b/WebSCR/bin/WebSCR.dll.config @@ -14,6 +14,7 @@ + diff --git a/WebSCR/bin/WebSCR_data.dll b/WebSCR/bin/WebSCR_data.dll index 3021b4f..e7294d0 100644 Binary files a/WebSCR/bin/WebSCR_data.dll and b/WebSCR/bin/WebSCR_data.dll differ diff --git a/WebSCR_data/DS_Applicazione.Designer.cs b/WebSCR_data/DS_Applicazione.Designer.cs index 56c01c4..b799872 100644 --- a/WebSCR_data/DS_Applicazione.Designer.cs +++ b/WebSCR_data/DS_Applicazione.Designer.cs @@ -12573,10 +12573,12 @@ SELECT CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Loca this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[6].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, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataOra", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TipoOrario", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MinTotCons", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSquadra", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RifOC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@anno", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MatrOp", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LastMod", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[7].Connection = this.Connection; this._commandCollection[7].CommandText = "dbo.stp_Imp_recFineInt"; @@ -12783,7 +12785,7 @@ SELECT CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Loca [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int insertQuery(global::System.Nullable DataOra, string TipoOrario, string CodSquadra, string RifOC, global::System.Nullable anno) { + public virtual int insertQuery(global::System.Nullable DataOra, global::System.Nullable MinTotCons, string CodSquadra, string RifOC, global::System.Nullable anno, string MatrOp, global::System.Nullable LastMod) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; if ((DataOra.HasValue == true)) { command.Parameters[1].Value = ((System.DateTime)(DataOra.Value)); @@ -12791,11 +12793,11 @@ SELECT CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Loca else { command.Parameters[1].Value = global::System.DBNull.Value; } - if ((TipoOrario == null)) { - command.Parameters[2].Value = global::System.DBNull.Value; + if ((MinTotCons.HasValue == true)) { + command.Parameters[2].Value = ((int)(MinTotCons.Value)); } else { - command.Parameters[2].Value = ((string)(TipoOrario)); + command.Parameters[2].Value = global::System.DBNull.Value; } if ((CodSquadra == null)) { command.Parameters[3].Value = global::System.DBNull.Value; @@ -12815,6 +12817,18 @@ SELECT CodCliente, RagSoc, CodFis, Tel, Cell, EnableSMS, Email, Indir, Cap, Loca else { command.Parameters[5].Value = global::System.DBNull.Value; } + if ((MatrOp == null)) { + command.Parameters[6].Value = global::System.DBNull.Value; + } + else { + command.Parameters[6].Value = ((string)(MatrOp)); + } + if ((LastMod.HasValue == true)) { + command.Parameters[7].Value = ((System.DateTime)(LastMod.Value)); + } + else { + command.Parameters[7].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)) { diff --git a/WebSCR_data/DS_Applicazione.xsd b/WebSCR_data/DS_Applicazione.xsd index 8661f3c..c435efc 100644 --- a/WebSCR_data/DS_Applicazione.xsd +++ b/WebSCR_data/DS_Applicazione.xsd @@ -668,10 +668,12 @@ FROM v_elencoImpegni - + + + @@ -1301,7 +1303,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1333,7 +1335,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1369,7 +1371,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1394,7 +1396,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1478,7 +1480,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1640,7 +1642,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1650,7 +1652,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1666,7 +1668,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1696,7 +1698,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1713,7 +1715,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1748,7 +1750,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1803,7 +1805,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1949,7 +1951,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -1978,7 +1980,7 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - + @@ -2074,9 +2076,9 @@ SELECT Matr, Cognome, Nome, CognomeNome FROM Dipendenti WHERE (Matr = @Matr) - - - + + + \ No newline at end of file diff --git a/WebSCR_data/DS_Applicazione.xss b/WebSCR_data/DS_Applicazione.xss index bce809d..6130362 100644 --- a/WebSCR_data/DS_Applicazione.xss +++ b/WebSCR_data/DS_Applicazione.xss @@ -4,22 +4,22 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - + - - + + @@ -34,7 +34,7 @@ - + 707 @@ -46,7 +46,7 @@ - + 422 diff --git a/WebSCR_data/bin/Debug/SteamWare.dll b/WebSCR_data/bin/Debug/SteamWare.dll index 1c149cd..f817d50 100644 Binary files a/WebSCR_data/bin/Debug/SteamWare.dll and b/WebSCR_data/bin/Debug/SteamWare.dll differ diff --git a/WebSCR_data/bin/Debug/WebSCR_data.dll b/WebSCR_data/bin/Debug/WebSCR_data.dll index 3021b4f..e7294d0 100644 Binary files a/WebSCR_data/bin/Debug/WebSCR_data.dll and b/WebSCR_data/bin/Debug/WebSCR_data.dll differ diff --git a/WebSCR_data/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/WebSCR_data/obj/Debug/DesignTimeResolveAssemblyReferences.cache index a5546dc..5b93bad 100644 Binary files a/WebSCR_data/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/WebSCR_data/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/WebSCR_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll b/WebSCR_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll index 1611553..b35fe25 100644 Binary files a/WebSCR_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll and b/WebSCR_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll differ diff --git a/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache b/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache index 9c3b4d8..a581d7f 100644 Binary files a/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache and b/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache differ diff --git a/WebSCR_data/obj/Debug/WebSCR_data.dll b/WebSCR_data/obj/Debug/WebSCR_data.dll index 3021b4f..e7294d0 100644 Binary files a/WebSCR_data/obj/Debug/WebSCR_data.dll and b/WebSCR_data/obj/Debug/WebSCR_data.dll differ