diff --git a/GPW_Admin/WebUserControls/mod_approvaTimbr.ascx.cs b/GPW_Admin/WebUserControls/mod_approvaTimbr.ascx.cs
index 28dffd3..47a4d9a 100644
--- a/GPW_Admin/WebUserControls/mod_approvaTimbr.ascx.cs
+++ b/GPW_Admin/WebUserControls/mod_approvaTimbr.ascx.cs
@@ -11,176 +11,182 @@ using System.Data;
namespace GPW_Admin.WebUserControls
{
- public partial class mod_approvaTimbr : System.Web.UI.UserControl
+ public partial class mod_approvaTimbr : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
{
- protected void Page_Load(object sender, EventArgs e)
- {
- grView.PageSize = utils.pageSize;
- if (!Page.IsPostBack)
- {
- filtroDip.ods = odsDip;
- filtroDip.reset();
- }
- filtroDip.eh_selValore += new EventHandler(filtroDip_eh_selValore);
- }
- ///
- /// seleziono
- ///
- ///
- ///
- void filtroDip_eh_selValore(object sender, EventArgs e)
- {
- // imposto ods
- checkFixOds();
- }
- ///
- /// imposto ODS
- ///
- private void checkFixOds()
- {
- if (filtroDip.valoreInt != -1)
- {
- IdxDipSel = filtroDip.valoreInt;
- ods.SelectMethod = "getNonApprByDip";
- }
- else
- {
- //memLayer.ML.emptySessionVal("idxDip_sel");
- IdxDipSel = -1;
- ods.SelectMethod = "getNonAppr";
- }
- grView.DataBind();
- }
- ///
- /// calcola cognome-nome da idx
- ///
- ///
- ///
- public string cognomeNome(object idxDip)
- {
- string answ = "";
- try
- {
- DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(Convert.ToInt32(idxDip))[0];
- answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome);
- }
- catch
- { }
- return answ;
- }
- ///
- /// verifica se l'utente possa approvare la modifica oraria
- ///
- public bool userCanApprove
- {
- get
- {
- bool answ = false;
- try
- {
- answ = user_std.UtSn.userHasRight("GPW_admin");
- }
- catch
- { }
- return answ;
- }
- }
- ///
- /// idx dipendente loggato
- ///
- protected int IdxDipSel
- {
- get
- {
- int idx = -1;
- try
- {
- idx = memLayer.ML.IntSessionObj("idxDip_sel");
- }
- catch
- { }
- return idx;
- }
- set
- {
- memLayer.ML.setSessionVal("idxDip_sel", value);
- }
- }
- ///
- /// inverte valore booleano
- ///
- ///
- ///
- public bool invBool(object valore)
- {
- bool answ = true;
- try
- {
- answ = !Convert.ToBoolean(valore);
- }
- catch
- { }
- return answ;
- }
- ///
- /// wrapper x salvare approvazioni
- ///
- ///
- ///
- protected void grView_SelectedIndexChanged(object sender, EventArgs e)
- {
- // salvo approvazione
- DateTime dataOra = DateTime.Now;
- int idxDip = 0;
- try
- {
- dataOra = Convert.ToDateTime(grView.SelectedDataKey["dataOra"].ToString());
- idxDip = Convert.ToInt32(grView.SelectedDataKey["idxDipendente"].ToString());
- logger.lg.scriviLog(string.Format("Approvazione per dip {0} in data/ora {1}", idxDip, dataOra), tipoLog.INFO);
- // recupero tab timbr non approvate x dip
- DS_Applicazione.TimbratureRow rigaTimb = DataProxy.DP.taTimb.getByDipDataOra(idxDip, dataOra)[0];
- // effettua arrotondamento (aggiunge/toglie)
- int minOrig = dataOra.Minute;
- int secOrig = dataOra.Second;
- int minArr = 0;
- int step = Convert.ToInt32(txtArrot.Text);
- if (rigaTimb.entrata)
- {
-
- minArr = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(minOrig / step))) * step;
- }
- else
- {
- minArr = Convert.ToInt32(Math.Floor(Convert.ToDouble(minOrig / step))) * step;
- }
- // modifico data del record
- DataProxy.DP.taTimb.stp_Timbr_modifica(idxDip, dataOra, dataOra.AddMinutes(minArr - minOrig).AddSeconds(-secOrig));
- // approvo con data modificata
- DataProxy.DP.taTimb.stp_Timbr_Approva(idxDip, dataOra.AddMinutes(minArr - minOrig).AddSeconds(-secOrig));
- }
- catch
- { }
- // update!
- grView.SelectedIndex = -1;
- checkFixOds();
- }
- ///
- /// post update resetto filtro...
- ///
- ///
- ///
- protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
- {
- checkFixOds();
- }
- ///
- /// post delete resetto filtro...
- ///
- ///
- ///
- protected void ods_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
- {
- checkFixOds();
- }
+ grView.PageSize = utils.pageSize;
+ if (!Page.IsPostBack)
+ {
+ filtroDip.ods = odsDip;
+ filtroDip.reset();
+ }
+ filtroDip.eh_selValore += new EventHandler(filtroDip_eh_selValore);
}
+ ///
+ /// seleziono
+ ///
+ ///
+ ///
+ void filtroDip_eh_selValore(object sender, EventArgs e)
+ {
+ // imposto ods
+ checkFixOds();
+ }
+ ///
+ /// imposto ODS
+ ///
+ private void checkFixOds()
+ {
+ if (filtroDip.valoreInt != -1)
+ {
+ IdxDipSel = filtroDip.valoreInt;
+ ods.SelectMethod = "getNonApprByDip";
+ }
+ else
+ {
+ //memLayer.ML.emptySessionVal("idxDip_sel");
+ IdxDipSel = -1;
+ ods.SelectMethod = "getNonAppr";
+ }
+ grView.DataBind();
+ }
+ ///
+ /// calcola cognome-nome da idx
+ ///
+ ///
+ ///
+ public string cognomeNome(object idxDip)
+ {
+ string answ = "";
+ try
+ {
+ DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(Convert.ToInt32(idxDip))[0];
+ answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// verifica se l'utente possa approvare la modifica oraria
+ ///
+ public bool userCanApprove
+ {
+ get
+ {
+ bool answ = false;
+ try
+ {
+ answ = user_std.UtSn.userHasRight("GPW_admin");
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// idx dipendente loggato
+ ///
+ protected int IdxDipSel
+ {
+ get
+ {
+ int idx = -1;
+ try
+ {
+ idx = memLayer.ML.IntSessionObj("idxDip_sel");
+ }
+ catch
+ { }
+ return idx;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("idxDip_sel", value);
+ }
+ }
+ ///
+ /// inverte valore booleano
+ ///
+ ///
+ ///
+ public bool invBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = !Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// wrapper x salvare approvazioni
+ ///
+ ///
+ ///
+ protected void grView_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // salvo approvazione
+ DateTime dataOra = DateTime.Now;
+ int idxDip = 0;
+ try
+ {
+ dataOra = Convert.ToDateTime(grView.SelectedDataKey["dataOra"].ToString());
+ idxDip = Convert.ToInt32(grView.SelectedDataKey["idxDipendente"].ToString());
+ logger.lg.scriviLog(string.Format("Approvazione per dip {0} in data/ora {1}", idxDip, dataOra), tipoLog.INFO);
+ // recupero tab timbr non approvate x dip
+ DS_Applicazione.TimbratureRow rigaTimb = DataProxy.DP.taTimb.getByDipDataOra(idxDip, dataOra)[0];
+ // effettua arrotondamento (aggiunge/toglie)
+ int minOrig = dataOra.Minute;
+ int secOrig = dataOra.Second;
+ int minArr = 0;
+ int step = Convert.ToInt32(txtArrot.Text);
+ if (rigaTimb.entrata)
+ {
+
+ minArr = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(minOrig / step))) * step;
+ }
+ else
+ {
+ minArr = Convert.ToInt32(Math.Floor(Convert.ToDouble(minOrig / step))) * step;
+ }
+ // modifico data del record
+ DataProxy.DP.taTimb.stp_Timbr_modifica(idxDip, dataOra, dataOra.AddMinutes(minArr - minOrig).AddSeconds(-secOrig));
+ // approvo con data modificata
+ DataProxy.DP.taTimb.stp_Timbr_Approva(idxDip, dataOra.AddMinutes(minArr - minOrig).AddSeconds(-secOrig));
+ }
+ catch
+ { }
+ // update!
+ grView.SelectedIndex = -1;
+ checkFixOds();
+ }
+ ///
+ /// post update resetto filtro...
+ ///
+ ///
+ ///
+ protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
+ {
+ checkFixOds();
+ }
+ ///
+ /// post delete resetto filtro...
+ ///
+ ///
+ ///
+ protected void ods_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
+ {
+ checkFixOds();
+ }
+
+ protected void grView_PageIndexChanged(object sender, EventArgs e)
+ {
+ // imposto ods
+ checkFixOds();
+ }
+ }
}
\ No newline at end of file
diff --git a/GPW_Admin/WebUserControls/mod_approvaTimbr.ascx.designer.cs b/GPW_Admin/WebUserControls/mod_approvaTimbr.ascx.designer.cs
index da29cfb..ed685b9 100644
--- a/GPW_Admin/WebUserControls/mod_approvaTimbr.ascx.designer.cs
+++ b/GPW_Admin/WebUserControls/mod_approvaTimbr.ascx.designer.cs
@@ -1,60 +1,62 @@
//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
+//
+// Codice generato da uno strumento.
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
//------------------------------------------------------------------------------
-namespace GPW_Admin.WebUserControls {
-
-
- public partial class mod_approvaTimbr {
-
- ///
- /// filtroDip control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::mod_filtro filtroDip;
-
- ///
- /// odsDip control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.ObjectDataSource odsDip;
-
- ///
- /// txtArrot control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.TextBox txtArrot;
-
- ///
- /// grView control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.GridView grView;
-
- ///
- /// ods control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.ObjectDataSource ods;
- }
+namespace GPW_Admin.WebUserControls
+{
+
+
+ public partial class mod_approvaTimbr
+ {
+
+ ///
+ /// Controllo filtroDip.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::mod_filtro filtroDip;
+
+ ///
+ /// Controllo odsDip.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsDip;
+
+ ///
+ /// Controllo txtArrot.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtArrot;
+
+ ///
+ /// Controllo grView.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.GridView grView;
+
+ ///
+ /// Controllo ods.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource ods;
+ }
}
diff --git a/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx b/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx
index 5aa1233..6db1a1c 100644
--- a/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx
+++ b/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx
@@ -43,7 +43,7 @@
-
+
@@ -65,7 +65,7 @@
-
+
diff --git a/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx.designer.cs b/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx.designer.cs
index aa80bd8..a5c9c11 100644
--- a/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx.designer.cs
+++ b/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx.designer.cs
@@ -1,33 +1,35 @@
//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
+//
+// Codice generato da uno strumento.
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
//------------------------------------------------------------------------------
-namespace GPW_Admin.WebUserControls {
-
-
- public partial class mod_elencoTimbr {
-
- ///
- /// grView control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.GridView grView;
-
- ///
- /// ods control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.ObjectDataSource ods;
- }
+namespace GPW_Admin.WebUserControls
+{
+
+
+ public partial class mod_elencoTimbr
+ {
+
+ ///
+ /// Controllo grView.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.GridView grView;
+
+ ///
+ /// Controllo ods.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource ods;
+ }
}
diff --git a/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx b/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx
index c75777c..535a294 100644
--- a/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx
+++ b/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx
@@ -13,7 +13,7 @@
diff --git a/GPW_Admin/WebUserControls/mod_timbrMensili.ascx.designer.cs b/GPW_Admin/WebUserControls/mod_timbrMensili.ascx.designer.cs
index 97be968..cc52dad 100644
--- a/GPW_Admin/WebUserControls/mod_timbrMensili.ascx.designer.cs
+++ b/GPW_Admin/WebUserControls/mod_timbrMensili.ascx.designer.cs
@@ -1,87 +1,89 @@
//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
+//
+// Codice generato da uno strumento.
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
//------------------------------------------------------------------------------
-namespace GPW_Admin.WebUserControls {
-
-
- public partial class mod_timbrMensili {
-
- ///
- /// filtroDip control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::mod_filtro filtroDip;
-
- ///
- /// odsDip control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.ObjectDataSource odsDip;
-
- ///
- /// mod_periodoAnalisi1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::mod_periodoAnalisi mod_periodoAnalisi1;
-
- ///
- /// txtMinRedExtra control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.TextBox txtMinRedExtra;
-
- ///
- /// rblComp control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.RadioButtonList rblComp;
-
- ///
- /// grView control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.GridView grView;
-
- ///
- /// ods control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.ObjectDataSource ods;
-
- ///
- /// lblNumRec control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Label lblNumRec;
- }
+namespace GPW_Admin.WebUserControls
+{
+
+
+ public partial class mod_timbrMensili
+ {
+
+ ///
+ /// Controllo filtroDip.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::mod_filtro filtroDip;
+
+ ///
+ /// Controllo odsDip.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsDip;
+
+ ///
+ /// Controllo mod_periodoAnalisi1.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::mod_periodoAnalisi mod_periodoAnalisi1;
+
+ ///
+ /// Controllo txtMinRedExtra.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtMinRedExtra;
+
+ ///
+ /// Controllo rblComp.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.RadioButtonList rblComp;
+
+ ///
+ /// Controllo grView.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.GridView grView;
+
+ ///
+ /// Controllo ods.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource ods;
+
+ ///
+ /// Controllo lblNumRec.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumRec;
+ }
}
diff --git a/GPW_Commesse/WebUserControls/mod_commUtMancTimbr.ascx b/GPW_Commesse/WebUserControls/mod_commUtMancTimbr.ascx
index 5351d50..4c2fd63 100644
--- a/GPW_Commesse/WebUserControls/mod_commUtMancTimbr.ascx
+++ b/GPW_Commesse/WebUserControls/mod_commUtMancTimbr.ascx
@@ -86,7 +86,7 @@