refresh classi x comportamento selezione check19

This commit is contained in:
Samuele Locatelli
2021-11-12 12:14:22 +01:00
parent 6bdd34a228
commit 7f49276d57
4 changed files with 66 additions and 61 deletions
+13 -7
View File
@@ -50,16 +50,22 @@ namespace GPW_Commesse
/// <summary>
/// controllo stato licenze!
/// </summary>
public bool chkLicOk
{
get
{
return (licenzeGPW.checkLicenze);
}
}
public bool chkLicOk => doChkLicOk();
#endregion Public Properties
#region Private Methods
/// <summary>
/// controllo stato licenze!
/// </summary>
private bool doChkLicOk()
{
return (licenzeGPW.checkLicenze);
}
#endregion Private Methods
#region Protected Methods
/// <summary>
@@ -135,7 +135,7 @@
</HeaderTemplate>
<ItemTemplate>
<div class="text-center">
<asp:LinkButton runat="server" ID="lbShowTemp" CausesValidation="False" CommandName="Select" CommandArgument='<%# Eval("Data") %>' CssClass="btn btn-outline-secondary btn-sm" OnClick="lbShowTemp_Click" Visible='<%# gtZero(Eval("h_lav")) || gtZero(Eval("h_com")) %>' ToolTip="Dettaglio registrazione temperatura">
<asp:LinkButton runat="server" ID="lbShowTemp" CausesValidation="False" CommandName="Select" CommandArgument='<%# Eval("Data") %>' CssClass="btn btn-outline-secondary btn-sm" OnClick="lbShowTemp_Click" Visible='<%# gtZero(Eval("h_lav")) || gtZero(Eval("h_com")) || Eval("Check19").ToString() != "" %>' ToolTip="Dettaglio registrazione temperatura">
<i runat="server" visible='<%# !gtZero(Eval("tempRil")) %>' class="fa fa-thermometer-empty text-danger" aria-hidden="true"></i>
<i runat="server" visible='<%# gtZero(Eval("tempRil")) %>' class="fa fa-thermometer text-success" aria-hidden="true"></i>
<i runat="server" visible='<%# betweenVal(Eval("tempRil"),37.1, 37.5) %>' class="fa fa-exclamation-triangle text-warning" aria-hidden="true"></i>
@@ -152,7 +152,7 @@
</HeaderTemplate>
<ItemTemplate>
<div class="text-center">
<asp:LinkButton runat="server" ID="lbShowCheck" CausesValidation="False" CommandName="Select" CommandArgument='<%# Eval("Data") %>' CssClass="btn btn-outline-secondary btn-sm" OnClick="lbShowCheck_Click" Visible='<%# gtZero(Eval("h_lav")) || gtZero(Eval("h_com")) %>' ToolTip="Dettaglio scansione GreenPass">
<asp:LinkButton runat="server" ID="lbShowCheck" CausesValidation="False" CommandName="Select" CommandArgument='<%# Eval("Data") %>' CssClass="btn btn-outline-secondary btn-sm" OnClick="lbShowCheck_Click" Visible='<%# gtZero(Eval("h_lav")) || gtZero(Eval("h_com")) || Eval("Check19").ToString() != "" %>' ToolTip="Dettaglio scansione GreenPass">
<i runat="server" visible='<%# Eval("Check19").ToString() == "" %>' class="fa fa-certificate text-danger" aria-hidden="true"></i>
<i runat="server" visible='<%# Eval("Check19").ToString() != "" %>' class="fa fa-certificate text-success" aria-hidden="true"></i>
</asp:LinkButton>
@@ -42,6 +42,20 @@ namespace GPW_Commesse.WebUserControls
{
#region Protected Properties
protected bool checkVisible
{
get
{
bool answ = false;
bool.TryParse(hfShowCheck.Value, out answ);
return answ;
}
set
{
hfShowCheck.Value = $"{value}";
}
}
/// <summary>
/// Determina se visualizzare entrambe le schede...
/// </summary>
@@ -71,20 +85,6 @@ namespace GPW_Commesse.WebUserControls
}
}
protected bool checkVisible
{
get
{
bool answ = false;
bool.TryParse(hfShowCheck.Value, out answ);
return answ;
}
set
{
hfShowCheck.Value = $"{value}";
}
}
#endregion Protected Properties
#region Public Properties
@@ -160,6 +160,11 @@ namespace GPW_Commesse.WebUserControls
raiseEvent(ucEvType.Reset);
}
private void Cmp_dailyCheck_ehCancel(object sender, EventArgs e)
{
closeShowCheck();
}
private void cmp_rilTemp_ehCancel(object sender, EventArgs e)
{
closeEditTemp();
@@ -206,21 +211,6 @@ namespace GPW_Commesse.WebUserControls
raiseEvent(ucEvType.ReqUpdateParent);
}
private void showCheck(string dataRif)
{
CultureInfo ita = new CultureInfo("it-IT");
cmp_dailyCheck.dataFrom = Convert.ToDateTime(dataRif, ita).AddDays(-3);
cmp_dailyCheck.dataTo = Convert.ToDateTime(dataRif, ita);
//salvo in sessione dati x detail timbrature
memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente);
// imposto modalità
checkVisible = true;
activeMode = modoCommesse.showCheck;
showPanels();
raiseEvent(ucEvType.ReqUpdateParent);
}
private void editTimbr(string dataRif)
{
DateTime adesso = DateTime.Now;
@@ -271,6 +261,21 @@ namespace GPW_Commesse.WebUserControls
grView.DataBind();
}
private void showCheck(string dataRif)
{
CultureInfo ita = new CultureInfo("it-IT");
cmp_dailyCheck.dataFrom = Convert.ToDateTime(dataRif, ita).AddDays(-2);
cmp_dailyCheck.dataTo = Convert.ToDateTime(dataRif, ita).AddDays(1);
//salvo in sessione dati x detail timbrature
memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente);
// imposto modalità
checkVisible = true;
activeMode = modoCommesse.showCheck;
showPanels();
raiseEvent(ucEvType.ReqUpdateParent);
}
#endregion Private Methods
#region Protected Methods
@@ -288,22 +293,6 @@ namespace GPW_Commesse.WebUserControls
grView.DataBind();
}
/// <summary>
/// edit temperatura rilevata
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbShowTemp_Click(object sender, EventArgs e)
{
string dataRif = ((LinkButton)sender).CommandArgument;
activeMode = modoCommesse.editRilTemp;
// verifico se dip sia attivo...
if (DataProxy.currDipIsActive && DataProxy.currDipHasPayloadActive)
{
editTemp(dataRif);
}
}
/// <summary>
/// visualizzazione controlli C19
/// </summary>
@@ -320,6 +309,21 @@ namespace GPW_Commesse.WebUserControls
}
}
/// <summary>
/// edit temperatura rilevata
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbShowTemp_Click(object sender, EventArgs e)
{
string dataRif = ((LinkButton)sender).CommandArgument;
activeMode = modoCommesse.editRilTemp;
// verifico se dip sia attivo...
if (DataProxy.currDipIsActive && DataProxy.currDipHasPayloadActive)
{
editTemp(dataRif);
}
}
protected void lbtShowAll_Click(object sender, EventArgs e)
{
@@ -373,7 +377,7 @@ namespace GPW_Commesse.WebUserControls
{
activeMode = modoCommesse.elenco;
intervalloDate periodo = new intervalloDate();
periodo.fine = DateTime.Now.AddDays(1);
periodo.fine = DateTime.Today.AddDays(1);
periodo.inizio = periodo.fine.AddDays(memLayer.ML.confReadInt("defDayFrom"));
mod_periodoAnalisi1.intervalloAnalisi = periodo;
// salvo link in HF
@@ -417,11 +421,6 @@ namespace GPW_Commesse.WebUserControls
cmp_dailyCheck.ehCancel += Cmp_dailyCheck_ehCancel;
}
private void Cmp_dailyCheck_ehCancel(object sender, EventArgs e)
{
closeShowCheck();
}
protected void showCharts(bool doShow)
{
divRilTemp.Visible = doShow;
@@ -130,7 +130,7 @@ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
oraFine = Convert.ToInt32(ddlOraFine.SelectedValue);
}
_intervallo.inizio = Convert.ToDateTime(txtInizio.Text).AddHours(oraInizio);
_intervallo.fine = Convert.ToDateTime(txtFine.Text).AddHours(oraFine);
_intervallo.fine = Convert.ToDateTime(txtFine.Text).AddHours(oraFine).AddDays(1);
verificaCoerenzaDate();
int _durataMin;
_durataMin = Convert.ToInt32(txtDurataMin.Text);