diff --git a/.vs/WebSCR/v14/.suo b/.vs/WebSCR/v14/.suo index 44079c8..9bab353 100644 Binary files a/.vs/WebSCR/v14/.suo and b/.vs/WebSCR/v14/.suo differ diff --git a/WebSCR/Setup.aspx b/WebSCR/Setup.aspx index 429d4f6..73d89d7 100644 --- a/WebSCR/Setup.aspx +++ b/WebSCR/Setup.aspx @@ -5,6 +5,8 @@ <%@ Register Src="~/WebUserControls/mod_elencoTipoInt.ascx" TagPrefix="uc1" TagName="mod_elencoTipoInt" %> <%@ Register Src="~/WebUserControls/mod_elencoZone.ascx" TagPrefix="uc1" TagName="mod_elencoZone" %> <%@ Register Src="~/WebUserControls/mod_listValues.ascx" TagPrefix="uc1" TagName="mod_listValues" %> +<%@ Register Src="~/WebUserControls/mod_AssSquadra.ascx" TagPrefix="uc1" TagName="mod_AssSquadra" %> + @@ -18,12 +20,14 @@ + + diff --git a/WebSCR/Setup.aspx.cs b/WebSCR/Setup.aspx.cs index fb4862d..b856eb4 100644 --- a/WebSCR/Setup.aspx.cs +++ b/WebSCR/Setup.aspx.cs @@ -22,6 +22,7 @@ namespace WebSCR /// private void showDetail(string dettaglio) { + mod_AssSquadra.Visible = false; mod_elencoDisp.Visible = false; mod_elencoSquadre.Visible = false; mod_elencoTipoInt.Visible = false; @@ -34,6 +35,9 @@ namespace WebSCR mod_elencoDisp.Visible = true; mod_elencoDisp.selezionaAttive(); break; + case "compSquadre": + mod_AssSquadra.Visible = true; + break; case "squadre": mod_elencoSquadre.Visible = true; break; diff --git a/WebSCR/Setup.aspx.designer.cs b/WebSCR/Setup.aspx.designer.cs index ecdc6e3..b7f5475 100644 --- a/WebSCR/Setup.aspx.designer.cs +++ b/WebSCR/Setup.aspx.designer.cs @@ -57,6 +57,15 @@ namespace WebSCR { /// protected global::WebSCR.WebUserControls.mod_elencoSquadre mod_elencoSquadre; + /// + /// mod_AssSquadra control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebSCR.WebUserControls.mod_AssSquadra mod_AssSquadra; + /// /// mod_listValues control. /// diff --git a/WebSCR/Squadra.aspx.cs b/WebSCR/Squadra.aspx.cs index f6aaf45..51fd024 100644 --- a/WebSCR/Squadra.aspx.cs +++ b/WebSCR/Squadra.aspx.cs @@ -14,7 +14,15 @@ namespace WebSCR { fixVisibility(); mod_gestIntSquadra.eh_update += mod_gestIntSquadra_eh_update; + mod_selData.eh_update += Mod_selData_eh_update; } + + private void Mod_selData_eh_update(object sender, EventArgs e) + { + mod_consegne.DataBind(); + mod_consegne.doUpdate(); + } + /// /// update gest squadra sul campo /// diff --git a/WebSCR/WebUserControls/mod_AssSquadra.ascx b/WebSCR/WebUserControls/mod_AssSquadra.ascx index cfe63a7..5a9eea3 100644 --- a/WebSCR/WebUserControls/mod_AssSquadra.ascx +++ b/WebSCR/WebUserControls/mod_AssSquadra.ascx @@ -52,7 +52,8 @@ - + <%----%> + diff --git a/WebSCR/WebUserControls/mod_AssSquadra.ascx.cs b/WebSCR/WebUserControls/mod_AssSquadra.ascx.cs index 0c3c17d..2721ed3 100644 --- a/WebSCR/WebUserControls/mod_AssSquadra.ascx.cs +++ b/WebSCR/WebUserControls/mod_AssSquadra.ascx.cs @@ -1,4 +1,5 @@ -using System; +using SteamWare; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -12,7 +13,32 @@ namespace WebSCR.WebUserControls { protected void Page_Load(object sender, EventArgs e) { - + mod_selData.eh_update += Mod_selData_eh_update; + if (!Page.IsPostBack) + { + reloadSessionByCookie(); + } + } + /// + /// rilegge (eventualmente90 dati ins essione da cookie se non presenti + /// + private static void reloadSessionByCookie() + { + // se valore in session è nullo PROVO a leggerlo da cookie... + if (!memLayer.ML.isInSessionObject("DataRif")) + { + try + { + DateTime adesso = Convert.ToDateTime(memLayer.ML.getCookieVal("DataRif")); + memLayer.ML.setSessionVal("DataRif", adesso.ToString("yyyy-MM-dd"), true); + } + catch + { } + } + } + private void Mod_selData_eh_update(object sender, EventArgs e) + { + grView.DataBind(); } /// /// inserimento associazione user/squadra diff --git a/WebSCR/WebUserControls/mod_consegne.ascx b/WebSCR/WebUserControls/mod_consegne.ascx index 74386b3..2eb0c26 100644 --- a/WebSCR/WebUserControls/mod_consegne.ascx +++ b/WebSCR/WebUserControls/mod_consegne.ascx @@ -73,7 +73,8 @@ - + <%----%> + diff --git a/WebSCR/WebUserControls/mod_consegne.ascx.cs b/WebSCR/WebUserControls/mod_consegne.ascx.cs index 848c575..8aa9a42 100644 --- a/WebSCR/WebUserControls/mod_consegne.ascx.cs +++ b/WebSCR/WebUserControls/mod_consegne.ascx.cs @@ -13,9 +13,30 @@ namespace WebSCR.WebUserControls { protected void Page_Load(object sender, EventArgs e) { + if(!Page.IsPostBack) + { + reloadSessionByCookie(); + } + } + /// + /// rilegge (eventualmente90 dati ins essione da cookie se non presenti + /// + private static void reloadSessionByCookie() + { + // se valore in session è nullo PROVO a leggerlo da cookie... + if (!memLayer.ML.isInSessionObject("DataRif")) + { + try + { + DateTime adesso = Convert.ToDateTime(memLayer.ML.getCookieVal("DataRif")); + memLayer.ML.setSessionVal("DataRif", adesso.ToString("yyyy-MM-dd"), true); + } + catch + { } + } } - + /// /// verifica se valore passato è NON NULLO /// @@ -67,5 +88,13 @@ namespace WebSCR.WebUserControls // ricarico! Response.Redirect(string.Format("{0}?CodCliente={1}&Indir={2}&Data={3:yyyy-MM-dd}&IdxImpegno={4}", devicesAuthProxy.pagCorrente, riga.CodCliente, riga.Indir, riga.DataOra, IdxImpegno)); } + /// + /// forza update + /// + public void doUpdate() + { + DateTime adesso = Convert.ToDateTime(memLayer.ML.getCookieVal("DataRif")); + grView.DataBind(); + } } } \ No newline at end of file diff --git a/WebSCR/WebUserControls/mod_selData.ascx.cs b/WebSCR/WebUserControls/mod_selData.ascx.cs index 1b599c8..a15bf18 100644 --- a/WebSCR/WebUserControls/mod_selData.ascx.cs +++ b/WebSCR/WebUserControls/mod_selData.ascx.cs @@ -10,6 +10,21 @@ namespace WebSCR.WebUserControls { public partial class mod_selData : System.Web.UI.UserControl { + /// + /// selezionata NUOVA data + /// + public event EventHandler eh_update; + /// + /// solleva evento selezione data + /// + protected void reportEvent() + { + // evento! + if (eh_update != null) + { + eh_update(this, new EventArgs()); + } + } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) @@ -35,9 +50,10 @@ namespace WebSCR.WebUserControls } catch { } + // salvo in cookie e in sessione memLayer.ML.setCookieVal("DataRif", adesso.ToString("yyyy-MM-dd"), DateTime.Now.AddMinutes(memLayer.ML.confReadInt("minCookieSquadra"))); - // ricarico! - Response.Redirect(devicesAuthProxy.pagCorrente); + memLayer.ML.setSessionVal("DataRif", adesso.ToString("yyyy-MM-dd"),true); + reportEvent(); } public DateTime dateSel diff --git a/WebSCR/bin/SteamWare.dll b/WebSCR/bin/SteamWare.dll index a675e30..12a1c8b 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 24a88d8..2148aab 100644 Binary files a/WebSCR/bin/WebSCR.dll and b/WebSCR/bin/WebSCR.dll differ diff --git a/WebSCR/bin/WebSCR_data.dll b/WebSCR/bin/WebSCR_data.dll index 58a9090..5eda39a 100644 Binary files a/WebSCR/bin/WebSCR_data.dll and b/WebSCR/bin/WebSCR_data.dll differ diff --git a/WebSCR_data/bin/Debug/SteamWare.dll b/WebSCR_data/bin/Debug/SteamWare.dll index a675e30..12a1c8b 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 58a9090..5eda39a 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/WebSCR_data.csprojResolveAssemblyReference.cache b/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache index 61fd05a..872ac30 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 58a9090..5eda39a 100644 Binary files a/WebSCR_data/obj/Debug/WebSCR_data.dll and b/WebSCR_data/obj/Debug/WebSCR_data.dll differ