aggiunta selezione squadre on the field

This commit is contained in:
Samuele E. Locatelli
2015-05-12 12:33:09 +02:00
parent 4765b5f234
commit c55448f526
52 changed files with 513 additions and 98 deletions
+53 -5
View File
@@ -12,16 +12,16 @@ namespace WebSCR.WebUserControls
public partial class mod_header : SteamWare.UserControl
{
/// <summary>
/// codice Impegno selezionato
/// Data selezionata
/// </summary>
public string ImpegnoSel
public string DataSel
{
get
{
string answ = "-";
if (memLayer.ML.isInSessionObject("Impegno"))
if (memLayer.ML.getCookieVal("Data") != "")
{
answ = memLayer.ML.StringSessionObj("Impegno");
answ = memLayer.ML.getCookieVal("Data");
}
return answ;
}
@@ -41,7 +41,37 @@ namespace WebSCR.WebUserControls
return answ;
}
}
/// <summary>
/// Squadra selezionata (da cookie)
/// </summary>
public string SquadraSel
{
get
{
string answ = "-";
if (memLayer.ML.getCookieVal("SquadraCurr")!="")
{
answ = memLayer.ML.getCookieVal("SquadraCurr");
}
return answ;
}
}
/// <summary>
/// Squadra selezionata (da cookie)
/// </summary>
public string colorSquadraCurr
{
get
{
string answ = "-";
if (memLayer.ML.hasCookieVal("colorSquadraCurr"))
{
answ = memLayer.ML.getCookieVal("colorSquadraCurr");
}
return answ;
}
}
/// <summary>
/// caricamento pagina
/// </summary>
@@ -92,6 +122,14 @@ namespace WebSCR.WebUserControls
Response.Redirect("UserAdmin");
}
}
bool showSel = true;
// controllo se c'è il cookie
if (memLayer.ML.hasCookieVal("colorSquadraCurr"))
{
// se c'è e non è expired
showSel = false;
}
lbtResetSquadra.Visible = !showSel;
}
/// <summary>
/// verifica che la pagina sia tra quelle autorizzate x l'utente
@@ -206,5 +244,15 @@ namespace WebSCR.WebUserControls
memLayer.ML.setCookieVal(memLayer.ML.confReadString("AuthCookieName"), "");
memLayer.ML.emptyCookieVal(memLayer.ML.confReadString("AuthCookieName"));
}
/// <summary>
/// in caso di richiesta reset elimina cookie delal squadra selezionata
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtResetSquadra_Click(object sender, EventArgs e)
{
memLayer.ML.emptyCookieVal("colorSquadraCurr");
Response.Redirect(devicesAuthProxy.pagCorrente);
}
}
}