Fix parametri timbrature

This commit is contained in:
Samuele E. Locatelli
2019-10-03 18:38:02 +02:00
parent 44c0514e5f
commit 70fb774033
10 changed files with 256 additions and 55 deletions
+3 -1
View File
@@ -43,6 +43,7 @@ namespace GPW_Smart
}
}
#if false
public bool showSettings { get; set; }
public bool showLeftPnl { get; set; }
@@ -63,6 +64,7 @@ namespace GPW_Smart
if (!showLeftPnl) answ = "hidden";
return answ;
}
}
}
#endif
}
}
+1 -9
View File
@@ -12,11 +12,8 @@ namespace GPW_Smart
{
utils.mng.dailyDuties();
}
((Site)Master).showSettings = true;
((Site)Master).showLeftPnl = true;
mod_opzioniSx.ev_reqAbilitaAll += Mod_opzioniSx_ev_reqAbilitaAll;
mod_opzioniSx.ev_reqUpdate += Mod_opzioniSx_ev_reqUpdate;
mod_mancTimb.ev_reqUpdate += Mod_mancTimb_ev_reqUpdate;
mod_mancTimb.ev_reqUpdate += Mod_mancTimb_ev_reqUpdate;
}
private void Mod_mancTimb_ev_reqUpdate(object sender, EventArgs e)
{
@@ -33,10 +30,5 @@ namespace GPW_Smart
mod_timbrature.doUpdate();
}
private void Mod_opzioniSx_ev_reqAbilitaAll(object sender, EventArgs e)
{
mod_timbrature.abilitaAll();
mod_timbrature.doUpdate();
}
}
}
-22
View File
@@ -13,28 +13,6 @@ namespace GPW_Smart
((Site)this.Master).showSearch = false;
utils.mng.dailyDuties();
}
((Site)Master).showSettings = true;
((Site)Master).showLeftPnl = true;
}
private void Mod_mancTimb_ev_reqUpdate(object sender, EventArgs e)
{
mod_timbrature.doUpdate();
}
/// <summary>
/// update visualizzazione timbrature
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Mod_opzioniSx_ev_reqUpdate(object sender, EventArgs e)
{
mod_timbrature.doUpdate();
}
private void Mod_opzioniSx_ev_reqAbilitaAll(object sender, EventArgs e)
{
mod_timbrature.abilitaAll();
mod_timbrature.doUpdate();
}
}
}
+1
View File
@@ -54,6 +54,7 @@
<add key="EnableCdnJQ" value="false" />
<!--Gestione forzatura priam timbratura ad entrata-->
<add key="firstIsIN" value="true" />
<add key="ttlAbilitaAll" value="10" />
<!--Gestione notifiche anomalie-->
<add key="adminAnomalieEmail" value="samuele@steamware.net" />
<add key="adminContinuatoEmail" value="samuele@steamware.net" />
+2 -2
View File
@@ -18,12 +18,12 @@
</div>
<div class="row py-2">
<div class="col">
<div class="col mb-5">
<div class="card">
<div class="card-header">
<b>INFORMAZIONI installazione</b>
</div>
<div class="card-body pt-1 pb-5">
<div class="card-body pt-1 pb-0">
<div class="row pt-0 pb-2">
<div class="col-3"></div>
<div class="col-6 text-center">
+61
View File
@@ -1 +1,62 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmq_params.ascx.cs" Inherits="GPW_Smart.WebUserControls.cmq_params" %>
<div class="row bg-abstract py-3">
<div class="col-1 text-light">
<div><i class="fa fa-user" aria-hidden="true"></i></div>
<div><i class="fa fa-envelope" aria-hidden="true"></i></div>
<div><i class="fa fa-location-arrow" aria-hidden="true"></i></div>
</div>
<div class="col-8 text-light">
<div class="text-uppercase font-weight-bold"><%: cognomeNome %></div>
<div class='subline'><%: email %></div>
<div class='subline'><%: IP %></div>
</div>
<div class="col-3 text-center">
<img class="rounded-circle" src="https://www.gravatar.com/avatar/<%: hashEmail %>?d=mm" />
</div>
</div>
<div class="row py-2">
<div class="col mb-5">
<div class="card">
<div class="card-header">
<b>Opzioni VISUALIZZAZIONE</b>
</div>
<div class="card-body py-1">
<div class="row">
<div class="col">
<asp:CheckBox runat="server" ID="chkAbilitaAll" Text="Abilita ALL (IN+ OUT)" CssClass="btn btn-outline-warning btn-block" AutoPostBack="true" OnCheckedChanged="chkAbilitaAll_CheckedChanged" />
</div>
</div>
<div class="row">
<div class="col">
<div>
<label>Numero Colonne Entrata/Uscita</label>
<asp:DropDownList runat="server" ID="ddlNumCol" AutoPostBack="True" OnSelectedIndexChanged="ddlNumCol_SelectedIndexChanged">
<asp:ListItem Value="2"></asp:ListItem>
<asp:ListItem Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
<div>
<label>Numero Righe</label>
<asp:DropDownList runat="server" ID="ddlNumRow" AutoPostBack="True" OnSelectedIndexChanged="ddlNumRow_SelectedIndexChanged">
<asp:ListItem Value="10"></asp:ListItem>
<asp:ListItem Value="15"></asp:ListItem>
<asp:ListItem Value="20"></asp:ListItem>
<asp:ListItem Value="25"></asp:ListItem>
<asp:ListItem Value="30"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
<div class="row">
<div class="col">
<asp:LinkButton runat="server" ID="lbtSalva" Visible="false" CssClass="btn btn-block btn-success" OnClick="lbtSalva_Click"><i class="fa fa-floppy-o" aria-hidden="true"></i> Salva</asp:LinkButton>
</div>
</div>
</div>
</div>
</div>
</div>
+107 -7
View File
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using System;
namespace GPW_Smart.WebUserControls
{
@@ -11,7 +7,111 @@ namespace GPW_Smart.WebUserControls
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
try
{
ddlNumCol.SelectedValue = numColEU.ToString();
ddlNumRow.SelectedValue = numRowTimb.ToString();
chkAbilitaAll.Checked = abilitaAll;
}
catch
{ }
}
}
public string hashEmail
{
get
{
return memLayer.ML.StringSessionObj("hashEmail");
}
}
public string email
{
get
{
return memLayer.ML.StringSessionObj("email");
}
}
public string cognomeNome
{
get
{
return memLayer.ML.StringSessionObj("cognomeNome");
}
}
public string IP
{
get
{
return Request.UserHostName;
}
}
public int numColEU
{
get
{
return memLayer.ML.IntSessionObj("numColEU");
}
set
{
memLayer.ML.setSessionVal("numColEU", value);
}
}
public int numRowTimb
{
get
{
return memLayer.ML.IntSessionObj("numRowTimb");
}
set
{
memLayer.ML.setSessionVal("numRowTimb", value);
}
}
public bool abilitaAll
{
get
{
bool answ = false;
try
{
string rawData = memLayer.ML.getRSV("abilitaAll");
bool.TryParse(rawData, out answ);
}
catch
{ }
return answ;
}
set
{
int ttlSec = value ? memLayer.ML.CRI("ttlAbilitaAll") : 0;
memLayer.ML.setRSV("abilitaAll", value.ToString(), ttlSec);
}
}
protected void ddlNumRow_SelectedIndexChanged(object sender, EventArgs e)
{
lbtSalva.Visible = true;
}
protected void ddlNumCol_SelectedIndexChanged(object sender, EventArgs e)
{
lbtSalva.Visible = true;
}
protected void chkAbilitaAll_CheckedChanged(object sender, EventArgs e)
{
lbtSalva.Visible = true;
}
protected void lbtSalva_Click(object sender, EventArgs e)
{
numRowTimb = Convert.ToInt32(ddlNumRow.SelectedValue);
numColEU = Convert.ToInt32(ddlNumCol.SelectedValue);
abilitaAll = chkAbilitaAll.Checked;
Response.Redirect("Timbrature");
}
}
}
+44 -10
View File
@@ -1,17 +1,51 @@
//------------------------------------------------------------------------------
// <auto-generated>
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </auto-generated>
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace GPW_Smart.WebUserControls
{
public partial class cmq_params
{
}
namespace GPW_Smart.WebUserControls {
public partial class cmq_params {
/// <summary>
/// Controllo chkAbilitaAll.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkAbilitaAll;
/// <summary>
/// Controllo ddlNumCol.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlNumCol;
/// <summary>
/// Controllo ddlNumRow.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlNumRow;
/// <summary>
/// Controllo lbtSalva.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtSalva;
}
}
@@ -8,7 +8,37 @@ namespace GPW.WebUserControls
{
public partial class mod_timbrature : System.Web.UI.UserControl
{
protected bool forceButtons = true;
protected bool forceButtons
{
get
{
return !abilitaAll;
}
set
{
abilitaAll = !(value);
}
}
public bool abilitaAll
{
get
{
bool answ = false;
try
{
string rawData = memLayer.ML.getRSV("abilitaAll");
bool.TryParse(rawData, out answ);
}
catch
{ }
return answ;
}
set
{
int ttlSec = value ? memLayer.ML.CRI("ttlAbilitaAll") : 0;
memLayer.ML.setRSV("abilitaAll", value.ToString(), ttlSec);
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
@@ -52,7 +82,7 @@ namespace GPW.WebUserControls
}
}
/// <summary>
/// imposto highlight di un area intorno al button
/// fix buttons button
/// </summary>
private void setButtons()
{
@@ -115,13 +145,15 @@ namespace GPW.WebUserControls
bool isEntrata = false;
registraTimbratura(isEntrata);
}
#if false
/// <summary>
/// Abilita tutti i buttons
/// </summary>
public void abilitaAll()
{
forceButtons = false;
}
}
#endif
/// <summary>
/// Aggiorno visualizzazione
/// </summary>
@@ -158,6 +190,7 @@ namespace GPW.WebUserControls
}
timbratrice.registraTimbratura(IdxDipendente, DateTime.Now, isEntrata, IPv4, "Web", approvata);
lblWarning.Visible = false;
abilitaAll = false;
//aggiorno timbrature visualizzate
setButtons();
updateTimbrature();
Vendored
+1 -1
View File
@@ -14,7 +14,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=4070']) {
withEnv(['NEXT_BUILD_NUMBER=4071']) {
// env.versionNumber = VersionNumber(versionNumberString : '2.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '2.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'GPW'