+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+ --%>
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_commAttivita.ascx.cs b/GPW/WebUserControls/mod_commAttivita.ascx.cs
new file mode 100644
index 0000000..0c6bd2b
--- /dev/null
+++ b/GPW/WebUserControls/mod_commAttivita.ascx.cs
@@ -0,0 +1,197 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_commAttivita : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ setupPage();
+ }
+ }
+ ///
+ /// pagina di return a fine editing
+ ///
+ public string returnPage
+ {
+ get
+ {
+ string answ = memLayer.ML.confReadString("baseUrl");
+ try
+ {
+ answ = memLayer.ML.StringSessionObj("returnPage");
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("returnPage", value);
+ }
+ }
+
+ ///
+ /// data riferimento (selezionata) da session
+ ///
+ public DateTime dataRif
+ {
+ get
+ {
+ DateTime answ = DateTime.Now;
+ try
+ {
+ answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("dataRif", value);
+ }
+ }
+ ///
+ /// imposta la pagina
+ ///
+ private void setupPage()
+ {
+ // salvo dataFrom/To x visualizzazione attivita
+ lblDataRif.Text = dataRif.ToString("dd.MM.yy");
+ // recupero dati della commessa utente giornaliera...
+ try
+ {
+ int maxErrMinus = memLayer.ML.confReadInt("maxErrMinus");
+ int maxErrPlus = memLayer.ML.confReadInt("maxErrPlus");
+ DS_Applicazione.v_logCommUtRow rigaLog = DataProxy.DP.taLCU.getByIdxDipDate(memLayer.ML.IntSessionObj("idxDipendente"), dataRif, dataRif.AddDays(1), maxErrMinus, maxErrPlus)[0];
+ lblTotOreRA.Text = string.Format("{0:0.##} h / {1:0.##} h", rigaLog.h_com, rigaLog.h_lav);
+ }
+ catch
+ {
+ lblTotOreRA.Text = "...";
+ }
+ memLayer.ML.setSessionVal("dataFromRA", dataRif.Date);
+ memLayer.ML.setSessionVal("dataToRA", dataRif.AddDays(1).Date);
+ }
+ ///
+ /// recupera cliente da idxFase
+ ///
+ ///
+ ///
+ public string cliByIdxFase(object _idxFase)
+ {
+ string answ = "";
+ try
+ {
+ int idxFase = Convert.ToInt32(_idxFase);
+ DS_Applicazione.AnagFasiRow fase = DataProxy.DP.taAF.getByIdx(idxFase)[0];
+ int idxPrj = Convert.ToInt32(fase.idxProgetto);
+ DS_Applicazione.AnagProgettiRow progetto = DataProxy.DP.taAP.getByIdxPrj(idxPrj)[0];
+ answ = DataProxy.DP.taAnCli.getByIdx(progetto.idxCliente)[0].RagSociale;
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// recupera progetto da idxFase
+ ///
+ ///
+ ///
+ public string prjByIdxFase(object _idxFase)
+ {
+ string answ = "";
+ try
+ {
+ int idxFase = Convert.ToInt32(_idxFase);
+ DS_Applicazione.AnagFasiRow fase = DataProxy.DP.taAF.getByIdx(idxFase)[0];
+ int idxPrj = Convert.ToInt32(fase.idxProgetto);
+ DS_Applicazione.AnagProgettiRow progetto = DataProxy.DP.taAP.getByIdxPrj(idxPrj)[0];
+ answ = progetto.nomeProj;
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// recupera descrizione e nome fase da idxFase
+ ///
+ ///
+ ///
+ public string faseByIdx(object _idxFase)
+ {
+ string answ = "";
+ try
+ {
+ int idxFase = Convert.ToInt32(_idxFase);
+ DS_Applicazione.AnagFasiRow fase = DataProxy.DP.taAF.getByIdx(idxFase)[0];
+ answ = string.Format("{0}
({1})", fase.nomeFase, fase.descrizioneFase);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// rimanda ad edit
+ ///
+ ///
+ ///
+ protected void lnkEdit_Click(object sender, EventArgs e)
+ {
+ // salvo
+ LinkButton lbtn = (LinkButton)sender;
+ memLayer.ML.setSessionVal("idxRASel", lbtn.CommandArgument);
+ // redirect!
+ Response.Redirect("attivitaIns.aspx");
+ }
+ ///
+ /// rimanda ad edit
+ ///
+ ///
+ ///
+ protected void lnkClona_Click(object sender, EventArgs e)
+ {
+ // salvo
+ LinkButton lbtn = (LinkButton)sender;
+ int idxRa=0;
+ try
+ {
+ idxRa = Convert.ToInt32(lbtn.CommandArgument);
+ }
+ catch
+ { }
+ // chiamo clona!
+ DataProxy.DP.taRA.clonaRecord(idxRa);
+ //update!
+ setupPage();
+ repRegAtt.DataBind();
+ }
+ protected void lnkCreateNew_Click(object sender, EventArgs e)
+ {
+ memLayer.ML.emptySessionVal("idxRASel");
+ // redirect!
+ Response.Redirect("attivitaIns.aspx");
+ }
+ ///
+ /// aggiorno data selezionata!
+ ///
+ ///
+ ///
+ protected void calDataRif_SelectionChanged(object sender, EventArgs e)
+ {
+ dataRif = calDataRif.SelectedDate;
+ setupPage();
+ repRegAtt.DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_commAttivita.ascx.designer.cs b/GPW/WebUserControls/mod_commAttivita.ascx.designer.cs
new file mode 100644
index 0000000..018af3b
--- /dev/null
+++ b/GPW/WebUserControls/mod_commAttivita.ascx.designer.cs
@@ -0,0 +1,78 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_commAttivita {
+
+ ///
+ /// popupBasic control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel popupBasic;
+
+ ///
+ /// calDataRif control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Calendar calDataRif;
+
+ ///
+ /// lblDataRif control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDataRif;
+
+ ///
+ /// lnkCreateNew control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lnkCreateNew;
+
+ ///
+ /// lblTotOreRA control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTotOreRA;
+
+ ///
+ /// repRegAtt control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater repRegAtt;
+
+ ///
+ /// odsRegAtt control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsRegAtt;
+ }
+}
diff --git a/GPW/WebUserControls/mod_commAttivitaDesk.ascx b/GPW/WebUserControls/mod_commAttivitaDesk.ascx
new file mode 100644
index 0000000..6deaf6e
--- /dev/null
+++ b/GPW/WebUserControls/mod_commAttivitaDesk.ascx
@@ -0,0 +1,225 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_commAttivitaDesk.ascx.cs" Inherits="GPW.WebUserControls.mod_commAttivitaDesk" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<%@ Register Src="mod_dateTime.ascx" TagName="mod_dateTime" TagPrefix="uc1" %>
+<%@ Register Src="mod_autocomplete.ascx" TagPrefix="uc2" TagName="mod_autocomplete" %>
+
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nessun record COMMESSA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+
--%>
+
+
+
descrizione:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_commAttivitaDesk.ascx.cs b/GPW/WebUserControls/mod_commAttivitaDesk.ascx.cs
new file mode 100644
index 0000000..37af218
--- /dev/null
+++ b/GPW/WebUserControls/mod_commAttivitaDesk.ascx.cs
@@ -0,0 +1,635 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+using System.Data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_commAttivitaDesk : System.Web.UI.UserControl
+ {
+
+ #region area protected / private
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ refreshControlli();
+ pnlHeader.Visible = enableFull;
+ lblTitle.Text = string.Format("{0:dddd dd/MM/yyyy}", valoreDateTime);
+ }
+ }
+ ///
+ /// minuti selezionati nel controllo radio in testa
+ ///
+ protected int minutiSel
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj("stdMinDurata");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("stdMinDurata", value);
+ }
+ }
+ ///
+ /// refresh dei controlli
+ ///
+ private void refreshControlli()
+ {
+ bool doDataBound = true;
+ switch (stato)
+ {
+ case statoControllo.edit:
+ doDataBound = true;
+ //grView.ShowFooter = false;
+ //grView.SelectedIndex = grView.EditIndex;
+ //int idxRASel = Convert.ToInt32(grView.SelectedDataKey["idxRA"]);
+ //// pre-seleziono idx progetto x ods fase...
+ //idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
+ //idxProjSel = idxPrjByFase(idxFaseSel);
+ break;
+ case statoControllo.insert:
+ grView.ShowFooter = true;
+ grView.DataBind();
+ // imposto arrotondato ad ora...
+ DateTime inizio = valoreDateTime.Date.AddHours(DateTime.Now.Hour);
+ // imposto durate standard!
+ int minuti = minutiSel;
+ if (minuti < 0)
+ {
+ minuti = 60;
+ }
+ // cerco ultimo valore inserito odierno (se c'è)
+ try
+ {
+ DS_Applicazione.RegAttivitaDataTable tabRA = DataProxy.DP.taRA.getByDipData(idxDipCurr, inizio.Date, inizio.Date.AddDays(1));
+ inizio = tabRA[tabRA.Rows.Count - 1].fine;
+ }
+ catch
+ {
+ }
+#if false
+ // provo a leggere valore editato (se c'è...)
+ try
+ {
+ DateTime inizioSel = ((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime;
+ if (inizioSel != inizio && inizio != valoreDateTime.Date.AddHours(DateTime.Now.Hour)) inizio = inizioSel;
+ }
+ catch
+ {
+ }
+#endif
+ // cerco di impostare inizio/fine
+ try
+ {
+ ((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime = inizio;
+ ((mod_dateTime)grView.FooterRow.FindControl("dtFine")).valoreDateTime = inizio.AddMinutes(minuti);
+ }
+ catch
+ { }
+ doDataBound = false;
+ break;
+ case statoControllo.item:
+ grView.ShowFooter = false;
+ // cerco di impostare inizio/fine
+ if (grView.EditIndex >= 0)
+ {
+ if (minutiSel > 0)
+ {
+ try
+ {
+ //salvo valori selezionati
+ string descrizione = ((TextBox)grView.Rows[grView.EditIndex].FindControl("txtDescrizione")).Text;
+ DateTime inizioEdit = ((mod_dateTime)grView.Rows[grView.EditIndex].FindControl("dtInizio")).valoreDateTime;
+ grView.DataBind();
+ // reimposto! con durata calcolata
+ ((mod_dateTime)grView.Rows[grView.EditIndex].FindControl("dtInizio")).valoreDateTime = inizioEdit;
+ ((mod_dateTime)grView.Rows[grView.EditIndex].FindControl("dtFine")).valoreDateTime = inizioEdit.AddMinutes(minutiSel);
+ ((TextBox)grView.Rows[grView.EditIndex].FindControl("txtDescrizione")).Text = descrizione;
+ // DISATTIVO COLLEGAMENTO A DATI...
+ doDataBound = false;
+ }
+ catch
+ { }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ if (doDataBound)
+ {
+ grView.DataBind();
+ }
+ }
+ ///
+ /// salvo in session che il prox comando è clonare...
+ ///
+ ///
+ ///
+ protected void imgClona_Click(object sender, ImageClickEventArgs e)
+ {
+ ImageButton lbtn = (ImageButton)sender;
+ int idxRa = 0;
+ try
+ {
+ idxRa = Convert.ToInt32(lbtn.CommandArgument);
+ }
+ catch
+ { }
+ // chiamo clona!
+ DataProxy.DP.taRA.clonaRecord(idxRa);
+ updateControl();
+ }
+ ///
+ /// fa update del controllo e chiama evento update esterno
+ ///
+ private void updateControl()
+ {
+ grView.SelectedIndex = -1;
+ refreshControlli();
+ // sollevo evento nuovo valore...
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// completato insert! aggiorno!
+ ///
+ ///
+ ///
+ protected void odsRA_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
+ {
+ stato = statoControllo.item;
+ refreshControlli();
+ }
+ ///
+ /// effettuato update
+ ///
+ ///
+ ///
+ protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
+ {
+ updateControl();
+ }
+ ///
+ /// riga eliminata
+ ///
+ ///
+ ///
+ protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
+ {
+ updateControl();
+ }
+ ///
+ /// recupera i dati di un nuovo record contenuti nel footer di un gridView;
+ /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
+ ///
+ ///
+ ///
+ protected void doInsert()
+ {
+ //recupero la riga footer...
+ int idxDip = DataProxy.idxDipendente;
+ int idxFase = 0;
+ DateTime inizio = DateTime.Now;
+ DateTime fine = DateTime.Now;
+ string descr = "";
+ try
+ {
+ idxFase = Convert.ToInt32(((DropDownList)grView.FooterRow.FindControl("ddlFase")).SelectedValue);
+ inizio = ((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime;
+ fine = ((mod_dateTime)grView.FooterRow.FindControl("dtFine")).valoreDateTime;
+ descr = ((TextBox)grView.FooterRow.FindControl("txtDescrizione")).Text;
+ }
+ catch
+ { }
+ DataProxy.DP.taRA.Insert(idxDip, idxFase, inizio, fine, descr, 0);
+ }
+ ///
+ /// riga in edit
+ ///
+ ///
+ ///
+ protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
+ {
+ grView.SelectedIndex = e.NewEditIndex;
+ int idxRASel = Convert.ToInt32(grView.SelectedDataKey["idxRA"]);
+ // salvo in sessione valori selezionati
+ idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
+ idxProjSel = idxPrjByFase(idxFaseSel);
+ }
+ ///
+ /// riga popolata
+ ///
+ ///
+ ///
+ protected void grView_RowDataBound(object sender, GridViewRowEventArgs e)
+ {
+ // controllo la riga
+ GridViewRow riga = e.Row;
+ if (grView.EditIndex >= 0 || grView.ShowFooter)
+ {
+ try
+ {
+ //pre-seleziono idx progetto x ods fase...
+ DropDownList ddlProj_int = (DropDownList)riga.FindControl("ddlProgetto");
+ if (idxProjSel >= 0 && (ddlProj_int != null))
+ {
+ ddlProj_int.SelectedValue = idxProjSel.ToString();
+ }
+ DropDownList ddlFase_int = (DropDownList)riga.FindControl("ddlFase");
+ if (idxFaseSel >= 0 && (ddlFase_int != null))
+ {
+ ddlFase_int.SelectedValue = idxFaseSel.ToString();
+ }
+ }
+ catch
+ { }
+ }
+ }
+ ///
+ /// intercetto update!
+ ///
+ ///
+ ///
+ protected void odsRA_Updating(object sender, ObjectDataSourceMethodEventArgs e)
+ {
+ DropDownList ddlfase_int = (DropDownList)grView.Rows[grView.EditIndex].FindControl("ddlFase");
+ e.InputParameters["idxFase"] = ddlfase_int.SelectedValue;
+ }
+ ///
+ /// aggiorno ods fasi...
+ ///
+ ///
+ ///
+ protected void ddlProgetto_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // salvo in session idxProjSel!
+ DropDownList ddlProj_int = (DropDownList)sender;
+ idxProjSel = Convert.ToInt32(ddlProj_int.SelectedValue);
+ // ricarico dati fasi
+ odsFase.DataBind();
+ // se in insert salvo orari e testo...
+ DateTime inizio = DateTime.Now;
+ DateTime fine = DateTime.Now;
+ string descr = "";
+ if (stato == statoControllo.insert)
+ {
+ inizio = ((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime;
+ fine = ((mod_dateTime)grView.FooterRow.FindControl("dtFine")).valoreDateTime;
+ descr = ((TextBox)grView.FooterRow.FindControl("txtDescrizione")).Text;
+ }
+ else
+ {
+ // se è edit...
+ int idx = grView.EditIndex;
+ inizio = ((mod_dateTime)grView.Rows[idx].FindControl("dtInizio")).valoreDateTime;
+ fine = ((mod_dateTime)grView.Rows[idx].FindControl("dtFine")).valoreDateTime;
+ descr = ((TextBox)grView.Rows[idx].FindControl("txtDescrizione")).Text;
+ }
+ refreshControlli();
+ // se in insert riporto orari e testo...
+ if (stato == statoControllo.insert)
+ {
+ ((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime = inizio;
+ ((mod_dateTime)grView.FooterRow.FindControl("dtFine")).valoreDateTime = fine;
+ ((TextBox)grView.FooterRow.FindControl("txtDescrizione")).Text = descr;
+ try
+ {
+ DropDownList ddlFase_int = (DropDownList)grView.FooterRow.FindControl("ddlFase");
+ ddlFase_int.SelectedIndex = 1;
+ }
+ catch
+ { }
+ }
+ else
+ {
+ // se è edit...
+ int idx = grView.EditIndex;
+ ((mod_dateTime)grView.Rows[idx].FindControl("dtInizio")).valoreDateTime = inizio;
+ ((mod_dateTime)grView.Rows[idx].FindControl("dtFine")).valoreDateTime = fine;
+ ((TextBox)grView.Rows[idx].FindControl("txtDescrizione")).Text = descr;
+ try
+ {
+ DropDownList ddlFase_int = (DropDownList)grView.Rows[idx].FindControl("ddlFase");
+ ddlFase_int.SelectedIndex = 1;
+ }
+ catch
+ { }
+ }
+ }
+ ///
+ /// progetto selezionato
+ ///
+ protected int idxProjSel
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj("idxProjSel");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("idxProjSel", value);
+ }
+ }
+ ///
+ /// fase selezionata
+ ///
+ protected int idxFaseSel
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj("idxFaseSel");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("idxFaseSel", value);
+ }
+ }
+ ///
+ /// generico comando riga
+ ///
+ ///
+ ///
+ protected void grView_RowCommand(object sender, GridViewCommandEventArgs e)
+ {
+ switch (e.CommandName)
+ {
+ case "Cancel":
+ stato = statoControllo.item;
+ updateControl();
+ break;
+ case "Insert":
+ doInsert();
+ stato = statoControllo.item;
+ updateControl();
+ break;
+ default:
+ break;
+ }
+ }
+
+ #endregion
+
+ #region area public
+
+ ///
+ /// idxDipendente selezionato (0=tutti)
+ ///
+ public int idxDipCurr
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj("idxDipCurr");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("idxDipCurr", value);
+ }
+ }
+ ///
+ /// progetto selezionato..
+ ///
+ public string idxProgetto
+ {
+ get
+ {
+ return idxProjSel.ToString();
+ }
+ }
+ ///
+ /// abilitato editing + nuovo + delete + clona
+ ///
+ public bool enableFull
+ {
+ get
+ {
+ bool answ = false;
+ try
+ {
+ answ = memLayer.ML.BoolSessionObj("enableEditComm");
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("enableEditComm", value);
+ }
+ }
+ ///
+ /// stato attuale del controllo
+ ///
+ public statoControllo stato
+ {
+ get
+ {
+ statoControllo answ = statoControllo.item;
+ try
+ {
+ answ = (statoControllo)memLayer.ML.objSessionObj("statoControlloRA");
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("statoControlloRA", value);
+ }
+ }
+ ///
+ /// valore datetime selezionato!
+ ///
+ public DateTime valoreDateTime
+ {
+ get
+ {
+ DateTime answ = DateTime.Now;
+ try
+ {
+ answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("dataRif", value);
+ lblTitle.Text = string.Format("{0:dddd dd/MM/yyyy}", value);
+ }
+ }
+ ///
+ /// evento update valori
+ ///
+ public event EventHandler eh_nuovoValore;
+ ///
+ /// effettua traduzione del lemma
+ ///
+ ///
+ ///
+ public string traduci(string lemma)
+ {
+ return user_std.UtSn.Traduci(lemma);
+ }
+ ///
+ /// aggiorna
+ ///
+ public void doUpdate()
+ {
+ refreshControlli();
+ }
+
+ ///
+ /// calcola idxProgetto da idxFase
+ ///
+ ///
+ ///
+ public int idxPrjByFase(object idxFase)
+ {
+ int answ = 0;
+ try
+ {
+ answ = DataProxy.DP.taAF.getByIdx(Convert.ToInt32(idxFase))[0].idxProgetto;
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// sistemo eventuali "headers"
+ ///
+ ///
+ ///
+ protected void ddlFase_DataBound(object sender, EventArgs e)
+ {
+ // cerco eventuali controlli tipo "ancestor" e li disattivo!
+ DropDownList ddlFase_int = (DropDownList)sender;
+ ListItem li = new ListItem();
+ while (li != null)
+ {
+ li = ddlFase_int.Items.FindByValue("0");
+ try
+ {
+ li.Attributes.Add("style", "color:gray;");
+ li.Attributes.Add("disabled", "true");
+ li.Value = "-1";
+ li.Text = string.Format("[ {0} ]", li.Text);
+ }
+ catch
+ { }
+ }
+ try
+ {
+ ddlFase_int.SelectedIndex = 1;
+ }
+ catch
+ { }
+ }
+ ///
+ /// richiesta creazioen nuovo record
+ ///
+ ///
+ ///
+ protected void btnNew_Click(object sender, EventArgs e)
+ {
+ if (grView.Rows.Count > 0)
+ {
+ // controllo: se ho righe mostro il footer...
+ stato = statoControllo.insert;
+ refreshControlli();
+ }
+ else
+ {
+ // default: inizia ora la dichiarazione
+ double oraStart = DateTime.Now.Hour;
+ int durataMinuti = memLayer.ML.IntSessionObj("stdMinDurata");
+ // se c'è timbratura ingresso prendo quella come ora inizio...
+ try
+ {
+ DS_Applicazione.TimbratureRow riga = DataProxy.DP.taTimb.getByIdxDipPeriodo(DataProxy.idxDipendente, valoreDateTime, valoreDateTime.AddDays(1))[0];
+ oraStart = Convert.ToDouble(riga.dataOra.Hour + riga.dataOra.Minute / 60);
+ }
+ catch
+ { }
+ // altrimenti duplico ultima entry utente..
+ DataProxy.DP.taRA.clonaLastRA_Utente(DataProxy.idxDipendente, valoreDateTime.AddHours(oraStart), durataMinuti);
+ updateControl();
+ }
+ }
+
+ ///
+ /// esegue ricerca progetto/fase x sovrascrivere
+ ///
+ ///
+ ///
+ protected void txtSearchFase_TextChanged(object sender, EventArgs e)
+ {
+
+ // recupero testo...
+ string search = "";
+ try
+ {
+ search = ((TextBox)sender).Text.Trim();
+ }
+ catch
+ { }
+ if (search != "")
+ {
+ // faccio ricerca x progetto e fase...
+ GPW_data.DS_Utility.stp_VSProjFasi_searchDataTable tabRes = DataProxy.DP.taVSProjFasiSearch.GetData(search);
+ if (tabRes.Rows.Count > 0)
+ {
+ idxFaseSel = tabRes[0].idxFase;
+ idxProjSel = tabRes[0].idxProgetto;
+ }
+ }
+ //stato = statoControllo.edit;
+ //refreshControlli();
+ //stato = statoControllo.item;
+ //minutiSel = -1;
+ refreshControlli();
+ }
+
+
+ ///
+ /// formatta la durata in ore secondo web.config (centesimale/ore:min)
+ ///
+ ///
+ ///
+ public string formatDurata(object oreCent)
+ {
+ decimal ore = 0;
+ try
+ {
+ ore = Convert.ToDecimal(oreCent);
+ }
+ catch
+ { }
+ string answ = "";
+ if (memLayer.ML.confReadBool("reviewShowOreMin"))
+ {
+ answ = utils.formOreMin(ore);
+ }
+ else
+ {
+ answ = ore.ToString("0.00");
+ }
+ return answ;
+ }
+
+ #endregion
+
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_commAttivitaDesk.ascx.designer.cs b/GPW/WebUserControls/mod_commAttivitaDesk.ascx.designer.cs
new file mode 100644
index 0000000..51cd4c2
--- /dev/null
+++ b/GPW/WebUserControls/mod_commAttivitaDesk.ascx.designer.cs
@@ -0,0 +1,87 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_commAttivitaDesk {
+
+ ///
+ /// pnlAll control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlAll;
+
+ ///
+ /// pnlHeader control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlHeader;
+
+ ///
+ /// lblTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTitle;
+
+ ///
+ /// imgBtnNew control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ImageButton imgBtnNew;
+
+ ///
+ /// 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;
+
+ ///
+ /// odsRA control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsRA;
+
+ ///
+ /// odsProgetto control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsProgetto;
+
+ ///
+ /// odsFase control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsFase;
+ }
+}
diff --git a/GPW/WebUserControls/mod_commUtLog.ascx b/GPW/WebUserControls/mod_commUtLog.ascx
new file mode 100644
index 0000000..f671645
--- /dev/null
+++ b/GPW/WebUserControls/mod_commUtLog.ascx
@@ -0,0 +1,178 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_commUtLog.ascx.cs" Inherits="GPW.WebUserControls.mod_commUtLog" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<%@ Register Src="mod_menuTopFull.ascx" TagName="mod_menuTopFull" TagPrefix="uc1" %>
+<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
+<%@ Register Src="mod_commAttivitaDesk.ascx" TagName="mod_commAttivitaDesk" TagPrefix="uc3" %>
+<%@ Register Src="mod_commUtMancTimbr.ascx" TagName="mod_commUtMancTimbr" TagPrefix="uc4" %>
+<%@ Register Src="mod_elencoTimbr.ascx" TagName="mod_elencoTimbr" TagPrefix="uc5" %>
+<%@ Register Src="mod_TagCloudProgetti.ascx" TagName="mod_TagCloudProgetti" TagPrefix="uc6" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+
+ Tag Cloud ultimi progetti
+
+ aaa
+
+
+ Task Aperti
+
+
--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No record
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+ --%>
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_commUtLog.ascx.cs b/GPW/WebUserControls/mod_commUtLog.ascx.cs
new file mode 100644
index 0000000..e808819
--- /dev/null
+++ b/GPW/WebUserControls/mod_commUtLog.ascx.cs
@@ -0,0 +1,397 @@
+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.Globalization;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ ///
+ /// modalità ammesse per il controllo
+ ///
+ public enum modoCommesse
+ {
+ ///
+ /// elenco giornate e resoconto
+ ///
+ elenco,
+ ///
+ /// edit timbrature attivo
+ ///
+ editTimb,
+ ///
+ /// edit Registro Attività attivo
+ ///
+ editRegAtt
+ }
+ public partial class mod_commUtLog : System.Web.UI.UserControl
+ {
+ public modoCommesse activeMode
+ {
+ get
+ {
+ modoCommesse answ = modoCommesse.elenco;
+ try
+ {
+ answ = (modoCommesse)memLayer.ML.objSessionObj("activeModeComm");
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("activeModeComm", value);
+ }
+ }
+ ///
+ /// Avvio pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ memLayer.ML.setSessionVal("maxErrMin", memLayer.ML.confReadInt("maxErrMin"));
+ memLayer.ML.setSessionVal("maxErrPlus", memLayer.ML.confReadInt("maxErrPlus"));
+ if (!Page.IsPostBack)
+ {
+ activeMode = modoCommesse.elenco;
+ intervalloDate periodo = new intervalloDate();
+ periodo.fine = DateTime.Now.AddDays(1);
+ periodo.inizio = periodo.fine.AddDays(-10);
+ mod_periodoAnalisi1.intervalloAnalisi = periodo;
+ // salvo link in HF
+ hfDataFrom.Value = periodo.inizio.ToString();
+ hfDataTo.Value = periodo.fine.ToString();
+ // imposto modo tag cloud
+ string modoTC = memLayer.ML.confReadString("TagCloudMode");
+ switch (modoTC)
+ {
+ case "elenco":
+ mod_TagCloudProgetti1.modo = TagCloudMode.elenco;
+ break;
+ case "elencoCPF":
+ mod_TagCloudProgetti1.modo = TagCloudMode.elencoCPF;
+ break;
+ case "piramide":
+ mod_TagCloudProgetti1.modo = TagCloudMode.piramide;
+ break;
+ case "standard":
+ default:
+ mod_TagCloudProgetti1.modo = TagCloudMode.standard;
+ break;
+ }
+ }
+ showPanels();
+ grView.DataBind();
+ mod_commUtMancTimbr1.eh_nuovoValore += new EventHandler(mod_commUtMancTimbr1_eh_nuovoValore);
+ mod_commAttivitaDesk1.eh_nuovoValore += new EventHandler(mod_commAttivitaDesk1_eh_nuovoValore);
+ mod_TagCloudProgetti1.eh_newVal += new EventHandler(mod_TagCloudProgetti1_eh_newVal);
+ mod_TagCloudProgetti1.eh_refresh += mod_TagCloudProgetti1_eh_refresh;
+ mod_periodoAnalisi1.eh_doUpdate += mod_periodoAnalisi1_eh_doUpdate;
+ }
+
+ void mod_TagCloudProgetti1_eh_refresh(object sender, EventArgs e)
+ {
+ mod_commAttivitaDesk1.doUpdate();
+ grView.DataBind();
+ }
+
+ void mod_periodoAnalisi1_eh_doUpdate(object sender, EventArgs e)
+ {
+ // 2016.04.07: salvo intervallo nei 2 hidden field
+ hfDataFrom.Value = mod_periodoAnalisi1.intervalloAnalisi.inizio.ToString();
+ hfDataTo.Value= mod_periodoAnalisi1.intervalloAnalisi.fine.ToString();
+ // update
+ mod_commAttivitaDesk1.doUpdate();
+ grView.DataBind();
+ }
+
+ void mod_TagCloudProgetti1_eh_newVal(object sender, EventArgs e)
+ {
+ mod_commAttivitaDesk1.doUpdate();
+ grView.DataBind();
+ }
+
+ void mod_commAttivitaDesk1_eh_nuovoValore(object sender, EventArgs e)
+ {
+ mod_TagCloudProgetti1.doUpdate();
+ grView.DataBind();
+ }
+
+ void mod_commUtMancTimbr1_eh_nuovoValore(object sender, EventArgs e)
+ {
+ grView.DataBind();
+ }
+ ///
+ /// inverte valore booleano
+ ///
+ ///
+ ///
+ public bool invBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = !Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// idxDipendente insessione
+ ///
+ protected int idxDip
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj("idxDipBCode");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("idxDipBCode", value);
+ }
+ }
+ ///
+ /// gestione evento richiesta edit timbrature
+ ///
+ ///
+ ///
+ protected void imgEditTimbr_Click(object sender, EventArgs e)
+ {
+ DateTime adesso = DateTime.Now;
+ string dataRif = ((ImageButton)sender).CommandArgument;
+ CultureInfo ita = new CultureInfo("it-IT");
+ mod_commUtMancTimbr1.valoreDateTime = Convert.ToDateTime(dataRif, ita).AddHours(adesso.Hour).AddMinutes(adesso.Minute - adesso.Minute % 5);
+ //salvo in sessione dati x detail timbrature
+ memLayer.ML.setSessionVal("inizioDet", Convert.ToDateTime(dataRif, ita).Date);
+ memLayer.ML.setSessionVal("fineDet", Convert.ToDateTime(dataRif, ita).Date.AddDays(1));
+ memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente);
+ // imposto modalitÃ
+ activeMode = modoCommesse.editTimb;
+ showPanels();
+ }
+ ///
+ /// gestione evento richiesta edit commesse
+ ///
+ ///
+ ///
+ protected void imgEditComm_Click(object sender, EventArgs e)
+ {
+ DateTime adesso = DateTime.Now;
+ string dataRif = ((ImageButton)sender).CommandArgument;
+ CultureInfo ita = new CultureInfo("it-IT");
+ mod_commAttivitaDesk1.idxDipCurr = DataProxy.idxDipendente;
+ mod_commAttivitaDesk1.valoreDateTime = Convert.ToDateTime(dataRif, ita);
+ mod_TagCloudProgetti1.dataRif = Convert.ToDateTime(dataRif, ita);
+ activeMode = modoCommesse.editRegAtt;
+ showPanels();
+ mod_commAttivitaDesk1.doUpdate();
+ }
+ ///
+ /// indica se sia abilitato l'editing delle attività legate alle commesse
+ ///
+ public bool regAttEnabled
+ {
+ get
+ {
+ return memLayer.ML.confReadBool("regAttEnabled");
+ }
+ }
+ ///
+ ///
+ ///
+ ///
+ ///
+ public string classByPerm(object minPerm)
+ {
+ string answ = "";
+ if (Convert.ToDouble(minPerm) > 0)
+ {
+ answ = "lblWarning";
+ }
+ return answ;
+ }
+ ///
+ /// prepara tooltip permessi/straordinarie
+ ///
+ ///
+ ///
+ ///
+ public string tooltipPermStra(object minStra, object minPerm)
+ {
+ string answ = "";
+ try
+ {
+ if (memLayer.ML.confReadBool("reviewShowOreMin"))
+ {
+ answ = string.Format("Straordinarie: {0} - Permessi: {1} (h:mm)", utils.formOreMin(Convert.ToDecimal(minStra) / 60), utils.formOreMin(Convert.ToDecimal(minPerm) / 60));
+ }
+ else
+ {
+ answ = string.Format("Straordinarie: {0:0.##} h - Permessi: {1:0.##} h", Convert.ToDouble(minStra) / 60, Convert.ToDouble(minPerm) / 60);
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// imposta visualizzazione dei pannelli opzionali laterali a seocnda del modo attivo
+ ///
+ protected void showPanels()
+ {
+ // imposto valori default
+ bool timbr = false;
+ bool commesse = false;
+ switch (activeMode)
+ {
+ case modoCommesse.editTimb:
+ timbr = true;
+ break;
+ case modoCommesse.editRegAtt:
+ commesse = true;
+ break;
+ case modoCommesse.elenco:
+ default:
+ break;
+ }
+ pnlEditCom.Visible = commesse;
+ pnlEditOre.Visible = timbr;
+ mod_commUtMancTimbr1.Visible = timbr;
+ mod_commAttivitaDesk1.Visible = commesse;
+ }
+ ///
+ /// chiamata del button close (entrambi)
+ ///
+ ///
+ ///
+ protected void btnClose_Click(object sender, EventArgs e)
+ {
+ activeMode = modoCommesse.elenco;
+ showPanels();
+ grView.DataBind();
+ }
+ ///
+ /// fornisce img x check coerenza ore timbrate e commesse
+ ///
+ ///
+ ///
+ public string imgChk(object okLavCom)
+ {
+ string answ = "~/images/statoKo_m.png";
+ try
+ {
+ if (Convert.ToBoolean(okLavCom))
+ {
+ answ = "~/images/statoOk_m.png";
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// formatta stringa giustificativi
+ ///
+ ///
permessi
+ ///
ferie
+ ///
malattia
+ ///
festivitÃ
+ ///
MPP
+ ///
+ public string txtGiust(object _minPerm, object _minFer, object _minMal, object _minFest, object _minMPP)
+ {
+ string answ = "";
+ double minPerm = Convert.ToInt32(_minPerm);
+ double minFer = Convert.ToInt32(_minFer);
+ double minMal = Convert.ToInt32(_minMal);
+ double minFest = Convert.ToInt32(_minFest);
+ double minMpp = Convert.ToInt32(_minMPP);
+ if (memLayer.ML.confReadBool("reviewShowOreMin"))
+ {
+ if (minPerm > 0) answ += string.Format("{0} Pe ", utils.formOreMin(Convert.ToDecimal(minPerm / 60)));
+ if (minFer > 0) answ += string.Format("{0} Fe ", utils.formOreMin(Convert.ToDecimal(minFer / 60)));
+ if (minMal > 0) answ += string.Format("{0} Ma ", utils.formOreMin(Convert.ToDecimal(minMal / 60)));
+ if (minFest > 0) answ += string.Format("{0} Fs ", utils.formOreMin(Convert.ToDecimal(minFest / 60)));
+ if (minMpp > 0) answ += string.Format("{0} Mpp ", utils.formOreMin(Convert.ToDecimal(minMpp / 60)));
+ }
+ else
+ {
+ if (minPerm > 0) answ += string.Format("{0:0.00} Pe ", minPerm / 60);
+ if (minFer > 0) answ += string.Format("{0:0.00} Fe ", minFer / 60);
+ if (minMal > 0) answ += string.Format("{0:0.00} Ma ", minMal / 60);
+ if (minFest > 0) answ += string.Format("{0:0.00} Fs ", minFest / 60);
+ if (minMpp > 0) answ += string.Format("{0:0.00} Mpp ", minMpp / 60);
+ }
+ return answ;
+ }
+ ///
+ /// formatta stringa tooltip giustificativi
+ ///
+ ///
permessi
+ ///
ferie
+ ///
malattia
+ ///
festivitÃ
+ ///
MPP
+ ///
+ public string tooltipGiust(object _minPerm, object _minFer, object _minMal, object _minFest, object _minMPP)
+ {
+ string answ = "";
+ double minPerm = Convert.ToInt32(_minPerm);
+ double minFer = Convert.ToInt32(_minFer);
+ double minMal = Convert.ToInt32(_minMal);
+ double minFest = Convert.ToInt32(_minFest);
+ double minMpp = Convert.ToInt32(_minMPP);
+ if (memLayer.ML.confReadBool("reviewShowOreMin"))
+ {
+ if (minPerm > 0) answ += string.Format("{0} Permesso ", utils.formOreMin(Convert.ToDecimal(minPerm / 60)));
+ if (minFer > 0) answ += string.Format("{0} Ferie ", utils.formOreMin(Convert.ToDecimal(minFer / 60)));
+ if (minMal > 0) answ += string.Format("{0} Malattia ", utils.formOreMin(Convert.ToDecimal(minMal / 60)));
+ if (minFest > 0) answ += string.Format("{0} Festività ", utils.formOreMin(Convert.ToDecimal(minFest / 60)));
+ if (minMpp > 0) answ += string.Format("{0} Manc.Pausa Pranzo ", utils.formOreMin(Convert.ToDecimal(minMpp / 60)));
+ }
+ else
+ {
+ if (minPerm > 0) answ += string.Format("{0:0.00}h Permesso ", minPerm / 60);
+ if (minFer > 0) answ += string.Format("{0:0.00}h Ferie ", minFer / 60);
+ if (minMal > 0) answ += string.Format("{0:0.00}h Malattia ", minMal / 60);
+ if (minFest > 0) answ += string.Format("{0:0.00}h Festività ", minFest / 60);
+ if (minMpp > 0) answ += string.Format("{0:0.00}h Manc.Pausa Pranzo ", minMpp / 60);
+ }
+ return answ;
+ }
+
+ ///
+ /// formatta la durata in ore secondo web.config (centesimale/ore:min)
+ ///
+ ///
+ ///
+ public string formatDurata(object oreCent)
+ {
+ decimal ore = 0;
+ try
+ {
+ ore = Convert.ToDecimal(oreCent);
+ }
+ catch
+ { }
+ string answ = "";
+ if (memLayer.ML.confReadBool("reviewShowOreMin"))
+ {
+ answ = utils.formOreMin(ore);
+ }
+ else
+ {
+ answ = ore.ToString("0.00");
+ }
+ return answ;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_commUtLog.ascx.designer.cs b/GPW/WebUserControls/mod_commUtLog.ascx.designer.cs
new file mode 100644
index 0000000..710b3da
--- /dev/null
+++ b/GPW/WebUserControls/mod_commUtLog.ascx.designer.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_commUtLog {
+
+ ///
+ /// hfDataFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hfDataFrom;
+
+ ///
+ /// hfDataTo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hfDataTo;
+
+ ///
+ /// pnlAll control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlAll;
+
+ ///
+ /// mod_menuTopFull1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_menuTopFull mod_menuTopFull1;
+
+ ///
+ /// mod_periodoAnalisi1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::mod_periodoAnalisi mod_periodoAnalisi1;
+
+ ///
+ /// pnlEditCom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlEditCom;
+
+ ///
+ /// btnCloseRA control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCloseRA;
+
+ ///
+ /// mod_TagCloudProgetti1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_TagCloudProgetti mod_TagCloudProgetti1;
+
+ ///
+ /// mod_commAttivitaDesk1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_commAttivitaDesk mod_commAttivitaDesk1;
+
+ ///
+ /// pnlEditOre control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlEditOre;
+
+ ///
+ /// btnCloseTimb control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCloseTimb;
+
+ ///
+ /// mod_elencoTimbr1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_elencoTimbr mod_elencoTimbr1;
+
+ ///
+ /// mod_commUtMancTimbr1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_commUtMancTimbr mod_commUtMancTimbr1;
+
+ ///
+ /// 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;
+ }
+}
diff --git a/GPW/WebUserControls/mod_commUtMancTimbr.ascx b/GPW/WebUserControls/mod_commUtMancTimbr.ascx
new file mode 100644
index 0000000..d28d515
--- /dev/null
+++ b/GPW/WebUserControls/mod_commUtMancTimbr.ascx
@@ -0,0 +1,127 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_commUtMancTimbr.ascx.cs" Inherits="GPW.WebUserControls.mod_commUtMancTimbr" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<%@ Register Src="mod_menuTopFull.ascx" TagName="mod_menuTopFull" TagPrefix="uc1" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_commUtMancTimbr.ascx.cs b/GPW/WebUserControls/mod_commUtMancTimbr.ascx.cs
new file mode 100644
index 0000000..2cb1e18
--- /dev/null
+++ b/GPW/WebUserControls/mod_commUtMancTimbr.ascx.cs
@@ -0,0 +1,224 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+using System.Globalization;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_commUtMancTimbr : System.Web.UI.UserControl
+ {
+ ///
+ /// data selezionata
+ ///
+ protected DateTime dataRif
+ {
+ get
+ {
+ DateTime answ = DateTime.Now;
+ try
+ {
+ answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("dataRif", value);
+ }
+ }
+ ///
+ /// avvio pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ // imposto entrata
+ rblEntrata.SelectedIndex = 0;
+ }
+ }
+ ///
+ /// valore datetime selezionato!
+ ///
+ public DateTime valoreDateTime
+ {
+ get
+ {
+ DateTime answ = DateTime.Now;
+ try
+ {
+ int oreSel = Convert.ToInt32(ddlOra.SelectedValue);
+ int minSel = Convert.ToInt32(ddlMin.SelectedValue);
+ answ = Convert.ToDateTime(txtData.Text).AddHours(oreSel).AddMinutes(minSel);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ txtData.Text = value.Date.ToString("dd/MM/yyyy");
+ ddlOra.SelectedValue = value.Hour.ToString();
+ ddlMin.SelectedValue = value.Minute.ToString();
+ }
+ }
+ ///
+ /// inverte valore booleano
+ ///
+ ///
+ ///
+ public bool invBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = !Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// evento riga caricata...
+ ///
+ ///
+ ///
+ protected void grView_RowDataBound(object sender, GridViewRowEventArgs e)
+ {
+ // controllo la riga
+ GridViewRow riga = e.Row;
+ // se la data è quella rif...
+ Label data = new Label();
+ bool trovato = false;
+ try
+ {
+ data = (Label)riga.FindControl("lblDataLav");
+ trovato = (data.Text == Convert.ToDateTime(memLayer.ML.StringSessionObj("dataRif")).ToString("dd-MM"));
+ }
+ catch
+ { }
+ }
+ ///
+ /// sistemo post eliminazione
+ ///
+ ///
+ ///
+ protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
+ {
+ checkFixOds();
+ // sollevo evento nuovo valore...
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// update post cancellazione
+ ///
+ ///
+ ///
+ protected void grViewRichieste_RowDeleted(object sender, GridViewDeletedEventArgs e)
+ {
+ checkFixOds();
+ // sollevo evento nuovo valore...
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// effettua fix dell'ods
+ ///
+ private void checkFixOds()
+ {
+ grViewRichieste.DataBind();
+ }
+ ///
+ /// salvo richiesta
+ ///
+ ///
+ ///
+ protected void btnRichMT_Click(object sender, EventArgs e)
+ {
+ logger.lg.scriviLog("Richiesta registrazione timbratura manuale", tipoLog.INFO);
+ // salva una richiesta di timbratura (ovvero approvata = FALSE!!!)
+ DateTime richiesta = DateTime.Now;
+ try
+ {
+ CultureInfo ita = new CultureInfo("it-IT");
+ logger.lg.scriviLog(string.Format("Data: {0}", txtData.Text));
+ richiesta = Convert.ToDateTime(txtData.Text, ita);
+ double ora = Convert.ToDouble(ddlOra.SelectedValue);
+ double minuto = Convert.ToDouble(ddlMin.SelectedValue);
+ richiesta = richiesta.AddHours(ora).AddMinutes(minuto);
+ bool isEntrata = Convert.ToBoolean(rblEntrata.SelectedValue);
+ registraTimbraturaNonApp(isEntrata, richiesta);
+ // aggiorno gridview
+ checkFixOds();
+ }
+ catch
+ {
+ logger.lg.scriviLog("Errore conversione datetime!");
+ }
+ // sollevo evento nuovo valore...
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// registro timbratura NON APPROVATA
+ ///
+ ///
+ ///
+ private void registraTimbraturaNonApp(bool isEntrata, DateTime dataOra)
+ {
+ // salvo evento entrata...
+ string IPv4 = "";
+ bool approvata = false; // è una richiesta!!!!
+ if (DataProxy.idxDipendente > 0)
+ {
+ // recupero IP
+ IPv4 = Request.UserHostName;
+ DataProxy.DP.taTimb.stp_insTimbMan(DataProxy.idxDipendente, dataOra, isEntrata, IPv4, "NoTim", approvata);
+ logger.lg.scriviLog(string.Format("Richiesta timbratura per il dipendente:{0} in data:{1} isEntrata:{2}", DataProxy.idxDipendente, dataOra, isEntrata), tipoLog.INFO);
+ }
+ else
+ {
+ logger.lg.scriviLog("IdxDipendente non trovato! inserimento timbratura mancante impossibile", tipoLog.INFO);
+ }
+ }
+ ///
+ /// 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;
+ }
+
+ ///
+ /// evento update valori
+ ///
+ public event EventHandler eh_nuovoValore;
+
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_commUtMancTimbr.ascx.designer.cs b/GPW/WebUserControls/mod_commUtMancTimbr.ascx.designer.cs
new file mode 100644
index 0000000..5f21a9a
--- /dev/null
+++ b/GPW/WebUserControls/mod_commUtMancTimbr.ascx.designer.cs
@@ -0,0 +1,114 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_commUtMancTimbr {
+
+ ///
+ /// pnlAll control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlAll;
+
+ ///
+ /// rblEntrata control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RadioButtonList rblEntrata;
+
+ ///
+ /// txtData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtData;
+
+ ///
+ /// ceTxtData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::AjaxControlToolkit.CalendarExtender ceTxtData;
+
+ ///
+ /// ddlOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlOra;
+
+ ///
+ /// odsOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsOra;
+
+ ///
+ /// ddlMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlMin;
+
+ ///
+ /// odsMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsMin;
+
+ ///
+ /// btnRichMT control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRichMT;
+
+ ///
+ /// grViewRichieste control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView grViewRichieste;
+
+ ///
+ /// odsRichieste control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsRichieste;
+ }
+}
diff --git a/GPW/WebUserControls/mod_dateTime.ascx b/GPW/WebUserControls/mod_dateTime.ascx
new file mode 100644
index 0000000..635c8f2
--- /dev/null
+++ b/GPW/WebUserControls/mod_dateTime.ascx
@@ -0,0 +1,30 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_dateTime.ascx.cs" Inherits="GPW.WebUserControls.mod_dateTime" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_dateTime.ascx.cs b/GPW/WebUserControls/mod_dateTime.ascx.cs
new file mode 100644
index 0000000..b0b413e
--- /dev/null
+++ b/GPW/WebUserControls/mod_dateTime.ascx.cs
@@ -0,0 +1,154 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_dateTime : System.Web.UI.UserControl
+ {
+ ///
+ /// uuid univoco
+ ///
+ protected string uuid
+ {
+ get
+ {
+ return this.UniqueID.Replace("$", "_");
+ }
+ }
+
+ protected DateTime dataOra
+ {
+ get
+ {
+ DateTime answ = DateTime.Now;
+ try
+ {
+ answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif")).AddHours(DateTime.Now.Hour).AddMinutes(DateTime.Now.Minute);
+ }
+ catch
+ { }
+ answ = answ.AddMinutes(-answ.Minute % snapMinuti);
+ try
+ {
+ answ = (DateTime)memLayer.ML.objSessionObj(string.Format("dt_{0}", uuid));
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal(string.Format("dt_{0}", uuid), value);
+ }
+ }
+
+ ///
+ /// avvio pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)// || txtData.Text == "")
+ {
+ setInitVal();
+ valoreDateTime = dataOra;
+ }
+ }
+
+
+ private void setInitVal()
+ {
+ // imposto un datetime di default ad adesso...
+ DateTime adesso = DateTime.Now;
+ try
+ {
+ adesso = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif")).AddHours(DateTime.Now.Hour).AddMinutes(DateTime.Now.Minute);
+ }
+ catch
+ { }
+ dataOra = adesso.AddMinutes(-adesso.Minute % snapMinuti);
+ }
+
+ ///
+ /// Valore di arrotondamento x selettore minuti
+ ///
+ public int snapMinuti
+ {
+ get
+ {
+ int answ = 5;
+ try
+ {
+ answ = Convert.ToInt32(lblSnapMin.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ lblSnapMin.Text = value.ToString();
+ }
+ }
+ ///
+ /// valore datetime selezionato!
+ ///
+ public DateTime valoreDateTime
+ {
+ get
+ {
+ DateTime answ = DateTime.Now;
+ try
+ {
+ int oreSel = Convert.ToInt32(ddlOra.SelectedValue);
+ int minSel = Convert.ToInt32(ddlMin.SelectedValue);
+ answ = Convert.ToDateTime(txtData.Text).AddHours(oreSel).AddMinutes(minSel);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ txtData.Text = value.Date.ToShortDateString();
+ ddlOra.SelectedValue = value.Hour.ToString();
+ ddlMin.SelectedValue = value.Minute.ToString();
+ }
+ }
+ ///
+ /// stringa data
+ ///
+ public string lblabelData
+ {
+ get
+ {
+ return lblData.Text;
+ }
+ set
+ {
+ lblData.Text = value;
+ }
+ }
+ ///
+ /// stringa ora
+ ///
+ public string lblabelOra
+ {
+ get
+ {
+ return lblOra.Text;
+ }
+ set
+ {
+ lblOra.Text = value;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_dateTime.ascx.designer.cs b/GPW/WebUserControls/mod_dateTime.ascx.designer.cs
new file mode 100644
index 0000000..e2377f4
--- /dev/null
+++ b/GPW/WebUserControls/mod_dateTime.ascx.designer.cs
@@ -0,0 +1,96 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_dateTime {
+
+ ///
+ /// lblData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblData;
+
+ ///
+ /// txtData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtData;
+
+ ///
+ /// ceTxtData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::AjaxControlToolkit.CalendarExtender ceTxtData;
+
+ ///
+ /// lblOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblOra;
+
+ ///
+ /// ddlOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlOra;
+
+ ///
+ /// ddlMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlMin;
+
+ ///
+ /// odsOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsOra;
+
+ ///
+ /// odsMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsMin;
+
+ ///
+ /// lblSnapMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSnapMin;
+ }
+}
diff --git a/GPW/WebUserControls/mod_dateTimeJQM.ascx b/GPW/WebUserControls/mod_dateTimeJQM.ascx
new file mode 100644
index 0000000..4d42b76
--- /dev/null
+++ b/GPW/WebUserControls/mod_dateTimeJQM.ascx
@@ -0,0 +1,39 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_dateTimeJQM.ascx.cs" Inherits="GPW.WebUserControls.mod_dateTimeJQM" %>
+<% if (false)
+ { %>
+
+
+
+<% } %>
+
+
+
+
+
+ <%----%>
+
+
+
+
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_dateTimeJQM.ascx.cs b/GPW/WebUserControls/mod_dateTimeJQM.ascx.cs
new file mode 100644
index 0000000..6ff3858
--- /dev/null
+++ b/GPW/WebUserControls/mod_dateTimeJQM.ascx.cs
@@ -0,0 +1,111 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_dateTimeJQM : System.Web.UI.UserControl
+ {
+ ///
+ /// avvio pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // cambio il target x il popup che mostrerà il selettore calendario...
+ hlPUCal.NavigateUrl = string.Format("#{0}", popupBasic.UniqueID).Replace("$", "_");
+ }
+ ///
+ /// Valore di arrotondamento x selettore minuti
+ ///
+ public int snapMinuti
+ {
+ get
+ {
+ int answ = 5;
+ try
+ {
+ answ = Convert.ToInt32(lblSnapMin.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ lblSnapMin.Text = value.ToString();
+ }
+ }
+ ///
+ /// valore datetime selezionato!
+ ///
+ public DateTime valoreDateTime
+ {
+ get
+ {
+ DateTime answ = DateTime.Now;
+ try
+ {
+ int oreSel = Convert.ToInt32(ddlOra.SelectedValue);
+ int minSel = Convert.ToInt32(ddlMin.SelectedValue);
+ answ = Convert.ToDateTime(lblDataRif.Text).AddHours(oreSel).AddMinutes(minSel);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ lblDataRif.Text = value.Date.ToShortDateString();
+ ddlOra.SelectedValue = value.Hour.ToString();
+ ddlMin.SelectedValue = value.Minute.ToString();
+ }
+ }
+ ///
+ /// stringa data
+ ///
+ public string lblabelData
+ {
+ get
+ {
+ return lblData.Text;
+ }
+ set
+ {
+ lblData.Text = value;
+ }
+ }
+ ///
+ /// stringa ora
+ ///
+ public string lblabelOra
+ {
+ get
+ {
+ return lblOra.Text;
+ }
+ set
+ {
+ lblOra.Text = value;
+ }
+ }
+
+
+ ///
+ /// aggiorno data selezionata!
+ ///
+ ///
+ ///
+ protected void calDataRif_SelectionChanged(object sender, EventArgs e)
+ {
+ // recupero ore e minuti...
+ int oreSel = Convert.ToInt32(ddlOra.SelectedValue);
+ int minSel = Convert.ToInt32(ddlMin.SelectedValue);
+ valoreDateTime = calDataRif.SelectedDate.AddHours(oreSel).AddMinutes(minSel);
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_dateTimeJQM.ascx.designer.cs b/GPW/WebUserControls/mod_dateTimeJQM.ascx.designer.cs
new file mode 100644
index 0000000..730a7eb
--- /dev/null
+++ b/GPW/WebUserControls/mod_dateTimeJQM.ascx.designer.cs
@@ -0,0 +1,114 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_dateTimeJQM {
+
+ ///
+ /// lblData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblData;
+
+ ///
+ /// hlPUCal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink hlPUCal;
+
+ ///
+ /// lblDataRif control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDataRif;
+
+ ///
+ /// popupBasic control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel popupBasic;
+
+ ///
+ /// calDataRif control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Calendar calDataRif;
+
+ ///
+ /// lblOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblOra;
+
+ ///
+ /// ddlOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlOra;
+
+ ///
+ /// ddlMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlMin;
+
+ ///
+ /// odsOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsOra;
+
+ ///
+ /// odsMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsMin;
+
+ ///
+ /// lblSnapMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSnapMin;
+ }
+}
diff --git a/GPW/WebUserControls/mod_dettaglioProgetto.ascx b/GPW/WebUserControls/mod_dettaglioProgetto.ascx
new file mode 100644
index 0000000..85c48bc
--- /dev/null
+++ b/GPW/WebUserControls/mod_dettaglioProgetto.ascx
@@ -0,0 +1,114 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_dettaglioProgetto.ascx.cs" Inherits="GPW.WebUserControls.mod_dettaglioProgetto" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Starred
+
+ <%--
--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_dettaglioProgetto.ascx.cs b/GPW/WebUserControls/mod_dettaglioProgetto.ascx.cs
new file mode 100644
index 0000000..1cb220c
--- /dev/null
+++ b/GPW/WebUserControls/mod_dettaglioProgetto.ascx.cs
@@ -0,0 +1,132 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using GPW_data;
+using SteamWare;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_dettaglioProgetto : System.Web.UI.UserControl
+ {
+ #region gestione eventi
+
+ public event EventHandler eh_nuovoValore;
+
+ #endregion
+
+ ///
+ /// pagina corrente (URL finale)
+ ///
+ public string _paginaCorrente { get; set; }
+ ///
+ /// caricamento pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ PagCorrente();
+ }
+ }
+ ///
+ /// salva in variabile pagina il nome della pagina corrente
+ ///
+ protected void PagCorrente()
+ {
+ Uri MyUrl = Request.Url;
+ string delimStr = "/";
+ char[] delimiter = delimStr.ToCharArray();
+ string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
+ int n = finalUrl.Length;
+ _paginaCorrente = finalUrl[n - 1].ToString();
+ }
+ ///
+ /// calcola il rapporto, in %, tra 2 valori
+ ///
+ ///
+ ///
+ ///
+ public string percRatio(object numeratore, object divisore)
+ {
+ string answ = "";
+ double num = 0;
+ double div = 1;
+ try
+ {
+ num = Convert.ToDouble(numeratore);
+ div = Convert.ToDouble(divisore);
+ if (div <= 0)
+ {
+ answ = "n.a.";
+ }
+ else
+ {
+ answ = string.Format("{0:P1}", num / div);
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// rimanda a pagina fasi!
+ ///
+ ///
+ ///
+ protected void btnFasi_Click(object sender, EventArgs e)
+ {
+ Response.Redirect("fasi.aspx");
+ }
+ ///
+ /// controllo check attivazione...
+ ///
+ ///
+ ///
+ protected void chkAttivo_CheckedChanged(object sender, EventArgs e)
+ {
+ // chiamo update attivo/non attivo...
+ CheckBox chkBox = (CheckBox)sender;
+ DataProxy.DP.taAP.updateAttivo(chkBox.Checked, memLayer.ML.IntSessionObj("idxProgetto_sel"));
+ fmView.DataBind();
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// controllo check attivazione...
+ ///
+ ///
+ ///
+ protected void chkStarred_CheckedChanged(object sender, EventArgs e)
+ {
+ // chiamo update attivo/non attivo...
+ CheckBox chkBox = (CheckBox)sender;
+ DataProxy.DP.taAP.updateStarred(chkBox.Checked, memLayer.ML.IntSessionObj("idxProgetto_sel"));
+ fmView.DataBind();
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// risponde alla domanda se l'utente abbia permesso tipo writable (S) nel permessi2funzione
+ ///
+ ///
+ public bool isWritable()
+ {
+ bool answ = false;
+ if (_paginaCorrente == null)
+ {
+ PagCorrente();
+ }
+ answ = user_std.UtSn.isPageWriteEnabled(_paginaCorrente);
+ return answ;
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_dettaglioProgetto.ascx.designer.cs b/GPW/WebUserControls/mod_dettaglioProgetto.ascx.designer.cs
new file mode 100644
index 0000000..ca2f4e1
--- /dev/null
+++ b/GPW/WebUserControls/mod_dettaglioProgetto.ascx.designer.cs
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_dettaglioProgetto {
+
+ ///
+ /// fmView control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.FormView fmView;
+
+ ///
+ /// 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;
+ }
+}
diff --git a/GPW/WebUserControls/mod_elencoTimbr.ascx b/GPW/WebUserControls/mod_elencoTimbr.ascx
new file mode 100644
index 0000000..a8fd07b
--- /dev/null
+++ b/GPW/WebUserControls/mod_elencoTimbr.ascx
@@ -0,0 +1,99 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoTimbr.ascx.cs" Inherits="GPW.WebUserControls.mod_elencoTimbr" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nessun record TIMBRATURA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_elencoTimbr.ascx.cs b/GPW/WebUserControls/mod_elencoTimbr.ascx.cs
new file mode 100644
index 0000000..43fd965
--- /dev/null
+++ b/GPW/WebUserControls/mod_elencoTimbr.ascx.cs
@@ -0,0 +1,158 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using GPW_data;
+using SteamWare;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_elencoTimbr : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ ///
+ /// evento update valori
+ ///
+ public event EventHandler eh_nuovoValore;
+ ///
+ /// evento update righe
+ ///
+ ///
+ ///
+ protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
+ {
+ grView.DataBind();
+ raiseUpdate();
+ }
+
+ private void raiseUpdate()
+ {
+ // sollevo evento nuovo valore...
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// evento cancellazione riga
+ ///
+ ///
+ ///
+ protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
+ {
+ grView.DataBind();
+ raiseUpdate();
+ }
+ ///
+ /// imposto ODS
+ ///
+ private void checkFixOds()
+ {
+ ods.DataBind();
+ grView.DataBind();
+ }
+
+ public void doUpdate()
+ {
+ checkFixOds();
+ }
+ ///
+ /// 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;
+ }
+ ///
+ /// inverte valore booleano
+ ///
+ ///
+ ///
+ public bool invBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = !Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// converte valore in booleano
+ ///
+ ///
+ ///
+ public bool toBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = Convert.ToBoolean(valore);
+ }
+ 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;
+ }
+ }
+ ///
+ /// verifica se l'utente possa eliminare il record:
+ /// - se non approvato
+ /// - se admin
+ ///
+ public bool userCanDelete(object approvata)
+ {
+ bool answ = !Convert.ToBoolean(approvata);
+ try
+ {
+ answ = user_std.UtSn.userHasRight("GPW_admin");
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// determina se sia visibile username
+ ///
+ public bool showUserName { get; set; }
+
+
+ ///
+ /// determina se sia visibile formato data estesa
+ ///
+ public bool showLongDateFormat { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_elencoTimbr.ascx.designer.cs b/GPW/WebUserControls/mod_elencoTimbr.ascx.designer.cs
new file mode 100644
index 0000000..59bb84c
--- /dev/null
+++ b/GPW/WebUserControls/mod_elencoTimbr.ascx.designer.cs
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.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;
+ }
+}
diff --git a/GPW/WebUserControls/mod_enrollByAuthKey.ascx b/GPW/WebUserControls/mod_enrollByAuthKey.ascx
new file mode 100644
index 0000000..02372ae
--- /dev/null
+++ b/GPW/WebUserControls/mod_enrollByAuthKey.ascx
@@ -0,0 +1,35 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByAuthKey.ascx.cs"
+ Inherits="GPW.WebUserControls.mod_enrollByAuthKey" %>
+
+ Registrazione Con AuthKey Personale
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Spiegazione
+ Questa funzione permette di inserire un devices tra quelli gestiti tramite la AuthKey
+ personale (da richiedere all'admin se non nota).
+
+
diff --git a/GPW/WebUserControls/mod_enrollByAuthKey.ascx.cs b/GPW/WebUserControls/mod_enrollByAuthKey.ascx.cs
new file mode 100644
index 0000000..5194872
--- /dev/null
+++ b/GPW/WebUserControls/mod_enrollByAuthKey.ascx.cs
@@ -0,0 +1,112 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_enrollByAuthKey : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ ///
+ /// salvo nuovo device...
+ ///
+ ///
+ ///
+ protected void btnConferma_Click(object sender, EventArgs e)
+ {
+ // controllo se ho i dati...
+ string plainUserAuthKey = txtUserAuthKey.Text.Trim();
+ // in primis cerco il dipendente data la authKey...
+ int idxDipendente = 0;
+ try
+ {
+ idxDipendente = Convert.ToInt32(ddlIdxDipendente.SelectedValue);
+ }
+ catch
+ { }
+ try
+ {
+ // controllo dipendente... che sia selezionato uno valido
+ if (idxDipendente > 0)
+ {
+ // dichiarazione variabili
+ string userAgent = "";
+ bool fatto = false;
+ string DeviceName = "";
+ string IPv4 = "";
+ string md5UserAuthKey = "";
+ int trovate = 0;
+ try
+ {
+ // recupero dati da session
+ userAgent = Request.UserAgent;
+ DeviceName = Request.UserHostName;
+ IPv4 = Request.UserHostName;
+ }
+ catch
+ {
+ logger.lg.scriviLog("Errore recupero dati da sessione x user, device, IP", tipoLog.ERROR);
+ }
+ // calcolo authKey... cerco se ne trovo x utente encrypted o unencrypted
+ md5UserAuthKey = SteamCrypto.EncryptString(plainUserAuthKey, "AuthGPW");
+ logger.lg.scriviLog(string.Format("Richiesta auth smart device per idxDipendente {0} con key MD5 {1}", idxDipendente, md5UserAuthKey), tipoLog.INFO);
+ try
+ {
+ trovate = DataProxy.DP.taDipendenti.getByAuthKey(idxDipendente, md5UserAuthKey).Rows.Count + DataProxy.DP.taDipendenti.getByAuthKey(idxDipendente, plainUserAuthKey).Rows.Count;
+ }
+ catch
+ {
+ logger.lg.scriviLog("Errore ricerca key in chiaro/MD5 x utente", tipoLog.ERROR);
+ }
+ if (trovate > 0)
+ {
+ try
+ {
+ fatto = DataProxy.DP.enrollDevice(md5UserAuthKey, IPv4, DeviceName, userAgent, idxDipendente);
+ if (fatto)
+ {
+ Response.Redirect("~/Timbrature.aspx");
+ }
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Errore in registrazione nuovo device con AuthKey CIFRATA x utente: {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
+ }
+ }
+ else
+ {
+ lblWarning.Text = "AuthKey non trovata! richiedere reset ad Admin.";
+ lblWarning.Visible = true;
+ }
+ }
+ else
+ {
+ lblWarning.Text = "Dipendente non trovato!";
+ lblWarning.Visible = true;
+ }
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Errore in registrazione device: {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
+ }
+
+ }
+ ///
+ /// resetto tutto
+ ///
+ ///
+ ///
+ protected void btnAnnulla_Click(object sender, EventArgs e)
+ {
+ txtUserAuthKey.Text = "";
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_enrollByAuthKey.ascx.designer.cs b/GPW/WebUserControls/mod_enrollByAuthKey.ascx.designer.cs
new file mode 100644
index 0000000..4006644
--- /dev/null
+++ b/GPW/WebUserControls/mod_enrollByAuthKey.ascx.designer.cs
@@ -0,0 +1,69 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_enrollByAuthKey {
+
+ ///
+ /// ddlIdxDipendente control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlIdxDipendente;
+
+ ///
+ /// odsDipendenti control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsDipendenti;
+
+ ///
+ /// txtUserAuthKey control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtUserAuthKey;
+
+ ///
+ /// lblWarning control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWarning;
+
+ ///
+ /// btnConferma control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnConferma;
+
+ ///
+ /// btnAnnulla control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAnnulla;
+ }
+}
diff --git a/GPW/WebUserControls/mod_enrollByEmail.ascx b/GPW/WebUserControls/mod_enrollByEmail.ascx
new file mode 100644
index 0000000..374c8f9
--- /dev/null
+++ b/GPW/WebUserControls/mod_enrollByEmail.ascx
@@ -0,0 +1,27 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByEmail.ascx.cs"
+ Inherits="GPW.WebUserControls.mod_enrollByEmail" %>
+
+ Reset AuthKey via email
+
+
+
+
+
+
+
+
+ Spiegazione
+ Questa funzione permette di inserire un email e se questa è tra quelle registrate
+ per i dipendenti sarà generata una nuova AuthKey personale e verrà inviato all'email
+ stessa il link con tale key di autoenroll.
+
+
diff --git a/GPW/WebUserControls/mod_enrollByEmail.ascx.cs b/GPW/WebUserControls/mod_enrollByEmail.ascx.cs
new file mode 100644
index 0000000..6537847
--- /dev/null
+++ b/GPW/WebUserControls/mod_enrollByEmail.ascx.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_enrollByEmail : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ ///
+ /// salvo nuovo device...
+ ///
+ ///
+ ///
+ protected void btnConferma_Click(object sender, EventArgs e)
+ {
+ // cerco se esista l'utente data la sua email...
+ int idxDipendente = 0;
+ string UserAuthKey = "";
+ string destinatario = "";
+ DS_Applicazione.DipendentiRow dipendente = null;
+ try
+ {
+ dipendente = DataProxy.DP.taDipendenti.getByEmail(txtUserEmail.Text.Trim())[0];
+ idxDipendente = dipendente.idxDipendente;
+ UserAuthKey = dipendente.authKey;
+ destinatario = dipendente.email;
+ }
+ catch
+ { }
+ if (destinatario != "" && idxDipendente > 0)
+ {
+ // invio email...
+ DataProxy.DP.sendUserAuthEmail(destinatario, UserAuthKey, idxDipendente);
+ logger.lg.scriviLog(string.Format("Inviata mail x auth smart device: destinatario: {0}, authKey: {1}, idxDip: {2}", destinatario, UserAuthKey, idxDipendente), tipoLog.INFO);
+ }
+ else
+ {
+ lblWarning.Text = "Email non valida/dipendente non trovato!";
+ lblWarning.Visible = false;
+ }
+
+ }
+ ///
+ /// resetto tutto
+ ///
+ ///
+ ///
+ protected void btnAnnulla_Click(object sender, EventArgs e)
+ {
+ txtUserEmail.Text = "";
+ lblWarning.Visible = false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_enrollByEmail.ascx.designer.cs b/GPW/WebUserControls/mod_enrollByEmail.ascx.designer.cs
new file mode 100644
index 0000000..6c17639
--- /dev/null
+++ b/GPW/WebUserControls/mod_enrollByEmail.ascx.designer.cs
@@ -0,0 +1,51 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_enrollByEmail {
+
+ ///
+ /// txtUserEmail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtUserEmail;
+
+ ///
+ /// lblWarning control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWarning;
+
+ ///
+ /// btnConferma control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnConferma;
+
+ ///
+ /// btnAnnulla control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAnnulla;
+ }
+}
diff --git a/GPW/WebUserControls/mod_enrollByJumperAuthKey.ascx b/GPW/WebUserControls/mod_enrollByJumperAuthKey.ascx
new file mode 100644
index 0000000..80256d2
--- /dev/null
+++ b/GPW/WebUserControls/mod_enrollByJumperAuthKey.ascx
@@ -0,0 +1,2 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByJumperAuthKey.ascx.cs" Inherits="GPW.WebUserControls.mod_enrollByJumperAuthKey" %>
+<%--è una procedura automatica, niente elementi grafici!--%>
diff --git a/GPW/WebUserControls/mod_enrollByJumperAuthKey.ascx.cs b/GPW/WebUserControls/mod_enrollByJumperAuthKey.ascx.cs
new file mode 100644
index 0000000..71621e8
--- /dev/null
+++ b/GPW/WebUserControls/mod_enrollByJumperAuthKey.ascx.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_enrollByJumperAuthKey : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // procedo alla ricerca di dati via sessione x User AuthKey
+ tryAutoEnroll();
+ }
+ ///
+ /// prova a fare auto enroll
+ ///
+ public void tryAutoEnroll()
+ {
+ // recupero dati da session
+ string UserAuthKey = "";
+ int idxDipendente = 0;
+ string userAgent = "";
+ bool fatto = false;
+ string DeviceName = "";
+ string IPv4 = "";
+ try
+ {
+ UserAuthKey = memLayer.ML.StringSessionObj("UserAuthKey");
+ idxDipendente = memLayer.ML.IntSessionObj("idxDipendente");
+ userAgent = Request.UserAgent;
+ }
+ catch
+ { }
+ // se ci sono i dati effettua tentativo di AutoEnroll del device
+ if (idxDipendente > 0 && UserAuthKey != "")
+ {
+ DeviceName = Request.UserHostName;
+ IPv4 = Request.UserHostName;
+ fatto = DataProxy.DP.enrollDevice(UserAuthKey, IPv4, DeviceName, userAgent, idxDipendente);
+ if (fatto)
+ {
+ Response.Redirect("Timbrature.aspx");
+ }
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_enrollByJumperAuthKey.ascx.designer.cs b/GPW/WebUserControls/mod_enrollByJumperAuthKey.ascx.designer.cs
new file mode 100644
index 0000000..776b79e
--- /dev/null
+++ b/GPW/WebUserControls/mod_enrollByJumperAuthKey.ascx.designer.cs
@@ -0,0 +1,17 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls
+{
+
+
+ public partial class mod_enrollByJumperAuthKey
+ {
+ }
+}
diff --git a/GPW/WebUserControls/mod_filtro.ascx b/GPW/WebUserControls/mod_filtro.ascx
new file mode 100644
index 0000000..6be4ce8
--- /dev/null
+++ b/GPW/WebUserControls/mod_filtro.ascx
@@ -0,0 +1,13 @@
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_filtro" CodeBehind="mod_filtro.ascx.cs" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+
diff --git a/GPW/WebUserControls/mod_filtro.ascx.cs b/GPW/WebUserControls/mod_filtro.ascx.cs
new file mode 100644
index 0000000..3b0598f
--- /dev/null
+++ b/GPW/WebUserControls/mod_filtro.ascx.cs
@@ -0,0 +1,446 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using SteamWare;
+
+public partial class mod_filtro : ApplicationUserControl
+{
+ protected string _css;
+ protected ObjectDataSource _ods;
+ protected string _valore
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj(string.Format("valFiltro_{0}", this.ID));
+ }
+ set
+ {
+ memLayer.ML.setSessionVal(string.Format("valFiltro_{0}", this.ID), value, false);
+ }
+ }
+ ///
+ /// calcola se ci sia in sessione il valore del filtro
+ ///
+ protected bool valueInSession
+ {
+ get
+ {
+ bool answ=false;
+ try
+ {
+ memLayer.ML.isInSessionObject(string.Format("valFiltro_{0}", this.ID));
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ protected bool _changeCheckEnabled = true;
+ protected bool _changeCheckVisible = true;
+ protected bool _changeSelEnabled = true;
+ protected string _where = "";
+ protected string _showFiltered
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj(string.Format("_showFiltered_{0}", this.ID));
+ }
+ set
+ {
+ memLayer.ML.setSessionVal(string.Format("_showFiltered_{0}", this.ID), value);
+ traduciObj();
+ }
+ }
+ protected string _showAll
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj(string.Format("_showAll_{0}", this.ID));
+ }
+ set
+ {
+ memLayer.ML.setSessionVal(string.Format("_showAll_{0}", this.ID), value);
+ traduciObj();
+ }
+ }
+
+ protected override void OnInit(EventArgs e)
+ {
+ base.OnInit(e);
+ if (!Page.IsPostBack)
+ {
+ if (_showFiltered == "") _showFiltered = "mostraSoloSelez";
+ if (_showAll == "") _showAll = "mostraTutti";
+ }
+ }
+
+ ///
+ /// traduzione oggetti
+ ///
+ protected override void traduciObj()
+ {
+ if (_changeCheckVisible)
+ {
+ if (!chkFilt.Checked)
+ {
+ chkFilt.Text = traduci(_showFiltered);
+ }
+ else
+ {
+ chkFilt.Text = traduci(_showAll);
+ }
+ }
+ }
+ ///
+ /// get/set messaggio di attivazione filtraggio
+ ///
+ public string filterChekText
+ {
+ get
+ {
+ return _showFiltered;
+ }
+ set
+ {
+ _showFiltered = value;
+ }
+ }
+ ///
+ /// get/set messaggio di disattivazione filtraggio
+ ///
+ public string filterUnchekText
+ {
+ get
+ {
+ return _showAll;
+ }
+ set
+ {
+ _showAll = value;
+ }
+ }
+ protected void chkFilt_CheckedChanged(object sender, EventArgs e)
+ {
+ // cambio modalità visualizzazione del filtro...
+ dlFilt.Visible = !dlFilt.Visible;
+ raiseSelEvent();
+ }
+
+ protected void raiseSelEvent()
+ {
+ if (!dlFilt.Visible)
+ {
+ memLayer.ML.setSessionVal(string.Format("valFiltro_{0}", this.ID), "", false);
+ }
+ else
+ {
+ _valore = dlFilt.SelectedValue;
+ }
+ if (eh_selValore != null)
+ {
+ eh_selValore(this, new EventArgs());
+ }
+ }
+ protected void updateChk()
+ {
+ chkFilt.Enabled = _changeCheckEnabled;
+ if (!_changeCheckEnabled)
+ {
+ chkFilt.Checked = true;
+ dlFilt.Visible = true;
+ }
+ }
+ protected void updateSel()
+ {
+ dlFilt.Enabled = _changeSelEnabled;
+ }
+ protected void updateChkLbl()
+ {
+ chkFilt.Visible = _changeCheckVisible;
+ }
+ protected override void bindControlli()
+ {
+ updateChk();
+ fixValore();
+ where.Text = _where;
+ traduciObj();
+ }
+ protected SteamWare.tipoVistaMod _modo = SteamWare.tipoVistaMod.editing;
+ protected void dlFilt_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ raiseSelEvent();
+ }
+
+
+ ///
+ /// condizione where per ridurre elementi mostrati in selettore
+ ///
+ public string condizione
+ {
+ get
+ {
+ return _where;
+ }
+ set
+ {
+ _where = value;
+ }
+ }
+
+ ///
+ /// fornisce il valore scelto o "*" se nulla selezionato
+ ///
+ public string valore
+ {
+ get
+ {
+ string answ = "*";
+ if (chkFilt.Checked)
+ {
+ answ = dlFilt.SelectedValue;
+ }
+ return answ;
+ }
+ set
+ {
+ _valore = value;
+ //fixValore();
+ }
+ }
+
+ ///
+ /// primo valore di una chiave multicampo
+ ///
+ public string val_1
+ {
+ get
+ {
+ string answ = "";
+ if (chkFilt.Checked)
+ {
+ try
+ {
+ string[] _dataKey = dlFilt.SelectedValue.Split('#');
+ answ = _dataKey[0];
+ }
+ catch
+ { }
+ }
+ else
+ {
+ answ = "*";
+ }
+ return answ;
+ }
+ }
+ ///
+ /// secondo valore di una chiave multicampo
+ ///
+ public string val_2
+ {
+ get
+ {
+ string answ = "";
+ if (chkFilt.Checked)
+ {
+ try
+ {
+ string[] _dataKey = dlFilt.SelectedValue.Split('#');
+ answ = _dataKey[1];
+ }
+ catch
+ { }
+ }
+ else
+ {
+ answ = "*";
+ }
+ return answ;
+ }
+ }
+ ///
+ /// fornisce il valore scelto o "0" se nulla selezionato o non valido
+ ///
+ public int valoreInt
+ {
+ get
+ {
+ int answ = -1;
+ try
+ {
+ if (chkFilt.Checked)
+ {
+ answ = Convert.ToInt32(dlFilt.SelectedValue);
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// sistema visualizzazione
+ ///
+ protected void fixValore()
+ {
+ if (_ods != null)
+ {
+ try
+ {
+ dlFilt.DataSource = _ods;
+ dlFilt.DataBind();
+ if (_valore != "")
+ {
+
+ dlFilt.SelectedValue = _valore;
+ dlFilt.Visible = true;
+ chkFilt.Checked = true;
+ }
+ }
+ catch(Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Eccezione:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
+ dlFilt.SelectedIndex = 0;
+ }
+ }
+ }
+
+
+ public event EventHandler eh_selValore;
+
+ ///
+ /// determina se sia possibile (de)selezionare il check di filtraggio, altrimenti sempre attivo
+ ///
+ public bool changeCheckEnabled
+ {
+ get
+ {
+ return _changeCheckEnabled;
+ }
+ set
+ {
+ _changeCheckEnabled = value;
+ updateChk();
+ }
+ }
+ ///
+ /// determina se sia possibile modificare la selezione
+ ///
+ public bool changeSelEnabled
+ {
+ get
+ {
+ return _changeSelEnabled;
+ }
+ set
+ {
+ _changeSelEnabled = value;
+ updateSel();
+ }
+ }
+ ///
+ /// determina se sia possibile visibile il check di filtraggio
+ ///
+ public bool changeCheckVisible
+ {
+ get
+ {
+ return _changeCheckVisible;
+ }
+ set
+ {
+ _changeCheckVisible = value;
+ updateChkLbl();
+ }
+ }
+ ///
+ /// get/set della checkbox
+ ///
+ public bool isChecked
+ {
+ get
+ {
+ return chkFilt.Checked;
+ }
+ set
+ {
+ chkFilt.Checked = value;
+ dlFilt.Visible = value;
+ updateChkLbl();
+ }
+ }
+
+ ///
+ /// oggetto ODS con cui popolare il selettore, VINCOLO abbia campi value(key) / label
+ ///
+ public ObjectDataSource ods
+ {
+ get
+ {
+ return _ods;
+ }
+ set
+ {
+ _ods = value;
+ }
+ }
+ ///
+ /// css applicato agli elementi del controllo
+ ///
+ public string css
+ {
+ get
+ {
+ return _css;
+ }
+ set
+ {
+ _css = value;
+ }
+ }
+ ///
+ /// resetta il controllo (un-checked)
+ ///
+ public void reset()
+ {
+ chkFilt.Checked = false;
+ dlFilt.Visible = false;
+ memLayer.ML.emptySessionVal(string.Format("valFiltro_{0}", this.ID));
+ }
+ ///
+ /// resetta e seleziona primo valore
+ ///
+ public void reselFirst()
+ {
+ dlFilt.DataBind();
+ bindControlli();
+ try
+ {
+ dlFilt.SelectedIndex = 0;
+ }
+ catch
+ { }
+ }
+ ///
+ /// get/set per la larghezza della combo dropdown
+ ///
+ public int comboWidth
+ {
+ get
+ {
+ return Convert.ToInt32(dlFilt.Width);
+ }
+ set
+ {
+ dlFilt.Width = value;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_filtro.ascx.designer.cs b/GPW/WebUserControls/mod_filtro.ascx.designer.cs
new file mode 100644
index 0000000..f4cb510
--- /dev/null
+++ b/GPW/WebUserControls/mod_filtro.ascx.designer.cs
@@ -0,0 +1,40 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+public partial class mod_filtro {
+
+ ///
+ /// chkFilt control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox chkFilt;
+
+ ///
+ /// dlFilt control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::AjaxControlToolkit.ComboBox dlFilt;
+
+ ///
+ /// where control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label where;
+}
diff --git a/GPW/WebUserControls/mod_footer.ascx b/GPW/WebUserControls/mod_footer.ascx
new file mode 100644
index 0000000..6045276
--- /dev/null
+++ b/GPW/WebUserControls/mod_footer.ascx
@@ -0,0 +1,14 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_footer.ascx.cs" Inherits="GPW.WebUserControls.mod_footer" %>
+
+
+ -
+ Timbra
+
+ -
+ Progetti
+
+ -
+ Admin
+
+
+
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_footer.ascx.cs b/GPW/WebUserControls/mod_footer.ascx.cs
new file mode 100644
index 0000000..71b3b67
--- /dev/null
+++ b/GPW/WebUserControls/mod_footer.ascx.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_footer : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_footer.ascx.designer.cs b/GPW/WebUserControls/mod_footer.ascx.designer.cs
new file mode 100644
index 0000000..7d7dbfb
--- /dev/null
+++ b/GPW/WebUserControls/mod_footer.ascx.designer.cs
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_footer {
+
+ ///
+ /// btnTimbra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink btnTimbra;
+
+ ///
+ /// btnProgetti control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink btnProgetti;
+
+ ///
+ /// btnAdmin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink btnAdmin;
+ }
+}
diff --git a/GPW/WebUserControls/mod_login.ascx b/GPW/WebUserControls/mod_login.ascx
new file mode 100644
index 0000000..504f676
--- /dev/null
+++ b/GPW/WebUserControls/mod_login.ascx
@@ -0,0 +1,58 @@
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_login" CodeBehind="mod_login.ascx.cs" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+ |
+
+
+
+
diff --git a/GPW/WebUserControls/mod_login.ascx.cs b/GPW/WebUserControls/mod_login.ascx.cs
new file mode 100644
index 0000000..90fa9c4
--- /dev/null
+++ b/GPW/WebUserControls/mod_login.ascx.cs
@@ -0,0 +1,241 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using SteamWare;
+
+///
+/// classe gestione login e forzatura login
+///
+public partial class mod_login : ApplicationUserControl
+{
+ #region area protected/private
+
+ #region area proprietà
+
+ private SteamWare.loginMode _isForceUser = SteamWare.loginMode.normale;
+
+ #endregion
+
+ #region area metodi
+
+ ///
+ /// imposta la modalità di login tra normale / forceUser
+ ///
+ private void setLoginMode()
+ {
+ if (_isForceUser == SteamWare.loginMode.forceUser)
+ {
+ pnlForceUser.Visible = true;
+ }
+ else
+ {
+ pnlForceUser.Visible = false;
+ }
+ }
+
+ protected override void traduciObj()
+ {
+ lblPwd.Text = user_std.UtSn.Traduci("lblPwd");
+ lblUser.Text = user_std.UtSn.Traduci("lblUser");
+ lblDominio.Text = user_std.UtSn.Traduci("lblDominio");
+ lblTitolo.Text = user_std.UtSn.Traduci("ForzaUtente");
+ btnOk.Text = user_std.UtSn.Traduci("btnCommit");
+ }
+
+ ///
+ /// prova a verificare se l'utente sia ok x AD credentials
+ ///
+ private void AdLogin()
+ {
+ lblMessage.Text = traduci("UserNotAuth");
+ if (Page.User.Identity.IsAuthenticated)
+ {
+ //recupera user windows se c'è...
+ string ad_name = Page.User.Identity.Name;
+ string delimStr = "\\";
+ char[] delimiter = delimStr.ToCharArray();
+ string[] dom_user = ad_name.Split(delimiter, 2);
+ // passo al controllo di verifica ADuserOk...
+ user_std _utente = new user_std();
+ if (_utente.ADuserOk(dom_user[0], dom_user[1]))
+ {
+ bool fatto = _utente.startUpUtente(dom_user[0], dom_user[1]);
+ if (fatto)
+ {
+ SteamWare.logger.lg.scriviLog(string.Format("L'utente {0} ({1}) ha effettuato il login correttamente", _utente.CognomeNome, _utente.userNameAD), SteamWare.tipoLog.INFO);
+ if (Login_ok != null)
+ {
+ Login_ok(this, new EventArgs());
+ }
+ }
+ else
+ {
+ lblMessage.Text = String.Format("{0}
There are some problems instatiating user: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]);
+ SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.ERROR);
+ if (Login_Error != null)
+ {
+ Login_Error(this, new EventArgs());
+ }
+ }
+ }
+ else
+ {
+ if (memLayer.ML.confReadBool("autoEnrollEnabled"))
+ {
+ // rimando al modulo di auto enroll...
+ Response.Redirect("autoEnroll.aspx");
+ }
+ else
+ {
+ lblMessage.Text = String.Format("{0}
user not allowed: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]);
+ SteamWare.logger.lg.scriviLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.WARNING);
+ if (Login_Error != null)
+ {
+ Login_Error(this, new EventArgs());
+ }
+ }
+ }
+ }
+ else
+ {
+ lblMessage.Text = user_std.UtSn.Traduci("AccessFail") + user_std.UtSn.Traduci("UsrNotAuth");
+ SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, utente non autenticato"), SteamWare.tipoLog.WARNING);
+ if (Login_Error != null)
+ {
+ Login_Error(this, new EventArgs());
+ }
+ }
+ }
+
+ ///
+ /// effettua verifiche e se concesso permette di forzare l'accesso utente
+ ///
+ private void ForceUserIdentity()
+ {
+ if (Page.User.Identity.IsAuthenticated)
+ {
+ bool _allowForceUser = false;
+ try
+ {
+ _allowForceUser = SteamWare.memLayer.ML.confReadBool("_allowForceUser");
+ }
+ catch
+ {
+ _allowForceUser = false;
+ }
+ if (_allowForceUser)
+ {
+ if (authKey.Text == "triplete") // verifica passphrase...
+ {
+ user_std _utente = new user_std();
+ user_std.UtSn.isForcedUser = true;
+ bool fatto = _utente.startUpUtente(dominio.Text, user.Text);
+ if (fatto)
+ {
+ string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
+ SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO);
+ if (Login_ok != null)
+ {
+ Login_ok(this, new EventArgs());
+ }
+ }
+ }
+ else
+ {
+ lblMessage.Text = String.Format("{0}
key not allowed for operation!!! operation logged!!!", user_std.UtSn.Traduci("AccessFail"));
+ mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
+ string _rigaLog = String.Format("User {0}\t tried to force user - wrong password - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
+ SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING);
+ if (Login_Error != null)
+ {
+ Login_Error(this, new EventArgs());
+ }
+ }
+ }
+ else
+ {
+ mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
+ string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
+ SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING);
+ if (Login_Error != null)
+ {
+ Login_Error(this, new EventArgs());
+ }
+ }
+ }
+ else
+ {
+ lblMessage.Text = string.Format("{0}
user not authenticated!
", user_std.UtSn.Traduci("AccessFail"));
+ if (Login_Error != null)
+ {
+ Login_Error(this, new EventArgs());
+ }
+ string _rigaLog = String.Format("\t Someone tried to force user - real user: \t - not autenticated - \t tried to log as \t {0}\\{1}", dominio.Text, user.Text);
+ SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING);
+ }
+ }
+
+ protected void btnOk_Click(object sender, EventArgs e)
+ {
+ ForceUserIdentity();
+ }
+
+ #endregion
+
+ #endregion
+
+ #region area public
+
+ #region eventi pubblici esposti
+
+ public event EventHandler Login_ok;
+ public event EventHandler Login_Error;
+
+ #endregion
+
+ #region area proprietà
+
+ ///
+ /// modalità funzionamento controllo tra normale (ActiveDirectory e user auth di default) e forceUser
+ ///
+ public SteamWare.loginMode modoLogin
+ {
+ get
+ {
+ return _isForceUser;
+ }
+ set
+ {
+ _isForceUser = value;
+ }
+ }
+
+ #endregion
+
+
+ ///
+ /// avvio pagina
+ ///
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ base.Page_Load(sender, e);
+ //carico da web.config i default values
+ loadDefaultsWebConfig();
+ // procedo...
+ setLoginMode();
+ Session.RemoveAll();
+ if (_isForceUser == SteamWare.loginMode.normale)
+ {
+ AdLogin();
+ }
+ }
+
+ #endregion
+}
diff --git a/GPW/WebUserControls/mod_login.ascx.designer.cs b/GPW/WebUserControls/mod_login.ascx.designer.cs
new file mode 100644
index 0000000..7d2f20b
--- /dev/null
+++ b/GPW/WebUserControls/mod_login.ascx.designer.cs
@@ -0,0 +1,112 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+public partial class mod_login {
+
+ ///
+ /// pnlForceUser control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlForceUser;
+
+ ///
+ /// lblTitolo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTitolo;
+
+ ///
+ /// lblPwd control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPwd;
+
+ ///
+ /// authKey control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox authKey;
+
+ ///
+ /// lblDominio control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDominio;
+
+ ///
+ /// dominio control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox dominio;
+
+ ///
+ /// lblUser control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblUser;
+
+ ///
+ /// user control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox user;
+
+ ///
+ /// btnOk control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnOk;
+
+ ///
+ /// lblMessage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblMessage;
+
+ ///
+ /// HypLinkSSO control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink HypLinkSSO;
+}
diff --git a/GPW/WebUserControls/mod_mancTimb.ascx b/GPW/WebUserControls/mod_mancTimb.ascx
new file mode 100644
index 0000000..17fb330
--- /dev/null
+++ b/GPW/WebUserControls/mod_mancTimb.ascx
@@ -0,0 +1,119 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_mancTimb.ascx.cs" Inherits="GPW.WebUserControls.mod_mancTimb" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_mancTimb.ascx.cs b/GPW/WebUserControls/mod_mancTimb.ascx.cs
new file mode 100644
index 0000000..5d33073
--- /dev/null
+++ b/GPW/WebUserControls/mod_mancTimb.ascx.cs
@@ -0,0 +1,210 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+using System.Globalization;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_mancTimb : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // salvo data corrente x filtraggi...
+ if (!Page.IsPostBack)
+ {
+ memLayer.ML.setSessionVal("today", DateTime.Now.ToShortDateString());
+ // imposto entrata
+ rblEntrata.SelectedIndex = 0;
+ // imposto valori selezionati a metÃ
+ DateTime adesso = DateTime.Now;
+ ddlOra.SelectedValue = adesso.Hour.ToString();
+ ddlMin.SelectedValue = "30";
+ chkShowAll.Visible = userCanApprove;
+ }
+ checkFixOds();
+ }
+ ///
+ /// registro timbratura NON APPROVATA
+ ///
+ ///
+ ///
+ private void registraTimbraturaNonApp(bool isEntrata, DateTime dataOra)
+ {
+ // salvo evento entrata...
+ string IPv4 = "";
+ bool approvata = false; // è una richiesta!!!!
+ if (DataProxy.idxDipendente > 0)
+ {
+ // recupero IP
+ IPv4 = Request.UserHostName;
+ DataProxy.DP.taTimb.stp_insTimbMan(DataProxy.idxDipendente, dataOra, isEntrata, IPv4, "NoTim", approvata);
+ logger.lg.scriviLog(string.Format("Richiesta timbratura per il dipendente:{0} in data:{1} isEntrata:{2}", DataProxy.idxDipendente, dataOra, isEntrata), tipoLog.INFO);
+ }
+ else
+ {
+ logger.lg.scriviLog("IdxDipendente non trovato! inserimento timbratura mancante impossibile", tipoLog.INFO);
+ }
+ }
+ ///
+ /// salvo richiesta
+ ///
+ ///
+ ///
+ protected void btnRichMT_Click(object sender, EventArgs e)
+ {
+ logger.lg.scriviLog("Richiesta registrazione timbratura manuale", tipoLog.INFO);
+ // salva una richiesta di timbratura (ovvero approvata = FALSE!!!)
+ DateTime richiesta = DateTime.Now;
+ try
+ {
+ CultureInfo ita = new CultureInfo("it-IT");
+ logger.lg.scriviLog(string.Format("Data: {0}", ddlData.SelectedValue));
+ richiesta = Convert.ToDateTime(ddlData.SelectedValue, ita);
+
+
+ double ora = Convert.ToDouble(ddlOra.SelectedValue);
+ double minuto = Convert.ToDouble(ddlMin.SelectedValue);
+ richiesta = richiesta.AddHours(ora).AddMinutes(minuto);
+ bool isEntrata = Convert.ToBoolean(rblEntrata.SelectedValue);
+ registraTimbraturaNonApp(isEntrata, richiesta);
+ // aggiorno gridview
+ grView.DataBind();
+ }
+ catch
+ {
+ logger.lg.scriviLog("Errore conversione datetime!");
+ }
+ }
+ ///
+ /// inverte valore booleano
+ ///
+ ///
+ ///
+ public bool invBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = !Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// verifica se l'utente possa approvare la modifica oraria
+ ///
+ public bool userCanApprove
+ {
+ get
+ {
+ bool answ = false;
+ try
+ {
+ answ = DataProxy.DP.taDip2Ruoli.getByDipRuolo(DataProxy.idxDipendente, "AppMancTimb").Rows.Count > 0;
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// 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;
+ }
+ ///
+ /// cambia tipo di visualizzaizone
+ ///
+ ///
+ ///
+ protected void chkShowAll_CheckedChanged(object sender, EventArgs e)
+ {
+ checkFixOds();
+ }
+ ///
+ /// effettua fix dell'ods
+ ///
+ private void checkFixOds()
+ {
+ if (chkShowAll.Checked)
+ {
+ ods.SelectMethod = "getNonAppr";
+ }
+ else
+ {
+ ods.SelectMethod = "getNonApprByDip";
+ }
+ grView.DataBind();
+ }
+ ///
+ /// 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;
+ grView.DataBind();
+ }
+ ///
+ /// sistemo post eliminazione
+ ///
+ ///
+ ///
+ protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
+ {
+ chkShowAll.Checked = true;
+ checkFixOds();
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_mancTimb.ascx.designer.cs b/GPW/WebUserControls/mod_mancTimb.ascx.designer.cs
new file mode 100644
index 0000000..a6a4193
--- /dev/null
+++ b/GPW/WebUserControls/mod_mancTimb.ascx.designer.cs
@@ -0,0 +1,132 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_mancTimb {
+
+ ///
+ /// rblEntrata control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RadioButtonList rblEntrata;
+
+ ///
+ /// ddlData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlData;
+
+ ///
+ /// odsDateValide control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsDateValide;
+
+ ///
+ /// ddlOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlOra;
+
+ ///
+ /// odsOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsOra;
+
+ ///
+ /// ddlMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlMin;
+
+ ///
+ /// odsMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsMin;
+
+ ///
+ /// btnRichMT control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRichMT;
+
+ ///
+ /// hlMancateTimbr control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink hlMancateTimbr;
+
+ ///
+ /// 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;
+
+ ///
+ /// 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;
+
+ ///
+ /// chkShowAll control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox chkShowAll;
+ }
+}
diff --git a/GPW/WebUserControls/mod_menuBottom.ascx b/GPW/WebUserControls/mod_menuBottom.ascx
new file mode 100644
index 0000000..f4cdcc1
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuBottom.ascx
@@ -0,0 +1,24 @@
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_menuBottom" CodeBehind="mod_menuBottom.ascx.cs" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+ -
+
+ © 2006-<%: DateTime.Now.Year %>
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_menuBottom.ascx.cs b/GPW/WebUserControls/mod_menuBottom.ascx.cs
new file mode 100644
index 0000000..214b6ae
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuBottom.ascx.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using SteamWare;
+using GPW_data;
+
+public partial class mod_menuBottom : System.Web.UI.UserControl
+{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // sistemo le stringhe...
+ //lblApp.Text = string.Format("
{0} v.{1}.{2}", ConfigurationManager.AppSettings.Get("appName"), ConfigurationManager.AppSettings.Get("mainRev"), ConfigurationManager.AppSettings.Get("minRev"));
+ lblApp.Text = string.Format("
{0} v.{1}", ConfigurationManager.AppSettings.Get("appName"), System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
+
+ lblCopyRight.Text = string.Format("
{0}", ConfigurationManager.AppSettings.Get("copyRight"));
+ string postazione_IP = Request.UserHostName;
+ lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss");
+ lblInfo.Text = "";
+ try
+ {
+ lblInfo.Text += string.Format("{0}", dnsUtils.DetermineCompName(postazione_IP));
+ }
+ catch
+ { }
+ try
+ {
+ lblInfo.Text += string.Format(" ({0})", postazione_IP);
+ }
+ catch
+ { }
+ if (licenzeGPW.checkLicenze)
+ {
+ pnlCheck.CssClass = "btnVerdeGrad ui-corner-all shadowBox";
+ }
+ else
+ {
+ pnlCheck.CssClass = "btnRossoGrad ui-corner-all shadowBox";
+ lblWarning.Text = "Attenzione: numero licenze superato! MR attiva.";
+ lblWarning.Visible = true;
+ }
+ }
+}
diff --git a/GPW/WebUserControls/mod_menuBottom.ascx.designer.cs b/GPW/WebUserControls/mod_menuBottom.ascx.designer.cs
new file mode 100644
index 0000000..8bf7e10
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuBottom.ascx.designer.cs
@@ -0,0 +1,85 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+public partial class mod_menuBottom {
+
+ ///
+ /// pnlCheck control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlCheck;
+
+ ///
+ /// lblDateTime control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDateTime;
+
+ ///
+ /// lblInfo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblInfo;
+
+ ///
+ /// hlInfo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink hlInfo;
+
+ ///
+ /// lblApp control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblApp;
+
+ ///
+ /// lblrev control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblrev;
+
+ ///
+ /// lblCopyRight control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblCopyRight;
+
+ ///
+ /// lblWarning control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWarning;
+}
diff --git a/GPW/WebUserControls/mod_menuBottomFullBCode.ascx b/GPW/WebUserControls/mod_menuBottomFullBCode.ascx
new file mode 100644
index 0000000..1e464c9
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuBottomFullBCode.ascx
@@ -0,0 +1,23 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_menuBottomFullBCode.ascx.cs" Inherits="GPW.WebUserControls.mod_menuBottomFullBCode" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+ -
+
+ © 2006-<%: DateTime.Now.Year %>
+
+
+
+
diff --git a/GPW/WebUserControls/mod_menuBottomFullBCode.ascx.cs b/GPW/WebUserControls/mod_menuBottomFullBCode.ascx.cs
new file mode 100644
index 0000000..19149e4
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuBottomFullBCode.ascx.cs
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+using System.Configuration;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_menuBottomFullBCode : System.Web.UI.UserControl
+ {
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ contatorePag = 0;
+ // sistemo le stringhe...
+ //lblApp.Text = string.Format("
{0} v.{1}.{2}", ConfigurationManager.AppSettings.Get("appName"), ConfigurationManager.AppSettings.Get("mainRev"), ConfigurationManager.AppSettings.Get("minRev"));
+ lblApp.Text = string.Format("
{0} v.{1}", ConfigurationManager.AppSettings.Get("appName"), System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
+ lblCopyRight.Text = string.Format("
{0}", ConfigurationManager.AppSettings.Get("copyRight"));
+ setClock();
+ setTimer();
+ }
+ if (licenzeGPW.checkLicenze)
+ {
+ pnlCheck.CssClass = "btnVerdeGrad ui-corner-all shadowBox";
+ }
+ else
+ {
+ pnlCheck.CssClass = "btnRossoGrad ui-corner-all shadowBox";
+ //lblWarning.Text = "Attenzione: numero licenze superato! MR attiva.";
+ lblWarning.Visible = true;
+ }
+ }
+ ///
+ /// imposta il tempo di scadenza del timer x il refresh della pagina per refresh orario mostrato
+ ///
+ private void setTimer()
+ {
+ Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdateFooter_ms");
+ }
+ protected void Timer1_Tick(object sender, EventArgs e)
+ {
+ setClock();
+ }
+ protected int contatorePag
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj("numChiamatePaginaBCode");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("numChiamatePaginaBCode", value);
+ }
+ }
+ private void setClock()
+ {
+ // controllo numero di "ri-chiamate": ogni tot (std = 100, 100sec di default quindi) ricarico pagina
+ if (contatorePag < memLayer.ML.confReadInt("maxRefreshToReload"))
+ {
+ contatorePag++;
+ }
+ else
+ {
+ contatorePag = 0;
+ Response.Redirect("Barcode.aspx");
+ }
+
+ string postazione_IP = Request.UserHostName;
+ lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss");
+ lblInfo.Text = "";
+ try
+ {
+ lblInfo.Text += string.Format("{0}", dnsUtils.DetermineCompName(postazione_IP));
+ }
+ catch
+ { }
+ try
+ {
+ lblInfo.Text += string.Format(" ({0})", postazione_IP);
+ }
+ catch
+ { }
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_menuBottomFullBCode.ascx.designer.cs b/GPW/WebUserControls/mod_menuBottomFullBCode.ascx.designer.cs
new file mode 100644
index 0000000..59bcbc5
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuBottomFullBCode.ascx.designer.cs
@@ -0,0 +1,96 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_menuBottomFullBCode {
+
+ ///
+ /// pnlCheck control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlCheck;
+
+ ///
+ /// lblDateTime control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDateTime;
+
+ ///
+ /// lblInfo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblInfo;
+
+ ///
+ /// hlInfo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink hlInfo;
+
+ ///
+ /// lblApp control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblApp;
+
+ ///
+ /// lblrev control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblrev;
+
+ ///
+ /// lblCopyRight control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblCopyRight;
+
+ ///
+ /// lblWarning control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWarning;
+
+ ///
+ /// Timer1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.Timer Timer1;
+ }
+}
diff --git a/GPW/WebUserControls/mod_menuBottomFullpage.ascx b/GPW/WebUserControls/mod_menuBottomFullpage.ascx
new file mode 100644
index 0000000..4431f08
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuBottomFullpage.ascx
@@ -0,0 +1,26 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_menuBottomFullpage.ascx.cs" Inherits="GPW.WebUserControls.mod_menuBottomFullpage" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+ -
+
+ © 2006-<%: DateTime.Now.Year %>
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_menuBottomFullpage.ascx.cs b/GPW/WebUserControls/mod_menuBottomFullpage.ascx.cs
new file mode 100644
index 0000000..45c620c
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuBottomFullpage.ascx.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_menuBottomFullpage : System.Web.UI.UserControl
+ {
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // sistemo le stringhe...
+ //lblApp.Text = string.Format("
{0} v.{1}.{2}", ConfigurationManager.AppSettings.Get("appName"), ConfigurationManager.AppSettings.Get("mainRev"), ConfigurationManager.AppSettings.Get("minRev"));
+ lblApp.Text = string.Format("
{0} v.{1}", ConfigurationManager.AppSettings.Get("appName"), System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
+ lblCopyRight.Text = string.Format("
{0}", ConfigurationManager.AppSettings.Get("copyRight"));
+ setTimer();
+ setClock();
+ if (licenzeGPW.checkLicenze)
+ {
+ pnlCheck.CssClass = "btnVerdeGrad ui-corner-all shadowBox";
+ }
+ else
+ {
+ pnlCheck.CssClass = "btnRossoGrad ui-corner-all shadowBox";
+ lblWarning.Text = "Attenzione: numero licenze superato! MR attiva.";
+ lblWarning.Visible = true;
+ }
+ }
+ ///
+ /// imposta il tempo di scadenza del timer x il refresh della pagina per refresh orario mostrato
+ ///
+ private void setTimer()
+ {
+ Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdatePagina_ms");
+ }
+ protected void Timer1_Tick(object sender, EventArgs e)
+ {
+ setClock();
+ }
+
+ private void setClock()
+ {
+ string postazione_IP = Request.UserHostName;
+ lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss");
+ lblInfo.Text = "";
+ try
+ {
+ lblInfo.Text += string.Format("{0}", dnsUtils.DetermineCompName(postazione_IP));
+ }
+ catch
+ { }
+ try
+ {
+ lblInfo.Text += string.Format(" ({0})", postazione_IP);
+ }
+ catch
+ { }
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_menuBottomFullpage.ascx.designer.cs b/GPW/WebUserControls/mod_menuBottomFullpage.ascx.designer.cs
new file mode 100644
index 0000000..695115a
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuBottomFullpage.ascx.designer.cs
@@ -0,0 +1,96 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_menuBottomFullpage {
+
+ ///
+ /// pnlCheck control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlCheck;
+
+ ///
+ /// lblDateTime control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDateTime;
+
+ ///
+ /// lblInfo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblInfo;
+
+ ///
+ /// hlInfo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink hlInfo;
+
+ ///
+ /// lblApp control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblApp;
+
+ ///
+ /// lblrev control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblrev;
+
+ ///
+ /// lblCopyRight control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblCopyRight;
+
+ ///
+ /// lblWarning control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWarning;
+
+ ///
+ /// Timer1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.Timer Timer1;
+ }
+}
diff --git a/GPW/WebUserControls/mod_menuSx.ascx b/GPW/WebUserControls/mod_menuSx.ascx
new file mode 100644
index 0000000..2a8ad87
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuSx.ascx
@@ -0,0 +1,20 @@
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_menuSx" Codebehind="mod_menuSx.ascx.cs" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_menuSx.ascx.cs b/GPW/WebUserControls/mod_menuSx.ascx.cs
new file mode 100644
index 0000000..2c68b98
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuSx.ascx.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using SteamWare;
+
+public partial class mod_menuSx : ApplicationUserControl
+{
+ ///
+ /// stringa da pre-mettere all'URL x corretta generazione
+ ///
+ public string preUrlString
+ {
+ set
+ {
+ memLayer.ML.setSessionVal("preUrlString", value);
+ }
+ get
+ {
+ return memLayer.ML.StringSessionObj("preUrlString");
+ }
+ }
+
+ protected override void aggiornaControlliDataGL()
+ {
+ // se l'utente c'è...
+ if (user_std.UtSn.isAuth && !Page.IsPostBack)
+ {
+ updateTreeMenu();
+ }
+ }
+ ///
+ /// aggiornamento del menù
+ ///
+ private void updateTreeMenu()
+ {
+ fixPreMenuString();
+ // sostituisco stringa "url="~/ la stringa pre richiesta
+ XmlDataSource1.Data = user_std.UtSn.mappaSito.Replace("url=\"~/", string.Format("url=\"~/{0}/", preUrlString));
+ XmlDataSource1.XPath = "mainMenu/menu";
+ XmlDataSource1.DataBind();
+ }
+ ///
+ /// sistema stringa pre del menù
+ ///
+ private void fixPreMenuString()
+ {
+ // controllo url
+ Uri MyUrl = Request.Url;
+ // aggiorno carattere pre del menù!
+ string delimStr = "/";
+ char[] delimiter = delimStr.ToCharArray();
+ string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
+ int n = finalUrl.Length;
+ if (n >= 2)
+ {
+ preUrlString = finalUrl[n - 2].ToString();
+ }
+ }
+ ///
+ /// forza l'update del menù sx
+ ///
+ public void forzaUpdateMenu()
+ {
+ user_std.UtSn.ricaricaMappaSito();
+ updateTreeMenu();
+ }
+}
diff --git a/GPW/WebUserControls/mod_menuSx.ascx.designer.cs b/GPW/WebUserControls/mod_menuSx.ascx.designer.cs
new file mode 100644
index 0000000..92ed365
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuSx.ascx.designer.cs
@@ -0,0 +1,40 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+public partial class mod_menuSx {
+
+ ///
+ /// pnlTree control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlTree;
+
+ ///
+ /// tvMenuSx control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TreeView tvMenuSx;
+
+ ///
+ /// XmlDataSource1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.XmlDataSource XmlDataSource1;
+}
diff --git a/GPW/WebUserControls/mod_menuTop.ascx b/GPW/WebUserControls/mod_menuTop.ascx
new file mode 100644
index 0000000..5ab0142
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuTop.ascx
@@ -0,0 +1,34 @@
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_menuTop" CodeBehind="mod_menuTop.ascx.cs" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
diff --git a/GPW/WebUserControls/mod_menuTop.ascx.cs b/GPW/WebUserControls/mod_menuTop.ascx.cs
new file mode 100644
index 0000000..8ff6694
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuTop.ascx.cs
@@ -0,0 +1,152 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.Collections.Generic;
+using SteamWare;
+
+public partial class mod_menuTop : ApplicationUserControl
+{
+ private string _titleString;
+
+ #region gestione eventi
+
+ public event EventHandler eh_toggleMenuSx;
+ public event EventHandler eh_reqUpdateMenu;
+
+ #endregion
+
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ base.Page_Load(sender, e);
+ btnLogOut.Visible = user_std.UtSn.isForcedUser;
+ if(memLayer.ML.isInSessionObject("doUpdateNow"))
+ {
+ doFullDataUpdate();
+ memLayer.ML.emptySessionVal("doUpdateNow");
+ }
+ }
+
+ protected void btnLogOut_Click(object sender, EventArgs e)
+ {
+ Session.Abandon();
+ Response.Redirect("forceUser.aspx");
+ }
+ protected void btnUpdate_Click(object sender, EventArgs e)
+ {
+ doFullDataUpdate();
+ }
+
+ private void doFullDataUpdate()
+ {
+ // salvo i dati attuali...
+ string cod_cdc = SteamWare.memLayer.ML.StringSessionObj("valRicercaCdC");
+ string lingua = user_std.UtSn.lingua;
+ string USER_NAME = SteamWare.memLayer.ML.StringSessionObj("USER_NAME");
+ string DOMINIO = SteamWare.memLayer.ML.StringSessionObj("DOMINIO");
+ bool isForceUser = user_std.UtSn.isForcedUser;
+ // salvo i valori delle tab in session...
+ Dictionary
sessionParam = SteamWare.memLayer.ML.valSess2SurvUpd;
+
+ // svuoto session e cache per rileggere i dati da Db
+ Session.RemoveAll();
+
+ SteamWare.memLayer.ML.flushRegisteredCache();
+
+ // rimemorizzo
+ SteamWare.memLayer.ML.setSessionVal("valRicercaCdC", cod_cdc);
+ user_std.UtSn.startUpUtente(DOMINIO, USER_NAME);
+ user_std.UtSn.lingua = lingua;
+ user_std.UtSn.isForcedUser = isForceUser;
+ DataWrap.DW.resetVocabolario();
+
+ // risalvo in session i valori...
+ foreach (KeyValuePair kvp in sessionParam)
+ {
+ SteamWare.memLayer.ML.setSessionVal(kvp.Key, kvp.Value, true);
+ }
+
+ // cambio visibilità del menù laterale...
+ if (eh_reqUpdateMenu != null)
+ {
+ eh_reqUpdateMenu(this, new EventArgs());
+ }
+
+ Response.Redirect(_paginaCorrente);
+ }
+
+ protected override void loadSessionData()
+ {
+ base.loadSessionData();
+ _titleString = SteamWare.memLayer.ML.StringSessionObj("_titleString");
+ }
+
+ protected override void bindControlli()
+ {
+ if (!Page.IsPostBack)
+ {
+ lnkHelp.ToolTip = traduci("ApriManualeHelp");
+ // solo se user è auth...
+ if (user_std.UtSn.isAuth)
+ {
+ lnkShowHide.Text = user_std.UtSn.Traduci("lnkShowHide");
+ lblTitle.Text = user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("titleApp"));
+ if (_titleString != "")
+ {
+ // traduzione di tutti i termini
+ lblMessUtente.Text = user_std.UtSn.Traduci(_titleString);
+ //doppio in english!
+ _titleString = "";
+ Session["_titleString"] = _titleString;
+ Session["SessionUpdateMenu"] = true;
+ }
+ else
+ {
+ string titolo = user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("welcomeApp"));
+ lblMessUtente.Text = string.Format("{0} - {1}", titolo, memLayer.ML.confReadString("SiteName"));
+ Session["SessionUpdateMenu"] = false;
+ }
+ btnLogOut.Text = user_std.UtSn.Traduci("LogOut");
+ btnUpdate.Text = user_std.UtSn.Traduci("Update");
+ lblUser.Text = String.Format("{0}: {1}", user_std.UtSn.Traduci("User"), user_std.UtSn.CognomeNome);
+ setTimer();
+ setClock();
+ }
+ }
+ }
+ ///
+ /// imposta il tempo di scadenza del timer x il refresh della pagina (della parte top) per evitare che la sessione sul server scada
+ ///
+ private void setTimer()
+ {
+ Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdatePagina_ms");
+ }
+ protected void lnkShowHide_Click(object sender, EventArgs e)
+ {
+ // cambio visibilità del menù laterale...
+ if (eh_toggleMenuSx != null)
+ {
+ eh_toggleMenuSx(this, new EventArgs());
+ }
+
+ }
+ protected void Timer1_Tick(object sender, EventArgs e)
+ {
+ setClock();
+ }
+
+ private void setClock()
+ {
+ lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss");
+ }
+ protected void lblUser_Click(object sender, EventArgs e)
+ {
+ Response.Redirect("./chLang.aspx");
+ }
+}
diff --git a/GPW/WebUserControls/mod_menuTop.ascx.designer.cs b/GPW/WebUserControls/mod_menuTop.ascx.designer.cs
new file mode 100644
index 0000000..683a2c3
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuTop.ascx.designer.cs
@@ -0,0 +1,103 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+public partial class mod_menuTop {
+
+ ///
+ /// Timer1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.Timer Timer1;
+
+ ///
+ /// btnLogOut control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton btnLogOut;
+
+ ///
+ /// btnUpdate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton btnUpdate;
+
+ ///
+ /// lblDateTime control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDateTime;
+
+ ///
+ /// lnkHelp control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink lnkHelp;
+
+ ///
+ /// imgHelp control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image imgHelp;
+
+ ///
+ /// lblTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTitle;
+
+ ///
+ /// lnkShowHide control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lnkShowHide;
+
+ ///
+ /// lblUser control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lblUser;
+
+ ///
+ /// lblMessUtente control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblMessUtente;
+}
diff --git a/GPW/WebUserControls/mod_menuTopFull.ascx b/GPW/WebUserControls/mod_menuTopFull.ascx
new file mode 100644
index 0000000..cb8cf9e
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuTopFull.ascx
@@ -0,0 +1,38 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_menuTopFull.ascx.cs" Inherits="GPW.WebUserControls.mod_menuTopFull" %>
+<%@ Register src="mod_reportUtenteAD.ascx" tagname="mod_reportUtenteAD" tagprefix="uc1" %>
+<% if (false)
+ { %>
+
+<% } %>
+
diff --git a/GPW/WebUserControls/mod_menuTopFull.ascx.cs b/GPW/WebUserControls/mod_menuTopFull.ascx.cs
new file mode 100644
index 0000000..4fca9aa
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuTopFull.ascx.cs
@@ -0,0 +1,111 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_menuTopFull : System.Web.UI.UserControl
+ {
+ ///
+ /// caricamento pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ checkUser();
+ setMenuData();
+ }
+ ///
+ /// titolo pagina
+ ///
+ public string titolo
+ {
+ get
+ {
+ return lblCurrentPage.Text;
+ }
+ set
+ {
+ lblCurrentPage.Text = value;
+ }
+ }
+ ///
+ /// url per ritorno a pagina precedente
+ ///
+ public string returnUrl
+ {
+ set
+ {
+ if (value != "")
+ {
+ memLayer.ML.setSessionVal("returnUrl", value);
+ imgReturn.Visible = true;
+ }
+ }
+ }
+ ///
+ /// verifica ci sia user in sessione...
+ ///
+ private void checkUser()
+ {
+ if (user_std.UtSn.CognomeNome == "")
+ {
+ // fix
+ memLayer.ML.setSessionVal("preUrlString", "A4", true);
+ memLayer.ML.setSessionVal("nextPage", "commesseUtente.aspx");
+ Response.Redirect("login.aspx");
+ }
+ else
+ {
+ // ricavo e salvo idxDipendente
+ int idxDip = -1;
+ try
+ {
+ idxDip = DataProxy.DP.taDipendenti.getByUserDominio(user_std.UtSn.dominio, user_std.UtSn.utente)[0].idxDipendente;
+ }
+ catch
+ {
+ // loggo!
+ logger.lg.scriviLog(string.Format("Errore dipendente non trovato:{0}dominio\\utente: {1}\\{2}", Environment.NewLine, user_std.UtSn.dominio, user_std.UtSn.utente), tipoLog.STARTUP);
+ }
+ DataProxy.idxDipendente = idxDip;
+ }
+ }
+ ///
+ /// imposta valori mostrati
+ ///
+ private void setMenuData()
+ {
+ string postazione_IP = Request.UserHostName;
+ lblUtente.Text = user_std.UtSn.CognomeNome;
+ lblPostazione.Text = "";
+ try
+ {
+ lblPostazione.Text += string.Format("{0}", dnsUtils.DetermineCompName(postazione_IP));
+ }
+ catch
+ { }
+ try
+ {
+ lblPostazione.Text += string.Format(" ({0})", postazione_IP);
+ }
+ catch
+ { }
+ }
+ ///
+ /// rimanda a pagina precedente
+ ///
+ ///
+ ///
+ protected void imgReturn_Click(object sender, ImageClickEventArgs e)
+ {
+ Response.Redirect(memLayer.ML.StringSessionObj("returnUrl"));
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_menuTopFull.ascx.designer.cs b/GPW/WebUserControls/mod_menuTopFull.ascx.designer.cs
new file mode 100644
index 0000000..cd4c4e0
--- /dev/null
+++ b/GPW/WebUserControls/mod_menuTopFull.ascx.designer.cs
@@ -0,0 +1,69 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_menuTopFull {
+
+ ///
+ /// lblPostazione control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPostazione;
+
+ ///
+ /// lblUtente control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblUtente;
+
+ ///
+ /// imgReturn control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ImageButton imgReturn;
+
+ ///
+ /// lblCurrentPage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblCurrentPage;
+
+ ///
+ /// updtTop control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdateProgress updtTop;
+
+ ///
+ /// mod_reportUtenteAD1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_reportUtenteAD mod_reportUtenteAD1;
+ }
+}
diff --git a/GPW/WebUserControls/mod_pageSize.ascx b/GPW/WebUserControls/mod_pageSize.ascx
new file mode 100644
index 0000000..596f667
--- /dev/null
+++ b/GPW/WebUserControls/mod_pageSize.ascx
@@ -0,0 +1,6 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_pageSize.ascx.cs" Inherits="GPW.WebUserControls.mod_pageSize" %>
+
+
+
diff --git a/GPW/WebUserControls/mod_pageSize.ascx.cs b/GPW/WebUserControls/mod_pageSize.ascx.cs
new file mode 100644
index 0000000..bb98515
--- /dev/null
+++ b/GPW/WebUserControls/mod_pageSize.ascx.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_pageSize : System.Web.UI.UserControl
+ {
+
+ public event EventHandler eh_nuovaSize;
+ ///
+ /// dim pagina gridView
+ ///
+ protected int pageSize
+ {
+ get
+ {
+ int answ = 20;
+ try
+ {
+ answ = SteamWare.memLayer.ML.IntSessionObj("pageSize");
+ if (answ <= 0) answ = 20;
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ SteamWare.memLayer.ML.setSessionVal("pageSize", value, true);
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ ddlPageSize.SelectedValue = pageSize.ToString(); ;
+ }
+ }
+ ///
+ /// cambio page size!
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // salvo pageSize desiderata
+ SteamWare.memLayer.ML.setSessionVal("pageSize", ddlPageSize.SelectedValue);
+ // raise dell'evento
+ if (eh_nuovaSize != null)
+ {
+ eh_nuovaSize(this, new EventArgs());
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_pageSize.ascx.designer.cs b/GPW/WebUserControls/mod_pageSize.ascx.designer.cs
new file mode 100644
index 0000000..f4f0cbd
--- /dev/null
+++ b/GPW/WebUserControls/mod_pageSize.ascx.designer.cs
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_pageSize {
+
+ ///
+ /// ddlPageSize control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlPageSize;
+
+ ///
+ /// odsPageSize control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsPageSize;
+ }
+}
diff --git a/GPW/WebUserControls/mod_pageTitleAndSearch.ascx b/GPW/WebUserControls/mod_pageTitleAndSearch.ascx
new file mode 100644
index 0000000..e2c6dc6
--- /dev/null
+++ b/GPW/WebUserControls/mod_pageTitleAndSearch.ascx
@@ -0,0 +1,28 @@
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_pageTitleAndSearch" CodeBehind="mod_pageTitleAndSearch.ascx.cs" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+ |
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
diff --git a/GPW/WebUserControls/mod_pageTitleAndSearch.ascx.cs b/GPW/WebUserControls/mod_pageTitleAndSearch.ascx.cs
new file mode 100644
index 0000000..d3768a1
--- /dev/null
+++ b/GPW/WebUserControls/mod_pageTitleAndSearch.ascx.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using SteamWare;
+
+public partial class mod_pageTitleAndSearch : ApplicationUserControl
+{
+ #region area protected
+
+ protected string _titolo;
+ protected override void traduciObj()
+ {
+ DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", _paginaCorrente))[0];
+ _titolo = riga.NOME;
+ lblTitolo.Text = traduci(_titolo);
+ }
+
+
+ #endregion
+
+}
diff --git a/GPW/WebUserControls/mod_pageTitleAndSearch.ascx.designer.cs b/GPW/WebUserControls/mod_pageTitleAndSearch.ascx.designer.cs
new file mode 100644
index 0000000..93ee5b4
--- /dev/null
+++ b/GPW/WebUserControls/mod_pageTitleAndSearch.ascx.designer.cs
@@ -0,0 +1,31 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+public partial class mod_pageTitleAndSearch {
+
+ ///
+ /// lblTitolo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTitolo;
+
+ ///
+ /// updtRicerca control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdateProgress updtRicerca;
+}
diff --git a/GPW/WebUserControls/mod_periodoAnalisi.ascx b/GPW/WebUserControls/mod_periodoAnalisi.ascx
new file mode 100644
index 0000000..565495f
--- /dev/null
+++ b/GPW/WebUserControls/mod_periodoAnalisi.ascx
@@ -0,0 +1,94 @@
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_periodoAnalisi" CodeBehind="mod_periodoAnalisi.ascx.cs" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+
+
+ |
+
+
+
+ 00
+ 01
+ 02
+ 03
+ 04
+ 05
+ 06
+ 07
+ 08
+ 09
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+
+
+
+ →
+
+
+ 00
+ 01
+ 02
+ 03
+ 04
+ 05
+ 06
+ 07
+ 08
+ 09
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+
+
+
+
+ selezione
+ oggi
+ ieri
+ questa settimana
+ ultimi 7gg
+ questo mese
+ mese precedente
+ ultimi 30gg
+ questo anno
+ 1 anno
+
+
+
+ |
+
+
+
+
+ |
+
+
diff --git a/GPW/WebUserControls/mod_periodoAnalisi.ascx.cs b/GPW/WebUserControls/mod_periodoAnalisi.ascx.cs
new file mode 100644
index 0000000..9914db2
--- /dev/null
+++ b/GPW/WebUserControls/mod_periodoAnalisi.ascx.cs
@@ -0,0 +1,357 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using SteamWare;
+
+
+public partial class mod_periodoAnalisi : System.Web.UI.UserControl
+{
+ #region area protected
+
+ protected intervalloDate _intervallo;
+
+ public string uid
+ {
+ get
+ {
+ return this.UniqueID.Replace("$", "_").Replace("-", "_");
+ }
+ }
+
+ ///
+ /// avvio componente
+ ///
+ ///
+ protected override void OnInit(EventArgs e)
+ {
+ base.OnInit(e);
+ setIntervallo();
+ setDurataMin();
+ }
+ ///
+ /// definisce se sia da mostrare il selettore delle ore nel controllo
+ ///
+ protected bool mostraSelOra
+ {
+ get
+ {
+ bool answ = false;
+ if (memLayer.ML.isInSessionObject("mostraSelOra"))
+ {
+ answ = memLayer.ML.BoolSessionObj("mostraSelOra");
+ }
+ else
+ {
+ // leggo da sessione e salvo...
+ try
+ {
+ answ = memLayer.ML.confReadBool("mostraSelOra");
+ }
+ catch
+ { }
+ memLayer.ML.setSessionVal("mostraSelOra", answ);
+ }
+ return answ;
+ }
+ }
+
+ ///
+ /// gestione del selettore rapido dell'intervallo temporale...
+ ///
+ ///
+ ///
+ protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // verifico cosa sia cambiato ed imposto date...
+ datario _datario = new datario();
+ switch (DropDownList1.SelectedValue)
+ {
+ case "oggi":
+ _intervallo = _datario.giornata(DateTime.Now);
+ break;
+ case "ieri":
+ _intervallo = _datario.giornata(DateTime.Now.AddDays(-1));
+ break;
+ case "ultimi 7gg":
+ _intervallo = _datario.ultimiGiorni(DateTime.Now, 7);
+ break;
+ case "questa settimana":
+ _intervallo = _datario.questaSett(DateTime.Now);
+ break;
+ case "ultimi 30gg":
+ _intervallo = _datario.ultimiGiorni(DateTime.Now, 30);
+ break;
+ case "questo mese":
+ _intervallo = _datario.questoMese(DateTime.Now);
+ break;
+ case "mese precedente":
+ _intervallo = _datario.mesePrecedente(DateTime.Now);
+ break;
+ case "questo anno":
+ _intervallo = _datario.estremiAnno(DateTime.Now);
+ break;
+ case "1 anno":
+ _intervallo = _datario.ultimiGiorni(DateTime.Now, 366);
+ break;
+ default:
+ break;
+ }
+ if ((intervalloAnalisi.inizio != _intervallo.inizio) || (intervalloAnalisi.fine != _intervallo.fine))
+ {
+ verificaCoerenzaDate();
+ aggiornaDateMostrate(realtimeUpdate);
+ // mostro btn update
+ btnUpdate.Visible = !realtimeUpdate;
+ }
+ }
+ ///
+ /// effettua update delle date mostrate da intervallo analisi (ed eventualmente riporta update...)
+ ///
+ ///
+ private void aggiornaDateMostrate(bool doReportUpdate)
+ {
+ scriviDate();
+ if (doReportUpdate)
+ {
+ reportUpdate();
+ }
+ }
+ ///
+ /// scrive nuove date in controllo
+ ///
+ private void scriviDate()
+ {
+ // se intervallo non è valorizzato leggo da sessione...
+ if (!_intervallo.isValid)
+ {
+ _intervallo = intervalloAnalisi;
+ }
+ txtInizio.Text = _intervallo.inizio.ToShortDateString();
+ ddlOraInizio.SelectedValue = _intervallo.inizio.Hour.ToString("00");
+ txtFine.Text = _intervallo.fine.ToShortDateString();
+ ddlOraFine.SelectedValue = _intervallo.fine.Hour.ToString("00");
+ if (mostraSelOra)
+ {
+ ddlOraInizio.Visible = true;
+ ddlOraFine.Visible = true;
+ }
+ else
+ {
+ ddlOraInizio.Visible = false;
+ ddlOraFine.Visible = false;
+ }
+ }
+ ///
+ /// imposta intervallo da sessione o di default
+ ///
+ private void setIntervallo()
+ {
+ intervalloDate _intervallo;
+ try
+ {
+ _intervallo = (intervalloDate)Session["_intervallo"];
+ }
+ catch
+ {
+ _intervallo = new intervalloDate();
+ _intervallo.inizio = DateTime.Now.AddDays(memLayer.ML.confReadInt("defDayFrom"));
+ _intervallo.fine = DateTime.Now.AddDays(1);
+ Session["_intervallo"] = _intervallo;
+ Session["_inizio"] = _intervallo.inizio;
+ Session["_fine"] = _intervallo.fine;
+ }
+ scriviDate();
+ }
+ ///
+ /// imposta durata minima
+ ///
+ private void setDurataMin()
+ {
+ int _durataMin;
+ try
+ {
+ _durataMin = (int)Session["_durataMin"];
+ }
+ catch
+ {
+ _durataMin = 0;
+ Session["_durataMin"] = _durataMin;
+ }
+ txtDurataMin.Text = _durataMin.ToString();
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ lblPeriodo.Text = "Periodo";
+ txtInizio.ToolTip = "inizio periodo di riferimento per i dati mostrati";
+ txtFine.ToolTip = "fine periodo di riferimento per i dati mostrati";
+ lblDurataMin.Text = "Visualizza eventi con durata superiore a";
+ }
+
+
+ private void aggiornaPeriodo()
+ {
+ _intervallo = new intervalloDate();
+ // calcolo tempi arrotondati
+ int oraInizio = 0;
+ int oraFine = 0;
+ if (mostraSelOra)
+ {
+ oraInizio = Convert.ToInt32(ddlOraInizio.SelectedValue);
+ oraFine = Convert.ToInt32(ddlOraFine.SelectedValue);
+ }
+ _intervallo.inizio = Convert.ToDateTime(txtInizio.Text).AddHours(oraInizio);
+ _intervallo.fine = Convert.ToDateTime(txtFine.Text).AddHours(oraFine);
+ verificaCoerenzaDate();
+ int _durataMin;
+ _durataMin = Convert.ToInt32(txtDurataMin.Text);
+ Session["_durataMin"] = _durataMin;
+ reportUpdate();
+
+ }
+ ///
+ /// verifica che le date dell'intervallo siano coerenti (inizio < fine)
+ ///
+ private void verificaCoerenzaDate()
+ {
+ // controllo date siano coerenti (fine > inizio)...
+ if (_intervallo.inizio >= _intervallo.fine)
+ {
+ // controllo non siano date successive ad oggi...
+ if (_intervallo.fine > DateTime.Now)
+ {
+ _intervallo.fine = DateTime.Now;
+ }
+ _intervallo.fine = _intervallo.inizio.AddDays(1);
+ }
+ //intervalloAnalisi = _intervallo;
+ aggiornaDateMostrate(false);
+ }
+ ///
+ /// evento cambio testo data inizio
+ ///
+ ///
+ ///
+ protected void txtInizio_TextChanged(object sender, EventArgs e)
+ {
+ // imposto il selettore a discesa...
+ setPeriodoFree();
+ checkIfUpdate();
+ }
+ ///
+ /// evento cambio testo data fine
+ ///
+ ///
+ ///
+ protected void txtFine_TextChanged(object sender, EventArgs e)
+ {
+ // imposto il selettore a discesa...
+ setPeriodoFree();
+ checkIfUpdate();
+ }
+ ///
+ /// controlla se aggiornare subito o mostrare update (a seconda del valore di realtime update...)
+ ///
+ private void checkIfUpdate()
+ {
+ // se richiesto realtime
+ if (realtimeUpdate)
+ {
+ aggiornaPeriodo();
+ // nascondo btn update
+ btnUpdate.Visible = false;
+ }
+ else
+ {
+ // altrimenti mostro btn update
+ btnUpdate.Visible = true;
+ }
+ }
+ ///
+ /// in questo caso faccio udpate periodo mostrato
+ ///
+ ///
+ ///
+ protected void btnUpdate_Click(object sender, EventArgs e)
+ {
+ aggiornaPeriodo();
+ // nascondo btn update
+ btnUpdate.Visible = false;
+ }
+ ///
+ /// riporta aggiornamento a controller
+ ///
+ protected void reportUpdate()
+ {
+ intervalloAnalisi = _intervallo;
+ // alzo l'evento d update/inserimento e ricarico cache...
+ if (eh_doUpdate != null)
+ {
+ eh_doUpdate(this, new EventArgs());
+ }
+ }
+
+ #endregion
+
+ #region area public
+
+ public intervalloDate intervalloAnalisi
+ {
+ get
+ {
+ return (intervalloDate)Session["_intervallo"];
+ }
+ set
+ {
+ intervalloDate interv = value;
+ Session["_intervallo"] = interv;
+ Session["_inizio"] = interv.inizio;
+ Session["_fine"] = interv.fine;
+ aggiornaDateMostrate(false);
+ }
+ }
+ ///
+ /// effettua update
+ ///
+ ///
+ public void doUpdate(bool doReportUpdate)
+ {
+ aggiornaDateMostrate(doReportUpdate);
+ }
+ ///
+ /// imposta periodo libero di selezione
+ ///
+ public void setPeriodoFree()
+ {
+ DropDownList1.SelectedIndex = 0;
+ }
+ ///
+ /// imposta realtime update (non mostra button am fa subito update)
+ ///
+ public bool realtimeUpdate
+ {
+ get
+ {
+ return memLayer.ML.BoolSessionObj("rltUpdatePeriodo");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("rltUpdatePeriodo", value);
+ }
+ }
+
+ #region gestione eventi
+
+ public event EventHandler eh_doUpdate;
+
+ #endregion
+
+
+ #endregion
+}
diff --git a/GPW/WebUserControls/mod_periodoAnalisi.ascx.designer.cs b/GPW/WebUserControls/mod_periodoAnalisi.ascx.designer.cs
new file mode 100644
index 0000000..160523c
--- /dev/null
+++ b/GPW/WebUserControls/mod_periodoAnalisi.ascx.designer.cs
@@ -0,0 +1,112 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+public partial class mod_periodoAnalisi {
+
+ ///
+ /// lblPeriodo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPeriodo;
+
+ ///
+ /// txtInizio control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtInizio;
+
+ ///
+ /// ddlOraInizio control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlOraInizio;
+
+ ///
+ /// CalendarExtender1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::AjaxControlToolkit.CalendarExtender CalendarExtender1;
+
+ ///
+ /// txtFine control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtFine;
+
+ ///
+ /// ddlOraFine control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlOraFine;
+
+ ///
+ /// CalendarExtender2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::AjaxControlToolkit.CalendarExtender CalendarExtender2;
+
+ ///
+ /// DropDownList1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList DropDownList1;
+
+ ///
+ /// btnUpdate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnUpdate;
+
+ ///
+ /// lblDurataMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDurataMin;
+
+ ///
+ /// txtDurataMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtDurataMin;
+}
diff --git a/GPW/WebUserControls/mod_progetti.ascx b/GPW/WebUserControls/mod_progetti.ascx
new file mode 100644
index 0000000..3dd5159
--- /dev/null
+++ b/GPW/WebUserControls/mod_progetti.ascx
@@ -0,0 +1,90 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_progetti.ascx.cs" Inherits="GPW.WebUserControls.mod_progetti" %>
+<% if (false)
+ { %>
+
+
+
+<% } %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_progetti.ascx.cs b/GPW/WebUserControls/mod_progetti.ascx.cs
new file mode 100644
index 0000000..c0387f2
--- /dev/null
+++ b/GPW/WebUserControls/mod_progetti.ascx.cs
@@ -0,0 +1,113 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_progetti : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ // controllo se devo editare e caricare dati...
+ if (memLayer.ML.isInSessionObject("idxRASel"))
+ {
+ }
+ else
+ {
+ setDefaultPeriod();
+ }
+ }
+ }
+ ///
+ /// imposta periodo di default
+ ///
+ private void setDefaultPeriod()
+ {
+ memLayer.ML.setSessionVal("today", DateTime.Now.ToShortDateString());
+ DateTime adesso = DateTime.Now;
+ txtDataFrom.Text = adesso.ToShortDateString();
+ ddlOraFrom.SelectedValue = adesso.Hour.ToString();
+ ddlMinFrom.SelectedValue = (Math.Floor((double)adesso.Minute / 5) * 5).ToString();
+ txtDataTo.Text = adesso.ToShortDateString();
+ ddlOraTo.SelectedValue = adesso.AddMinutes(memLayer.ML.confReadInt("defRegAttMin")).Hour.ToString();
+ ddlMinTo.SelectedValue = (Math.Floor((double)adesso.AddMinutes(memLayer.ML.confReadInt("defRegAttMin")).Minute / 5) * 5).ToString(); ;
+ }
+ ///
+ /// in caso di selezione (nuovo) progetto
+ ///
+ ///
+ ///
+ protected void ddlProgetto_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // ricarico dati fasi
+ odsFase.DataBind();
+ }
+ ///
+ /// salvo i dati selezionati!
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ int idxFase = 0;
+ DateTime inizio = DateTime.Now;
+ DateTime fine = DateTime.Now;
+ try
+ {
+ idxFase = Convert.ToInt32(ddlFase.SelectedValue);
+ }
+ catch
+ { }
+ try
+ {
+ inizio = Convert.ToDateTime(txtDataFrom.Text).AddHours(Convert.ToInt32(ddlOraFrom.SelectedValue)).AddMinutes(Convert.ToInt32(ddlMinFrom.SelectedValue));
+ }
+ catch
+ { }
+ try
+ {
+ fine = Convert.ToDateTime(txtDataTo.Text).AddHours(Convert.ToInt32(ddlOraTo.SelectedValue)).AddMinutes(Convert.ToInt32(ddlMinTo.SelectedValue));
+ }
+ catch
+ { }
+ DataProxy.DP.taRA.Insert(DataProxy.idxDipendente, idxFase, inizio, fine, txtDescrizione.Text.Trim(), 0);
+ }
+ ///
+ /// sistemo eventuali "headers"
+ ///
+ ///
+ ///
+ protected void ddlFase_DataBound(object sender, EventArgs e)
+ {
+ // cerco eventuali controlli tipo "ancestor" e li disattivo!
+ DropDownList ddlFase_int = (DropDownList)sender;
+ ListItem li = new ListItem();
+ while (li != null)
+ {
+ li = ddlFase_int.Items.FindByValue("0");
+ try
+ {
+ li.Attributes.Add("style", "color:gray;");
+ li.Attributes.Add("disabled", "true");
+ li.Value = "-1";
+ li.Text = string.Format("[ {0} ]", li.Text);
+ }
+ catch
+ { }
+ }
+ try
+ {
+ ddlFase_int.SelectedIndex = 1;
+ }
+ catch
+ { }
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_progetti.ascx.designer.cs b/GPW/WebUserControls/mod_progetti.ascx.designer.cs
new file mode 100644
index 0000000..b9aaaae
--- /dev/null
+++ b/GPW/WebUserControls/mod_progetti.ascx.designer.cs
@@ -0,0 +1,159 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_progetti {
+
+ ///
+ /// ddlProgetto control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlProgetto;
+
+ ///
+ /// odsProgetto control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsProgetto;
+
+ ///
+ /// ddlFase control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlFase;
+
+ ///
+ /// odsFase control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsFase;
+
+ ///
+ /// txtDataFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtDataFrom;
+
+ ///
+ /// ddlOraFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlOraFrom;
+
+ ///
+ /// ddlMinFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlMinFrom;
+
+ ///
+ /// txtDataTo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtDataTo;
+
+ ///
+ /// ddlOraTo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlOraTo;
+
+ ///
+ /// ddlMinTo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlMinTo;
+
+ ///
+ /// txtDescrizione control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtDescrizione;
+
+ ///
+ /// btnSave control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnSave;
+
+ ///
+ /// btnCancel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancel;
+
+ ///
+ /// odsDateValide control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsDateValide;
+
+ ///
+ /// odsOra control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsOra;
+
+ ///
+ /// odsMin control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsMin;
+ }
+}
diff --git a/GPW/WebUserControls/mod_regNewDevice.ascx b/GPW/WebUserControls/mod_regNewDevice.ascx
new file mode 100644
index 0000000..2c1f17a
--- /dev/null
+++ b/GPW/WebUserControls/mod_regNewDevice.ascx
@@ -0,0 +1,17 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_regNewDevice.ascx.cs"
+ Inherits="GPW.WebUserControls.mod_regNewDevice" %>
+<%@ Register Src="mod_enrollByAuthKey.ascx" TagName="mod_enrollByAuthKey" TagPrefix="uc1" %>
+<%@ Register Src="mod_enrollByJumperAuthKey.ascx" TagName="mod_enrollByJumperAuthKey"
+ TagPrefix="uc2" %>
+<%@ Register src="mod_enrollByEmail.ascx" tagname="mod_enrollByEmail" tagprefix="uc3" %>
+
+
+
diff --git a/GPW/WebUserControls/mod_regNewDevice.ascx.cs b/GPW/WebUserControls/mod_regNewDevice.ascx.cs
new file mode 100644
index 0000000..50ba6f1
--- /dev/null
+++ b/GPW/WebUserControls/mod_regNewDevice.ascx.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_regNewDevice : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ /*************************************************************************
+ * REGISTRAZIONE nuovi devices
+ *
+ * ci sono tre modalitÃ
+ * - idxDipendente + authKey (manuale)
+ * - con richiesta reset ed invio authKey (generazione pwd casuale da email dipendente + dataora in MD5, INSERENDO EMAIL e cercando se esista...)
+ * - con "rimbalzo" su ~/jumper.aspx?UserAuthkey={0}&idxDipendente={1}... poi messe in session x cui autosetup
+ *
+ * ***********************************************************************/
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_regNewDevice.ascx.designer.cs b/GPW/WebUserControls/mod_regNewDevice.ascx.designer.cs
new file mode 100644
index 0000000..5db4d0b
--- /dev/null
+++ b/GPW/WebUserControls/mod_regNewDevice.ascx.designer.cs
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_regNewDevice {
+
+ ///
+ /// mod_enrollByAuthKey1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_enrollByAuthKey mod_enrollByAuthKey1;
+
+ ///
+ /// mod_enrollByEmail1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_enrollByEmail mod_enrollByEmail1;
+
+ ///
+ /// mod_enrollByJumperAuthKey1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_enrollByJumperAuthKey mod_enrollByJumperAuthKey1;
+ }
+}
diff --git a/GPW/WebUserControls/mod_reportPrj.ascx b/GPW/WebUserControls/mod_reportPrj.ascx
new file mode 100644
index 0000000..2958c17
--- /dev/null
+++ b/GPW/WebUserControls/mod_reportPrj.ascx
@@ -0,0 +1,34 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_reportPrj.ascx.cs" Inherits="GPW.WebUserControls.mod_reportPrj" %>
+<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
+<%@ Register Src="mod_dateTime.ascx" TagName="mod_dateTime" TagPrefix="uc3" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_reportPrj.ascx.cs b/GPW/WebUserControls/mod_reportPrj.ascx.cs
new file mode 100644
index 0000000..1dcc01e
--- /dev/null
+++ b/GPW/WebUserControls/mod_reportPrj.ascx.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+using System.Globalization;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_reportPrj : System.Web.UI.UserControl
+ {
+ ///
+ /// css completo dell'oggetto
+ ///
+ ///
+ ///
+ public string fullCss(object css)
+ {
+ return string.Format("ui-corner-all shadowBox {0}", css);
+ }
+ ///
+ /// calcola URL completo del report
+ ///
+ ///
+ ///
+ public string fullUrl(object repUrl)
+ {
+ string answ = "";
+ try
+ {
+ answ=string.Format(@"{0}{1}", memLayer.ML.confReadString("reportBaseUrl"), repUrl);
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_reportPrj.ascx.designer.cs b/GPW/WebUserControls/mod_reportPrj.ascx.designer.cs
new file mode 100644
index 0000000..8aabbd6
--- /dev/null
+++ b/GPW/WebUserControls/mod_reportPrj.ascx.designer.cs
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_reportPrj {
+
+ ///
+ /// repReports control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater repReports;
+
+ ///
+ /// odsReports control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsReports;
+ }
+}
diff --git a/GPW/WebUserControls/mod_reportUtenteAD.ascx b/GPW/WebUserControls/mod_reportUtenteAD.ascx
new file mode 100644
index 0000000..746a718
--- /dev/null
+++ b/GPW/WebUserControls/mod_reportUtenteAD.ascx
@@ -0,0 +1,30 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_reportUtenteAD.ascx.cs" Inherits="GPW.WebUserControls.mod_reportUtenteAD" %>
+<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
+<%@ Register Src="mod_dateTime.ascx" TagName="mod_dateTime" TagPrefix="uc3" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_reportUtenteAD.ascx.cs b/GPW/WebUserControls/mod_reportUtenteAD.ascx.cs
new file mode 100644
index 0000000..f6a7f08
--- /dev/null
+++ b/GPW/WebUserControls/mod_reportUtenteAD.ascx.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+using System.Globalization;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_reportUtenteAD : System.Web.UI.UserControl
+ {
+ ///
+ /// css completo dell'oggetto
+ ///
+ ///
+ ///
+ public string fullCss(object css)
+ {
+ return string.Format("ui-corner-all shadowBox {0}Small", css);
+ }
+ ///
+ /// calcola URL completo del report
+ ///
+ ///
+ ///
+ public string fullUrl(object repUrl)
+ {
+ string answ = "";
+ try
+ {
+ answ = string.Format(@"{0}{1}", memLayer.ML.confReadString("reportBaseUrl"), repUrl);
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_reportUtenteAD.ascx.designer.cs b/GPW/WebUserControls/mod_reportUtenteAD.ascx.designer.cs
new file mode 100644
index 0000000..4d32829
--- /dev/null
+++ b/GPW/WebUserControls/mod_reportUtenteAD.ascx.designer.cs
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_reportUtenteAD {
+
+ ///
+ /// repReports control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Repeater repReports;
+
+ ///
+ /// odsReports control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsReports;
+ }
+}
diff --git a/GPW/WebUserControls/mod_resetUserAuthKey.ascx b/GPW/WebUserControls/mod_resetUserAuthKey.ascx
new file mode 100644
index 0000000..342a349
--- /dev/null
+++ b/GPW/WebUserControls/mod_resetUserAuthKey.ascx
@@ -0,0 +1,38 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_resetUserAuthKey.ascx.cs"
+ Inherits="GPW.WebUserControls.mod_resetUserAuthKey" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Spiegazione
+ Questa funzione permette di resettare la AuthKey di un singolo utente in modo che
+ questi possa (re)inserire i devices tra quelli gestiti.
+
+
diff --git a/GPW/WebUserControls/mod_resetUserAuthKey.ascx.cs b/GPW/WebUserControls/mod_resetUserAuthKey.ascx.cs
new file mode 100644
index 0000000..84f26c5
--- /dev/null
+++ b/GPW/WebUserControls/mod_resetUserAuthKey.ascx.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_resetUserAuthKey : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ ///
+ /// salvo nuovo device...
+ ///
+ ///
+ ///
+ protected void btnConferma_Click(object sender, EventArgs e)
+ {
+ // controllo se ho i dati...
+ string UserAuthKey = txtUserAuthKey.Text.Trim();
+ string AuthKey = txtAuthKey.Text.Trim();
+ int idxDip = 0;
+ try
+ {
+ idxDip = Convert.ToInt32(ddlIdxDipendente.SelectedValue);
+ }
+ catch
+ { }
+ // controllo password...
+ if (AuthKey == memLayer.ML.confReadString("authKey"))
+ {
+ // calcolo il secret...
+ string md5UserAuthKey = SteamCrypto.EncryptString(UserAuthKey, "AuthGPW");
+ DataProxy.DP.taDipendenti.stp_Dip_setAuthKey(idxDip, md5UserAuthKey);
+ // mostro esito!
+ lblWarning.Text = string.Format("AuthKey utente {0} aggiornata", idxDip);
+ lblWarning.Visible = true;
+ }
+ else
+ {
+ lblWarning.Text = "Key errata";
+ lblWarning.Visible = true;
+ }
+ }
+ ///
+ /// resetto tutto
+ ///
+ ///
+ ///
+ protected void btnAnnulla_Click(object sender, EventArgs e)
+ {
+ txtAuthKey.Text = "";
+ ddlIdxDipendente.SelectedIndex = 0;
+ txtUserAuthKey.Text = "";
+ lblWarning.Visible = false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_resetUserAuthKey.ascx.designer.cs b/GPW/WebUserControls/mod_resetUserAuthKey.ascx.designer.cs
new file mode 100644
index 0000000..945b20e
--- /dev/null
+++ b/GPW/WebUserControls/mod_resetUserAuthKey.ascx.designer.cs
@@ -0,0 +1,96 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_resetUserAuthKey {
+
+ ///
+ /// ddlIdxDipendente control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlIdxDipendente;
+
+ ///
+ /// odsDipendenti control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsDipendenti;
+
+ ///
+ /// txtUserAuthKey control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtUserAuthKey;
+
+ ///
+ /// rfvUserAuthKey control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvUserAuthKey;
+
+ ///
+ /// txtAuthKey control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtAuthKey;
+
+ ///
+ /// rfvAuthKey control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvAuthKey;
+
+ ///
+ /// lblWarning control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWarning;
+
+ ///
+ /// btnConferma control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnConferma;
+
+ ///
+ /// btnAnnulla control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAnnulla;
+ }
+}
diff --git a/GPW/WebUserControls/mod_reviewTimbrature.ascx b/GPW/WebUserControls/mod_reviewTimbrature.ascx
new file mode 100644
index 0000000..28cf99e
--- /dev/null
+++ b/GPW/WebUserControls/mod_reviewTimbrature.ascx
@@ -0,0 +1,329 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_reviewTimbrature.ascx.cs" Inherits="GPW.WebUserControls.mod_reviewTimbrature" %>
+<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
+<%@ Register Src="mod_elencoTimbr.ascx" TagName="mod_elencoTimbr" TagPrefix="uc3" %>
+<%@ Register Src="mod_commAttivitaDesk.ascx" TagName="mod_commAttivitaDesk" TagPrefix="uc4" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nessun record trovato
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%----%>
+
+
+
+
+
+
+ <%----%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Timbrature e Giustificativi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nessun GIUSTIFICATIVO attivo:
+
+
+
(tipo PERM, editabile)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Record Commesse
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_reviewTimbrature.ascx.cs b/GPW/WebUserControls/mod_reviewTimbrature.ascx.cs
new file mode 100644
index 0000000..8cf2f80
--- /dev/null
+++ b/GPW/WebUserControls/mod_reviewTimbrature.ascx.cs
@@ -0,0 +1,510 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+using System.Globalization;
+using System.Data;
+using System.Drawing;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_reviewTimbrature : System.Web.UI.UserControl
+ {
+
+ ///
+ /// effettua traduzione del lemma
+ ///
+ ///
+ ///
+ public string traduci(string lemma)
+ {
+ return user_std.UtSn.Traduci(lemma);
+ }
+ ///
+ /// caricamento pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ grViewExpl.PageSize = utils.pageSize;
+ if (!Page.IsPostBack)
+ {
+ filtroDip.ods = odsDip;
+ memLayer.ML.emptySessionVal("idxDip_sel");
+ memLayer.ML.setSessionVal("maxErrMin", memLayer.ML.confReadInt("maxErrMin"));
+ memLayer.ML.setSessionVal("maxErrPlus", memLayer.ML.confReadInt("maxErrPlus"));
+ filtroDip.reselFirst();
+ setDetailVisib(false);
+ }
+ filtroDip.eh_selValore += new EventHandler(filtroDip_eh_selValore);
+ mod_elencoTimbr1.eh_nuovoValore += new EventHandler(mod_elencoTimbr1_eh_nuovoValore);
+ }
+ ///
+ /// valore selezionato x dettaglio giornaliero utente
+ ///
+ protected DateTime dataRif
+ {
+ get
+ {
+ DateTime answ = DateTime.Now;
+ try
+ {
+ answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("dataRif", value);
+ }
+ }
+
+ void mod_elencoTimbr1_eh_nuovoValore(object sender, EventArgs e)
+ {
+ checkFixOds();
+ }
+ ///
+ /// seleziono
+ ///
+ ///
+ ///
+ void filtroDip_eh_selValore(object sender, EventArgs e)
+ {
+ // imposto ods
+ grViewExpl.SelectedIndex = -1;
+ setDetailVisib(false);
+ checkFixOds();
+ }
+ ///
+ /// imposto ODS
+ ///
+ private void checkFixOds()
+ {
+ memLayer.ML.setSessionVal("idxDip_sel", filtroDip.valoreInt);
+ grViewExpl.DataBind();
+ mod_elencoTimbr1.doUpdate();
+ }
+ ///
+ /// 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 IdxDipendente
+ {
+ get
+ {
+ int idx = 0;
+ try
+ {
+ idx = memLayer.ML.IntSessionObj("IdxDipendente");
+ }
+ catch
+ { }
+ return idx;
+ }
+ }
+ ///
+ /// inverte valore booleano
+ ///
+ ///
+ ///
+ public bool invBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = !Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// converte valore in booleano
+ ///
+ ///
+ ///
+ public bool toBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// mostro visualizzazione dati di dettaglio!
+ ///
+ ///
+ ///
+ protected void grViewExpl_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ dataRif = Convert.ToDateTime(grViewExpl.SelectedDataKey["dataLav"]).Date;
+ setDetailVisib(true);
+
+ // mostra timbrature
+ memLayer.ML.setSessionVal("inizioDet", dataRif);
+ memLayer.ML.setSessionVal("fineDet", dataRif.AddDays(1));
+ memLayer.ML.setSessionVal("idxDip_det", grViewExpl.SelectedDataKey["idxDipendente"]);
+ mod_elencoTimbr1.doUpdate();
+
+ // mostra commesse
+ memLayer.ML.setSessionVal("idxDipendente", grViewExpl.SelectedDataKey["idxDipendente"]);
+ CultureInfo ita = new CultureInfo("it-IT");
+ mod_commAttivitaDesk1.idxDipCurr = Convert.ToInt32(grViewExpl.SelectedDataKey["idxDipendente"]);
+ mod_commAttivitaDesk1.valoreDateTime = Convert.ToDateTime(dataRif, ita);
+ mod_commAttivitaDesk1.doUpdate();
+
+ grViewExpl.DataBind();
+ }
+ ///
+ /// set visibilità grView dettagli
+ ///
+ ///
+ private void setDetailVisib(bool value)
+ {
+ pnlDettagli.Visible = value;
+ //mod_elencoTimbr1.Visible = value;
+ grViewGiust.Visible = value;
+ }
+ ///
+ /// reset della selezione
+ ///
+ ///
+ ///
+ protected void btnReset_Click(object sender, EventArgs e)
+ {
+ resetSelezione();
+ }
+ ///
+ /// resetta la selezione dei valori in caso di modifiche su altri controlli
+ ///
+ public void resetSelezione()
+ {
+ grViewExpl.SelectedIndex = -1;
+ grViewExpl.DataBind();
+ setDetailVisib(false);
+ }
+ ///
+ /// evento update righe
+ ///
+ ///
+ ///
+ protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
+ {
+ grViewExpl.DataBind();
+ }
+ ///
+ /// evento cancellazione riga
+ ///
+ ///
+ ///
+ protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
+ {
+ grViewExpl.DataBind();
+ }
+ ///
+ ///
+ ///
+ ///
+ ///
+ public string classByNL(object minutiNonLav)
+ {
+ string answ = "";
+ try
+ {
+ if (Convert.ToDouble(minutiNonLav) > 0)
+ {
+ answ = "lblWarning";
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// prepara tooltip permessi/straordinarie
+ ///
+ ///
+ ///
+ ///
+ ///
+ public string tooltipPermStra(object minStra, object minPerm, object minMpp)
+ {
+ string answ = "";
+ try
+ {
+ answ = string.Format("Straordinarie: {0:0.##} min, Permessi: {1:0.##} min", minStra, minPerm);
+ if (Convert.ToInt32(minMpp) > 0)
+ {
+ answ += string.Format(", Pranzo: {0:0.##} min", minMpp);
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+
+ #region editing giustificativi
+
+
+ ///
+ /// resetta la selezione dei valori in caso di modifiche su altri controlli
+ ///
+ public void resetSelezioneGiust()
+ {
+ grViewGiust.SelectedIndex = -1;
+ grViewGiust.DataBind();
+ }
+ ///
+ /// reset della selezione
+ ///
+ ///
+ ///
+ protected void btnResetGiust_Click(object sender, EventArgs e)
+ {
+ resetSelezioneGiust();
+ }
+ ///
+ /// gestione evento richiesta nuovo valore (mostra footer, ...)
+ ///
+ ///
+ ///
+ protected void btnNew_Click(object sender, EventArgs e)
+ {
+ // reset selezione...
+ resetSelezioneGiust();
+
+ int idxDip = memLayer.ML.IntSessionObj("idxDip_det");
+ // calcola ed inserisce giustificativi
+ DataProxy.DP.taGiust.giustInsByDate(idxDip, dataRif, "PERM");
+ updateVisual();
+ }
+ ///
+ /// inserisce nuovo valore da footer
+ ///
+ ///
+ ///
+ protected void lblIns_click(object sender, EventArgs e)
+ {
+ // click su inserimento, chiamo il metodo insert dell'ObjectDataSource
+ odsGiust.Insert();
+ }
+ ///
+ /// annulla inserimento nuovo valore da footer
+ ///
+ ///
+ ///
+ protected void lblCanc_click(object sender, EventArgs e)
+ {
+ // annullo inserimento: nascondo footer, bind controlli...
+ grViewGiust.FooterRow.Visible = false;
+ }
+ ///
+ /// inserisce un giust nuovo x dipendente/data
+ ///
+ ///
+ ///
+ protected void btNewGiust_Click(object sender, EventArgs e)
+ {
+ int idxDip = memLayer.ML.IntSessionObj("idxDip_det");
+ // calcola ed inserisce giustificativi
+ DataProxy.DP.taGiust.giustInsByDate(idxDip, dataRif, "PERM");
+ updateVisual();
+ }
+ ///
+ /// aggiorna i 3 datagrid
+ ///
+ private void updateVisual()
+ {
+ // aggiorno visualizzazioni
+ grViewExpl.DataBind();
+ mod_elencoTimbr1.doUpdate();
+ grViewGiust.DataBind();
+ }
+ ///
+ /// aggiornamento x update
+ ///
+ ///
+ ///
+ protected void odsGiust_Updated(object sender, ObjectDataSourceStatusEventArgs e)
+ {
+ updateVisual();
+ }
+ ///
+ /// aggiornamento x delete
+ ///
+ ///
+ ///
+ protected void odsGiust_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
+ {
+ updateVisual();
+ }
+ ///
+ /// calcola se sia visibile con criterio GREATER THAN ZERO
+ ///
+ ///
+ ///
+ public bool isGTZ(object valore)
+ {
+ bool answ = false;
+ try
+ {
+ if (Convert.ToDouble(valore) > 0)
+ {
+ answ = true;
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+
+ #endregion
+
+ ///
+ /// cambia stato visibilità week-end...
+ ///
+ ///
+ ///
+ protected void chkWE_CheckedChanged(object sender, EventArgs e)
+ {
+ // imposto ods
+ checkFixOds();
+ }
+ ///
+ /// ricalcola giornate periodo visualizzato per i dipendenti selezionati
+ ///
+ ///
+ ///
+ protected void btnRicalcPeriodo_Click(object sender, EventArgs e)
+ {
+ // eseguo la stored di update dato condizione di filtro x periodo e dipendente...
+ DataProxy.DP.taTimbExpl.stp_ricalcolaTimbExpl_byPeriodoUser(memLayer.ML.IntSessionObj("idxDip_sel"), Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio")), Convert.ToDateTime(memLayer.ML.objSessionObj("_fine")));
+ DataProxy.DP.taRA.stp_ricalcolaRegAttivitaExpl_byPeriodoUser(memLayer.ML.IntSessionObj("idxDip_sel"), Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio")), Convert.ToDateTime(memLayer.ML.objSessionObj("_fine")));
+ // aggiorno
+ checkFixOds();
+ }
+ ///
+ /// restituisce il colore data valore ok commessa
+ ///
+ ///
+ ///
+ public Color coloreComm(object okLavCom)
+ {
+ Color answ = Color.Orange;
+ try
+ {
+ if (toBool(okLavCom))
+ {
+ answ = Color.Black;
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// restituisce il colore dato minMpp (se > 0 è verde, altrimenti marrone)
+ ///
+ ///
+ ///
+ public Color coloreMPP(object minMpp)
+ {
+ Color answ = Color.FromName("#995511");
+ try
+ {
+ if (minMpp.ToString()!="0")
+ {
+ answ = Color.FromName("#66AA22");
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// determina se si debba mostrare cognome nome (altrimenti IDX anonimo)
+ ///
+ public bool showCognomeNome
+ {
+ get
+ {
+ return memLayer.ML.confReadBool("reviewShowCN");
+ }
+ }
+ ///
+ /// formatta la durata in ore secondo web.config (centesimale/ore:min)
+ ///
+ ///
+ ///
+ public string formatDurata(object oreCent)
+ {
+ decimal ore = 0;
+ try
+ {
+ ore = Convert.ToDecimal(oreCent);
+ }
+ catch
+ { }
+ string answ = "";
+ if (memLayer.ML.confReadBool("reviewShowOreMin"))
+ {
+ //answ = string.Format("{0}:{1:00}", Math.Floor(ore), Math.Round((ore - Math.Floor(ore)) * 60));
+ answ = utils.formOreMin(ore);
+ }
+ else
+ {
+ answ = ore.ToString("0.00");
+ }
+ return answ;
+ }
+
+ protected void odsGiust_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_reviewTimbrature.ascx.designer.cs b/GPW/WebUserControls/mod_reviewTimbrature.ascx.designer.cs
new file mode 100644
index 0000000..73825d0
--- /dev/null
+++ b/GPW/WebUserControls/mod_reviewTimbrature.ascx.designer.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_reviewTimbrature {
+
+ ///
+ /// 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;
+
+ ///
+ /// chkWE control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox chkWE;
+
+ ///
+ /// btnRicalcPeriodo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRicalcPeriodo;
+
+ ///
+ /// hlExport control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink hlExport;
+
+ ///
+ /// hlExportComm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink hlExportComm;
+
+ ///
+ /// grViewExpl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView grViewExpl;
+
+ ///
+ /// odsExpl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsExpl;
+
+ ///
+ /// pnlDettagli control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlDettagli;
+
+ ///
+ /// mod_elencoTimbr1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_elencoTimbr mod_elencoTimbr1;
+
+ ///
+ /// grViewGiust control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView grViewGiust;
+
+ ///
+ /// odsGiust control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsGiust;
+
+ ///
+ /// odsCodGiust control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsCodGiust;
+
+ ///
+ /// mod_commAttivitaDesk1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::GPW.WebUserControls.mod_commAttivitaDesk mod_commAttivitaDesk1;
+ }
+}
diff --git a/GPW/WebUserControls/mod_ricercaGenerica.ascx b/GPW/WebUserControls/mod_ricercaGenerica.ascx
new file mode 100644
index 0000000..82b16db
--- /dev/null
+++ b/GPW/WebUserControls/mod_ricercaGenerica.ascx
@@ -0,0 +1,9 @@
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_ricercaGenerica" CodeBehind="mod_ricercaGenerica.ascx.cs" %>
+<% if (false)
+ { %>
+
+<% } %>
+
diff --git a/GPW/WebUserControls/mod_ricercaGenerica.ascx.cs b/GPW/WebUserControls/mod_ricercaGenerica.ascx.cs
new file mode 100644
index 0000000..c4917b9
--- /dev/null
+++ b/GPW/WebUserControls/mod_ricercaGenerica.ascx.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using SteamWare;
+
+public partial class mod_ricercaGenerica : ApplicationUserControl
+{
+
+ #region gestione eventi
+
+ public event EventHandler eh_nuovaRicerca;
+
+ #endregion
+
+ # region area protected
+
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ base.Page_Load(sender, e);
+ updateText();
+ btnCerca.Text = traduci("lblCerca");
+ }
+ ///
+ /// cambiato valore in ricerca
+ ///
+ ///
+ ///
+ protected void txtCerca_TextChanged(object sender, EventArgs e)
+ {
+ salvaCerca();
+ }
+ ///
+ /// pressione del button di ricerca
+ ///
+ ///
+ ///
+ protected void btnCerca_Click(object sender, EventArgs e)
+ {
+ salvaCerca();
+ }
+ ///
+ /// testo ricerca trimmato da spazi
+ ///
+ protected string testoRicerca
+ {
+ get
+ {
+ return txtCerca.Text.Trim();
+ }
+ set
+ {
+ txtCerca.Text = value;
+ }
+ }
+ ///
+ /// effettua salvataggio ricerca
+ ///
+ protected void salvaCerca()
+ {
+ if (testoRicerca == "")
+ {
+ SteamWare.memLayer.ML.emptySessionVal("valoreCercato");
+ }
+ else
+ {
+ SteamWare.memLayer.ML.setSessionVal("valoreCercato", testoRicerca);
+ // raise dell'evento
+ if (eh_nuovaRicerca != null)
+ {
+ eh_nuovaRicerca(this, new EventArgs());
+ }
+ }
+ }
+
+ #endregion
+
+ #region area public
+
+ ///
+ /// aggiorna il testo cercato
+ ///
+ public void updateText()
+ {
+ if (SteamWare.memLayer.ML.StringSessionObj("valoreCercato") != "" && !Page.IsPostBack)
+ {
+ testoRicerca = SteamWare.memLayer.ML.StringSessionObj("valoreCercato");
+ }
+ }
+
+ #endregion
+
+}
diff --git a/GPW/WebUserControls/mod_ricercaGenerica.ascx.designer.cs b/GPW/WebUserControls/mod_ricercaGenerica.ascx.designer.cs
new file mode 100644
index 0000000..ad2e73e
--- /dev/null
+++ b/GPW/WebUserControls/mod_ricercaGenerica.ascx.designer.cs
@@ -0,0 +1,31 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+public partial class mod_ricercaGenerica {
+
+ ///
+ /// txtCerca control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtCerca;
+
+ ///
+ /// btnCerca control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCerca;
+}
diff --git a/GPW/WebUserControls/mod_sendAuthToEmail.ascx b/GPW/WebUserControls/mod_sendAuthToEmail.ascx
new file mode 100644
index 0000000..f7d1946
--- /dev/null
+++ b/GPW/WebUserControls/mod_sendAuthToEmail.ascx
@@ -0,0 +1,26 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_sendAuthToEmail.ascx.cs" Inherits="GPW.WebUserControls.mod_sendAuthToEmail" %>
+
+
+
+
+
+
+
+
+
+
+ Spiegazione
+ Questa funzione permette di inviare la AuthKey all'email registrata di un utente in modo che
+ questo possa (re)inserire devices cliccando sull'URL ricevuto.
+
+
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_sendAuthToEmail.ascx.cs b/GPW/WebUserControls/mod_sendAuthToEmail.ascx.cs
new file mode 100644
index 0000000..1cd3e51
--- /dev/null
+++ b/GPW/WebUserControls/mod_sendAuthToEmail.ascx.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_sendAuthToEmail : System.Web.UI.UserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ ///
+ /// salvo nuovo device...
+ ///
+ ///
+ ///
+ protected void btnConferma_Click(object sender, EventArgs e)
+ {
+ // cerco key x user selezionato
+ int idxDipendente = 0;
+ string UserAuthKey = "";
+ string destinatario = "";
+
+ DS_Applicazione.DipendentiRow dipendente = null;
+ try
+ {
+ idxDipendente = Convert.ToInt32(ddlIdxDipendente.SelectedValue);
+ dipendente = DataProxy.DP.taDipendenti.getByIdx(idxDipendente)[0];
+ UserAuthKey = dipendente.authKey;
+ destinatario = dipendente.email;
+ }
+ catch
+ { }
+ // se ho trovato un email...
+ if (destinatario != "" && idxDipendente > 0)
+ {
+ DataProxy.DP.sendUserAuthEmail(destinatario, UserAuthKey, idxDipendente);
+ }
+ }
+ ///
+ /// resetto tutto
+ ///
+ ///
+ ///
+ protected void btnAnnulla_Click(object sender, EventArgs e)
+ {
+ ddlIdxDipendente.SelectedIndex = 0;
+ lblWarning.Visible = false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_sendAuthToEmail.ascx.designer.cs b/GPW/WebUserControls/mod_sendAuthToEmail.ascx.designer.cs
new file mode 100644
index 0000000..84be4ac
--- /dev/null
+++ b/GPW/WebUserControls/mod_sendAuthToEmail.ascx.designer.cs
@@ -0,0 +1,60 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_sendAuthToEmail {
+
+ ///
+ /// ddlIdxDipendente control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlIdxDipendente;
+
+ ///
+ /// odsDipendenti control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsDipendenti;
+
+ ///
+ /// lblWarning control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWarning;
+
+ ///
+ /// btnConferma control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnConferma;
+
+ ///
+ /// btnAnnulla control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAnnulla;
+ }
+}
diff --git a/GPW/WebUserControls/mod_spostaOre.ascx b/GPW/WebUserControls/mod_spostaOre.ascx
new file mode 100644
index 0000000..84d72bc
--- /dev/null
+++ b/GPW/WebUserControls/mod_spostaOre.ascx
@@ -0,0 +1,211 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_spostaOre.ascx.cs" Inherits="GPW.WebUserControls.mod_spostaOre" %>
+<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
+<%@ Register Src="mod_dateTime.ascx" TagName="mod_dateTime" TagPrefix="uc3" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nessun record COMMESSA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_spostaOre.ascx.cs b/GPW/WebUserControls/mod_spostaOre.ascx.cs
new file mode 100644
index 0000000..22179e7
--- /dev/null
+++ b/GPW/WebUserControls/mod_spostaOre.ascx.cs
@@ -0,0 +1,518 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+using System.Globalization;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_spostaOre : System.Web.UI.UserControl
+ {
+
+ ///
+ /// effettua traduzione del lemma
+ ///
+ ///
+ ///
+ public string traduci(string lemma)
+ {
+ return user_std.UtSn.Traduci(lemma);
+ }
+ ///
+ /// uid base
+ ///
+ protected string sessionUid
+ {
+ get
+ {
+ return this.UniqueID.Replace("$", "-");
+ }
+ }
+ ///
+ /// idx del cliente selezionato
+ ///
+ public int idxCliente
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj(string.Format("idxCli_{0}", sessionUid));
+ }
+ set
+ {
+ memLayer.ML.setSessionVal(string.Format("idxCli_{0}", sessionUid), value);
+ }
+ }
+ ///
+ /// idx del progetto selezionato
+ ///
+ public int idxProgetto
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj(string.Format("idxProj_{0}", sessionUid));
+ }
+ set
+ {
+ memLayer.ML.setSessionVal(string.Format("idxProj_{0}", sessionUid), value);
+ }
+ }
+ ///
+ /// idx della fase selezionata
+ ///
+ public int idxFase
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj(string.Format("idxFase_{0}", sessionUid));
+ }
+ set
+ {
+ memLayer.ML.setSessionVal(string.Format("idxFase_{0}", sessionUid), value);
+ }
+ }
+ ///
+ /// idx del cliente selezionato x destinazione spostamento
+ ///
+ public int idxClienteDest
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj(string.Format("idxCliDest_{0}", sessionUid));
+ }
+ set
+ {
+ memLayer.ML.setSessionVal(string.Format("idxCliDest_{0}", sessionUid), value);
+ }
+ }
+ ///
+ /// idx del progetto selezionato x destinazione spostamento
+ ///
+ public int idxProgettoDest
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj(string.Format("idxProjDest_{0}", sessionUid));
+ }
+ set
+ {
+ memLayer.ML.setSessionVal(string.Format("idxProjDest_{0}", sessionUid), value);
+ }
+ }
+ ///
+ /// idx della fase selezionata x destinazione spostamento
+ ///
+ public int idxFaseDest
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj(string.Format("idxFaseDest_{0}", sessionUid));
+ }
+ set
+ {
+ memLayer.ML.setSessionVal(string.Format("idxFaseDest_{0}", sessionUid), value);
+ }
+ }
+ ///
+ /// avvio pagina!
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ grView.PageSize = utils.pageSize;
+ if (!Page.IsPostBack)
+ {
+ filtroDip.ods = odsDip;
+ filtroCli.ods = odsClienti;
+ filtroPrj.ods = odsProj;
+ filtroFase.ods = odsFasi;
+
+ filtroDip.reselFirst();
+ setDetailVisib(false);
+
+ // filtro x spostamento
+ filtroCliDest.ods = odsClienti;
+ filtroPrjDest.ods = odsProjDest;
+
+ // btn sposta!
+ pnlFaseDest.Visible = false;
+ fixBtnSposta();
+ checkFixOds();
+ }
+ filtroDip.eh_selValore += new EventHandler(filtroDip_eh_selValore);
+ filtroCli.eh_selValore += new EventHandler(filtroCli_eh_selValore);
+ filtroPrj.eh_selValore += new EventHandler(filtroPrj_eh_selValore);
+ filtroFase.eh_selValore += new EventHandler(filtroFase_eh_selValore);
+ filtroCliDest.eh_selValore += new EventHandler(filtroCliDest_eh_selValore);
+ filtroPrjDest.eh_selValore += new EventHandler(filtroPrjDest_eh_selValore);
+ ddlFaseDest.SelectedIndexChanged += new EventHandler(filtroFaseDest_eh_selValore);
+ }
+
+ void filtroFaseDest_eh_selValore(object sender, EventArgs e)
+ {
+ fixBtnSposta();
+ }
+
+ void filtroPrjDest_eh_selValore(object sender, EventArgs e)
+ {
+ salveFilterPrjDest();
+ }
+
+ void filtroCliDest_eh_selValore(object sender, EventArgs e)
+ {
+ saveFilterCliDest();
+ salveFilterPrjDest();
+ }
+
+ ///
+ /// seleziono
+ ///
+ ///
+ ///
+ void filtroDip_eh_selValore(object sender, EventArgs e)
+ {
+ // imposto ods
+ //grViewExpl.SelectedIndex = -1;
+ setDetailVisib(false);
+ checkFixOds();
+ }
+ ///
+ /// cambio sel cliente --> aggiorno progetti
+ ///
+ ///
+ ///
+ void filtroCli_eh_selValore(object sender, EventArgs e)
+ {
+ saveFilterCli();
+ salveFilterPrj();
+ //salveFilterFasi();
+ }
+ ///
+ /// aggiorno visualizzazione fasi!
+ ///
+ ///
+ ///
+ void filtroPrj_eh_selValore(object sender, EventArgs e)
+ {
+ salveFilterPrj();
+ //salveFilterFasi();
+ }
+ ///
+ /// aggiorno filtraggio!
+ ///
+ ///
+ ///
+ void filtroFase_eh_selValore(object sender, EventArgs e)
+ {
+ salveFilterFasi();
+ }
+ ///
+ /// salva filtro cliente
+ ///
+ private void saveFilterCli()
+ {
+ // salvo filtro cliente
+ idxCliente = filtroCli.valoreInt;
+ filtroPrj.ods = odsProj;
+ filtroPrj.reselFirst();
+ }
+ ///
+ /// salva filtro prj
+ ///
+ private void salveFilterPrj()
+ {
+ idxProgetto = filtroPrj.valoreInt;
+ filtroFase.ods = odsFasi;
+ filtroFase.reselFirst();
+ //grView.DataBind();
+ }
+ ///
+ /// salva filtro fasi
+ ///
+ private void salveFilterFasi()
+ {
+ idxFase = filtroFase.valoreInt;
+ //grView.DataBind();
+ }
+ ///
+ /// salva filtro cliente
+ ///
+ private void saveFilterCliDest()
+ {
+ // salvo filtro cliente
+ idxClienteDest = filtroCliDest.valoreInt;
+ filtroPrjDest.ods = odsProjDest;
+ filtroPrjDest.reselFirst();
+ }
+ ///
+ /// salva filtro prj
+ ///
+ private void salveFilterPrjDest()
+ {
+ idxProgettoDest = filtroPrjDest.valoreInt;
+ try
+ {
+ ddlFaseDest.SelectedIndex = 1;
+ }
+ catch
+ { }
+ }
+ ///
+ /// set visibilità grView dettagli
+ ///
+ ///
+ private void setDetailVisib(bool value)
+ {
+ //pnlDettagli.Visible = value;
+ //grViewGiust.Visible = value;
+ }
+ ///
+ /// imposto ODS
+ ///
+ private void checkFixOds()
+ {
+ grView.DataBind();
+ }
+ ///
+ /// abilitato editing fase
+ ///
+ public bool editFase
+ {
+ get
+ {
+ bool answ = false;
+ try
+ {
+ answ = memLayer.ML.BoolSessionObj("enableEditFase");
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("enableEditFase", value);
+ }
+ }
+
+ ///
+ /// aggiorno ods fasi...
+ ///
+ ///
+ ///
+ protected void ddlProgetto_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ checkFixOds();
+ }
+ ///
+ /// effettuato update
+ ///
+ ///
+ ///
+ protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
+ {
+ }
+ ///
+ /// riga eliminata
+ ///
+ ///
+ ///
+ protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
+ {
+ }
+
+ ///
+ /// riga in edit
+ ///
+ ///
+ ///
+ protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
+ {
+ }
+ ///
+ /// riga popolata
+ ///
+ ///
+ ///
+ protected void grView_RowDataBound(object sender, GridViewRowEventArgs e)
+ {
+ if (grView.Rows.Count > 0)
+ {
+ LinkButton lb;
+ // aggiorno gli headers
+ foreach (TableCell cella in grView.HeaderRow.Cells)
+ {
+ try
+ {
+ lb = (LinkButton)cella.Controls[0];
+ lb.Text = traduci(lb.Text);
+ }
+ catch
+ { }
+ }
+ int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
+ lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
+ }
+ else
+ {
+ lblNumRec.Text = "";
+ }
+ }
+
+ ///
+ /// generico comando riga
+ ///
+ ///
+ ///
+ protected void grView_RowCommand(object sender, GridViewCommandEventArgs e)
+ {
+ }
+ ///
+ /// intercetto update!
+ ///
+ ///
+ ///
+ protected void odsRA_Updating(object sender, ObjectDataSourceMethodEventArgs e)
+ {
+ }
+ ///
+ /// seleziona/deseleziona le righe indicate...
+ ///
+ ///
+ ///
+ protected void btnSelAll_Click(object sender, EventArgs e)
+ {
+ // seleziono tutti i valori visibili nel datagrid
+ CheckBox chkbox = ((CheckBox)sender);
+ bool isChecked = chkbox.Checked;
+ if (!isChecked)
+ {
+ chkbox.ToolTip = "Seleziona tutti";
+ }
+ else
+ {
+ chkbox.ToolTip = "Deseleziona tutti";
+ }
+ foreach (GridViewRow riga in grView.Rows)
+ {
+ ((CheckBox)riga.FindControl("chkSelect")).Checked = isChecked;
+ }
+ }
+ ///
+ /// attiva/disattiva pannello spostamento
+ ///
+ ///
+ ///
+ protected void btnEnableSposta_Click(object sender, EventArgs e)
+ {
+ pnlFaseDest.Visible = !pnlFaseDest.Visible;
+ fixBtnSposta();
+ checkFixOds();
+ }
+ ///
+ /// imposto label corretta x btn sposta
+ ///
+ private void fixBtnSposta()
+ {
+ if (pnlFaseDest.Visible)
+ {
+ btnEnableSposta.Text = traduci("chiudiSposta");
+
+ }
+ else
+ {
+ btnEnableSposta.Text = traduci("mostraSposta");
+ }
+ }
+ ///
+ /// effettua spostamento registrazioni indicate
+ ///
+ ///
+ ///
+ protected void btnSpostaSel_Click(object sender, EventArgs e)
+ {
+ // prende valori selezioanti e sposta su fase destinazione impostata
+ int idxRA = 0;
+ // sposto i files selezionati secondo i dati in sessione
+ foreach (GridViewRow riga in grView.Rows)
+ {
+ if (((CheckBox)riga.FindControl("chkSelect")).Checked)
+ {
+ // devo salvare file con le info relative...
+ idxRA = Convert.ToInt32(((Label)riga.FindControl("lblIdxRa")).Text);
+ DataProxy.DP.taRAExpl.updateFase(Convert.ToInt32(ddlFaseDest.SelectedValue), idxRA);
+ }
+ }
+ checkFixOds();
+ }
+ ///
+ /// sistemo eventuali "headers"
+ ///
+ ///
+ ///
+ protected void ddlFaseDest_DataBound(object sender, EventArgs e)
+ {
+ // cerco eventuali controlli tipo "ancestor" e li disattivo!
+ DropDownList ddlFase_int = (DropDownList)sender;
+ ListItem li = new ListItem();
+ while (li != null)
+ {
+ li = ddlFase_int.Items.FindByValue("0");
+ try
+ {
+ li.Attributes.Add("style", "color:gray;");
+ li.Attributes.Add("disabled", "true");
+ li.Value = "-1";
+ li.Text = string.Format("[ {0} ]", li.Text);
+ }
+ catch
+ { }
+ }
+ try
+ {
+ ddlFase_int.SelectedIndex = 1;
+ }
+ catch
+ { }
+ }
+ ///
+ /// sistemo eventuali "headers"
+ ///
+ ///
+ ///
+ protected void ddlFase_DataBound(object sender, EventArgs e)
+ {
+ // cerco eventuali controlli tipo "ancestor" e li disattivo!
+ DropDownList ddlFase_int = (DropDownList)sender;
+ ListItem li = new ListItem();
+ while (li != null)
+ {
+ li = ddlFase_int.Items.FindByValue("0");
+ try
+ {
+ li.Attributes.Add("style", "color:gray;");
+ li.Attributes.Add("disabled", "true");
+ li.Value = "-1";
+ li.Text = string.Format("[ {0} ]", li.Text);
+ }
+ catch
+ { }
+ }
+ try
+ {
+ ddlFase_int.SelectedIndex = 1;
+ }
+ catch
+ { }
+ }
+
+ protected void grView_PageIndexChanged(object sender, EventArgs e)
+ {
+ checkFixOds();
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_spostaOre.ascx.designer.cs b/GPW/WebUserControls/mod_spostaOre.ascx.designer.cs
new file mode 100644
index 0000000..82b9406
--- /dev/null
+++ b/GPW/WebUserControls/mod_spostaOre.ascx.designer.cs
@@ -0,0 +1,222 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_spostaOre {
+
+ ///
+ /// 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;
+
+ ///
+ /// hlExportComm control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink hlExportComm;
+
+ ///
+ /// filtroCli control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::mod_filtro filtroCli;
+
+ ///
+ /// odsClienti control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsClienti;
+
+ ///
+ /// filtroPrj control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::mod_filtro filtroPrj;
+
+ ///
+ /// odsProj control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsProj;
+
+ ///
+ /// filtroFase control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::mod_filtro filtroFase;
+
+ ///
+ /// odsFasi control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsFasi;
+
+ ///
+ /// chkSoloAncest control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox chkSoloAncest;
+
+ ///
+ /// btnEnableSposta control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnEnableSposta;
+
+ ///
+ /// pnlFaseDest control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlFaseDest;
+
+ ///
+ /// filtroCliDest control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::mod_filtro filtroCliDest;
+
+ ///
+ /// filtroPrjDest control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::mod_filtro filtroPrjDest;
+
+ ///
+ /// odsProjDest control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsProjDest;
+
+ ///
+ /// ddlFaseDest control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlFaseDest;
+
+ ///
+ /// odsFasiDest control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsFasiDest;
+
+ ///
+ /// btnSpostaSel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnSpostaSel;
+
+ ///
+ /// 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;
+
+ ///
+ /// odsRA control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsRA;
+
+ ///
+ /// odsProgetto control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource odsProgetto;
+
+ ///
+ /// 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;
+ }
+}
diff --git a/GPW/WebUserControls/mod_timbrMensili.ascx b/GPW/WebUserControls/mod_timbrMensili.ascx
new file mode 100644
index 0000000..7439add
--- /dev/null
+++ b/GPW/WebUserControls/mod_timbrMensili.ascx
@@ -0,0 +1,102 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_timbrMensili.ascx.cs" Inherits="GPW.WebUserControls.mod_timbrMensili" %>
+<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+
+
+
+ <%--
+ Comp. Straordinari
+
--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+
+
+
+
+
+ --%>
+ <%--
+
+
+
+
+ --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%----%>
+
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_timbrMensili.ascx.cs b/GPW/WebUserControls/mod_timbrMensili.ascx.cs
new file mode 100644
index 0000000..76add29
--- /dev/null
+++ b/GPW/WebUserControls/mod_timbrMensili.ascx.cs
@@ -0,0 +1,256 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Data;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_timbrMensili : System.Web.UI.UserControl
+ {
+ #region area standard (non modificare)
+
+ #region gestione eventi
+
+ public event EventHandler eh_resetSelezione;
+ public event EventHandler eh_nuovoValore;
+
+ #endregion
+
+ ///
+ /// effettua traduzione del lemma
+ ///
+ ///
+ ///
+ public string traduci(string lemma)
+ {
+ return user_std.UtSn.Traduci(lemma);
+ }
+
+ ///
+ /// resetta la selezione dei valori in caso di modifiche su altri controlli
+ ///
+ public void resetSelezione()
+ {
+ grView.SelectedIndex = -1;
+ grView.DataBind();
+ if (eh_resetSelezione != null)
+ {
+ eh_resetSelezione(this, new EventArgs());
+ }
+ }
+ ///
+ /// reset della selezione
+ ///
+ ///
+ ///
+ protected void btnReset_Click(object sender, EventArgs e)
+ {
+ resetSelezione();
+ }
+ ///
+ /// inserisce nuovo valore da footer
+ ///
+ ///
+ ///
+ protected void lblIns_click(object sender, EventArgs e)
+ {
+ // click su inserimento, chiamo il metodo insert dell'ObjectDataSource
+ ods.Insert();
+ }
+ ///
+ /// annulla inserimento nuovo valore da footer
+ ///
+ ///
+ ///
+ protected void lblCanc_click(object sender, EventArgs e)
+ {
+ // annullo inserimento: nascondo footer, bind controlli...
+ grView.FooterRow.Visible = false;
+ }
+ ///
+ /// traduce gli header delle colonne
+ ///
+ ///
+ ///
+ protected void grView_DataBound(object sender, EventArgs e)
+ {
+ if (grView.Rows.Count > 0)
+ {
+ LinkButton lb;
+ // aggiorno gli headers
+ foreach (TableCell cella in grView.HeaderRow.Cells)
+ {
+ try
+ {
+ lb = (LinkButton)cella.Controls[0];
+ lb.Text = traduci(lb.Text);
+ }
+ catch
+ { }
+ }
+ int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
+ lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
+ }
+ else
+ {
+ lblNumRec.Text = "";
+ }
+ }
+ ///
+ /// recupera i dati di un nuovo record contenuti nel footer di un gridView;
+ /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
+ ///
+ ///
+ ///
+ protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
+ {
+ //recupero la riga footer...
+ DataColumnCollection colonne = colonneObj();
+ string nomeCol;
+ string tipoColonna = "";
+ foreach (DataColumn colonna in colonne)
+ {
+ nomeCol = colonna.ColumnName;
+ // cerco un textbox o quello che sia...
+ if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
+ {
+ tipoColonna = "textBox";
+ }
+ else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
+ {
+ tipoColonna = "dropDownList";
+ }
+ else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
+ {
+ tipoColonna = "checkBox";
+ }
+ // in base al tipo salvo negli inputparameters dell'ODS
+ switch (tipoColonna)
+ {
+ case "textBox":
+ e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
+ break;
+ case "dropDownList":
+ e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
+ break;
+ case "checkBox":
+ e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
+ break;
+ default:
+ break;
+ }
+ tipoColonna = "";
+ }
+ }
+
+ #endregion
+
+ #region area CUSTOM (da modificare)
+
+ ///
+ /// elenco colonne del datagrid
+ ///
+ ///
+ protected DataColumnCollection colonneObj()
+ {
+ DS_Applicazione.TimbMeseExplDataTable tabella = new DS_Applicazione.TimbMeseExplDataTable();
+ DataColumnCollection colonne = tabella.Columns;
+ return colonne;
+ }
+ ///
+ /// caricamento
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ grView.PageSize = utils.pageSize;
+ if (!Page.IsPostBack)
+ {
+ filtroDip.ods = odsDip;
+ memLayer.ML.emptySessionVal("idxDip_sel");
+ filtroDip.reselFirst();
+ // ricostruisco EVENTUALI date mancanti
+ DataProxy.DP.taTimbExpl.stp_timbratureExplFillDate(DateTime.Now.AddMonths(-2), DateTime.Now);
+ }
+ 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()
+ {
+ memLayer.ML.setSessionVal("idxDip_sel", filtroDip.valoreInt);
+ grView.DataBind();
+ }
+ ///
+ /// determina se sia visibile il pulsante per la riduzione degli straordinari per il mese/dipendente
+ ///
+ ///
+ ///
+ ///
+ public bool reduceVisible(object oreStraord, object oreAssorb)
+ {
+ bool answ = rblComp.SelectedValue == "2";
+ // solo se in fase abilitata alla modifica controllo le ore effettive
+ if (answ)
+ {
+ answ = (Convert.ToDouble(oreStraord) >= Convert.ToDouble(oreAssorb)) && (Convert.ToDouble(oreAssorb) > 0);
+ }
+ return answ;
+ }
+ ///
+ /// determina se sia visibile il pulsante per la compensazione permessi/strordinari
+ ///
+ ///
+ ///
+ ///
+ public bool compPermVisible(object oreStraord, object orePermessi)
+ {
+ bool answ = rblComp.SelectedValue == "1";
+ // solo se in fase abilitata alla modifica controllo le ore effettive
+ if (answ)
+ {
+ answ = (Convert.ToDouble(oreStraord) > 0) && (Convert.ToDouble(orePermessi) > 0);
+ }
+ return answ;
+ }
+ ///
+ /// fix visualizzazione x selezione compensazione richiesta
+ ///
+ ///
+ ///
+ protected void rblComp_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (rblComp.SelectedValue == "2")
+ {
+ txtMinRedExtra.Visible = true;
+ }
+ else
+ {
+ txtMinRedExtra.Visible = false;
+ }
+ //// salvo in sessione il valore selezionato x passarlo alla stored...
+ //memLayer.ML.setSessionVal("tipoComp", rblComp.SelectedValue);
+ grView.DataBind();
+ }
+
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_timbrMensili.ascx.designer.cs b/GPW/WebUserControls/mod_timbrMensili.ascx.designer.cs
new file mode 100644
index 0000000..0dac9e2
--- /dev/null
+++ b/GPW/WebUserControls/mod_timbrMensili.ascx.designer.cs
@@ -0,0 +1,87 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.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;
+ }
+}
diff --git a/GPW/WebUserControls/mod_timbrature.ascx b/GPW/WebUserControls/mod_timbrature.ascx
new file mode 100644
index 0000000..bff9a09
--- /dev/null
+++ b/GPW/WebUserControls/mod_timbrature.ascx
@@ -0,0 +1,95 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_timbrature.ascx.cs" Inherits="GPW.WebUserControls.mod_timbrature" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+ --%>
+
+
+
+
+
diff --git a/GPW/WebUserControls/mod_timbrature.ascx.cs b/GPW/WebUserControls/mod_timbrature.ascx.cs
new file mode 100644
index 0000000..3038b04
--- /dev/null
+++ b/GPW/WebUserControls/mod_timbrature.ascx.cs
@@ -0,0 +1,176 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_timbrature : System.Web.UI.UserControl
+ {
+ protected bool forceButtons = true;
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ setButtons();
+ //setDate();
+ }
+ ///
+ /// imposta date da visualizzare
+ ///
+ private void setDate()
+ {
+ //lblInizio.Text = DateTime.Now.AddDays(-11).ToShortDateString();
+ //lblFine.Text = DateTime.Now.ToShortDateString();
+ }
+ ///
+ /// imposto highlight di un area intorno al button
+ ///
+ private void setButtons()
+ {
+ // controllo SE voglio inibire i buttons...
+ if (forceButtons)
+ {
+ // controllo se il prox comando DOVREBBE essere entrata o uscita
+ bool nextIsEntrata = true;
+ // controllo dipendente
+ if (IdxDipendente > 0)
+ {
+ // ricavo ultima timbratura..
+ //DS_Applicazione.TimbratureRow rigaTimb = DataProxy.DP.taTimb.getLastByDip(IdxDipendente)[0];
+ //if (rigaTimb != null)
+ //{
+ // nextIsEntrata = !rigaTimb.entrata;
+ //}
+ nextIsEntrata = timbratrice.nextIsEntrata(IdxDipendente);
+ // di conseguenza cambio abilitazione ad un buttons
+ if (nextIsEntrata)
+ {
+ btnEntrata.Enabled = true;
+ btnUscita.Enabled = false;
+ }
+ else
+ {
+ btnEntrata.Enabled = false;
+ btnUscita.Enabled = true;
+ }
+ }
+ else
+ {
+ btnEntrata.Enabled = false;
+ btnUscita.Enabled = false;
+ }
+ }
+ else
+ {
+ btnEntrata.Enabled = true;
+ btnUscita.Enabled = true;
+ }
+ }
+ ///
+ /// timbro entrata...
+ ///
+ ///
+ ///
+ protected void btnEntrata_Click(object sender, EventArgs e)
+ {
+ bool isEntrata = true;
+ registraTimbratura(isEntrata);
+ }
+ ///
+ /// uscita...
+ ///
+ ///
+ ///
+ protected void btnUscita_Click(object sender, EventArgs e)
+ {
+ bool isEntrata = false;
+ registraTimbratura(isEntrata);
+ }
+ ///
+ /// abilita entrambi i buttons...
+ ///
+ ///
+ ///
+ protected void btnAbilitaFull_Click(object sender, EventArgs e)
+ {
+ forceButtons = false;
+ setButtons();
+ }
+ ///
+ /// update elenco ultime timbrature
+ ///
+ private void updateTimbrature()
+ {
+ // aggiorno datagrid
+ }
+ ///
+ /// registro timbratura
+ ///
+ ///
+ ///
+ private int registraTimbratura(bool isEntrata)
+ {
+ // salvo evento entrata...
+ string IPv4 = "";
+ bool approvata = false;
+ if (IdxDipendente > 0)
+ {
+ // recupero IP
+ IPv4 = Request.UserHostName;
+ // controllo se IP locale = approvata...
+ if (IPv4.Contains(memLayer.ML.confReadString("localNet")))
+ {
+ approvata = true;
+ }
+ timbratrice.registraTimbratura(IdxDipendente, DateTime.Now, isEntrata, IPv4, "Web", approvata);
+ lblWarning.Visible = false;
+ //aggiorno timbrature visualizzate
+ setButtons();
+ updateTimbrature();
+ grView.DataBind();
+ }
+ else
+ {
+ lblWarning.Text = "IdxDipendente non trovato! timbratura impossibile";
+ lblWarning.Visible = true;
+ }
+ return IdxDipendente;
+ }
+ ///
+ /// idx dipendente loggato
+ ///
+ protected int IdxDipendente
+ {
+ get
+ {
+ int idx = 0;
+ try
+ {
+ idx = memLayer.ML.IntSessionObj("IdxDipendente");
+ }
+ catch
+ { }
+ return idx;
+ }
+ }
+ ///
+ /// inverte valore booleano
+ ///
+ ///
+ ///
+ public bool invBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = !Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_timbrature.ascx.designer.cs b/GPW/WebUserControls/mod_timbrature.ascx.designer.cs
new file mode 100644
index 0000000..c7407f8
--- /dev/null
+++ b/GPW/WebUserControls/mod_timbrature.ascx.designer.cs
@@ -0,0 +1,96 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_timbrature {
+
+ ///
+ /// btnEntrata control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnEntrata;
+
+ ///
+ /// btnUscita control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnUscita;
+
+ ///
+ /// lblWarning control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWarning;
+
+ ///
+ /// 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;
+
+ ///
+ /// lblInizio control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblInizio;
+
+ ///
+ /// lblFine control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblFine;
+
+ ///
+ /// btnAbilitaFull control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnAbilitaFull;
+
+ ///
+ /// hlMancateTimbr control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink hlMancateTimbr;
+ }
+}
diff --git a/GPW/WebUserControls/mod_title.ascx b/GPW/WebUserControls/mod_title.ascx
new file mode 100644
index 0000000..1d74959
--- /dev/null
+++ b/GPW/WebUserControls/mod_title.ascx
@@ -0,0 +1,13 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_title.ascx.cs" Inherits="GPW.WebUserControls.mod_title" %>
+
diff --git a/GPW/WebUserControls/mod_title.ascx.cs b/GPW/WebUserControls/mod_title.ascx.cs
new file mode 100644
index 0000000..dab44f9
--- /dev/null
+++ b/GPW/WebUserControls/mod_title.ascx.cs
@@ -0,0 +1,116 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using SteamWare;
+using GPW_data;
+
+namespace GPW.WebUserControls
+{
+ public partial class mod_title : System.Web.UI.UserControl
+ {
+ ///
+ /// user agent corrente
+ ///
+ protected string userAgent = "";
+ ///
+ /// IP corrente
+ ///
+ protected string postazione_IP = "";
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // controllo se c'è utente in sessione..
+ checkUser();
+ // sistemo visualizzazione
+ postazione_IP = Request.UserHostName;
+ lblIpData.Text = postazione_IP;
+ try
+ {
+ lblSwData.Text = memLayer.ML.StringSessionObj("cognomeNome");
+ }
+ catch
+ {
+ lblSwData.Text = "GPW";
+ }
+ //lblIpData.Text = memLayer.ML.StringSessionObj("cognomeNome");
+ }
+ ///
+ /// verifica presenza utente autorizzato in sessione
+ ///
+ private void checkUser()
+ {
+ if (!memLayer.ML.isInSessionObject("idxDipendente"))
+ {
+ // controllo cookie device...
+ checkAuthCookieGPW();
+ }
+ }
+ ///
+ /// verifica al presenza di un cookie VALIDO per autorizzare il device
+ ///
+ private void checkAuthCookieGPW()
+ {
+ try
+ {
+ HttpCookie cookie = Request.Cookies["AuthGPW"];
+ if (cookie == null || cookie.Value=="")
+ {
+ // rimando pagina x registrazione devices
+ Response.Redirect("~/A3/regNewDevice.aspx");
+ }
+ else
+ {
+ // ricavo utente da cookie...
+ string devSecret = cookie.Value;
+ DS_Applicazione.AnagDevicesRow device = null;
+ // cerco il device...ogni dipendente può averne + di 1 registrato a suo nome...
+ int idxDipendente = 0;
+ try
+ {
+ device = DataProxy.DP.taAnagDev.getByDeviceSecret(devSecret)[0];
+ idxDipendente = device.idxDipendente;
+ }
+ catch
+ { }
+ if (idxDipendente > 0)
+ {
+ // aggiorno descrizione (user agent) ed IP...
+ userAgent = Request.UserAgent;
+ postazione_IP = Request.UserHostName;
+ // controllo IP e DeviceDescription x eventuale update
+ if ((device.lastIPv4 != postazione_IP) || (device.Description != userAgent))
+ {
+ // salvo ultimo "contatto" del device aggiornando descrizione ed IP
+ DataProxy.DP.taAnagDev.updateIP(device.IdxDevice, DateTime.Now, postazione_IP, userAgent);
+ }
+ // salvo in sessione utente
+ memLayer.ML.setSessionVal("idxDipendente", idxDipendente);
+ string CognomeNome = "";
+ try
+ {
+ DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(idxDipendente)[0];
+ CognomeNome = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome);
+ }
+ catch
+ { }
+ memLayer.ML.setSessionVal("cognomeNome", CognomeNome);
+ }
+ else
+ {
+ // svuoto cookie...
+ memLayer.ML.emptyCookieVal("AuthGPW");
+ // rimando pagina x registrazione devices
+ Response.Redirect("~/A3/regNewDevice.aspx");
+ }
+ }
+ }
+ catch(Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Errore in checkAuthCookie:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPW/WebUserControls/mod_title.ascx.designer.cs b/GPW/WebUserControls/mod_title.ascx.designer.cs
new file mode 100644
index 0000000..919f90a
--- /dev/null
+++ b/GPW/WebUserControls/mod_title.ascx.designer.cs
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GPW.WebUserControls {
+
+
+ public partial class mod_title {
+
+ ///
+ /// lblSwData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSwData;
+
+ ///
+ /// lblIpData control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblIpData;
+ }
+}
diff --git a/GPW/WebUserControls/mod_unauthorized.ascx b/GPW/WebUserControls/mod_unauthorized.ascx
new file mode 100644
index 0000000..b14967e
--- /dev/null
+++ b/GPW/WebUserControls/mod_unauthorized.ascx
@@ -0,0 +1,20 @@
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_unauthorized" Codebehind="mod_unauthorized.ascx.cs" %>
+<% if (false)
+ { %>
+
+<% } %>
+
+
+ |
+
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+
+
diff --git a/GPW/WebUserControls/mod_unauthorized.ascx.cs b/GPW/WebUserControls/mod_unauthorized.ascx.cs
new file mode 100644
index 0000000..578f402
--- /dev/null
+++ b/GPW/WebUserControls/mod_unauthorized.ascx.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using SteamWare;
+
+public partial class mod_unauthorized : System.Web.UI.UserControl
+{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ lblTitle.Text = user_std.UtSn.Traduci("NonDisponibile");
+ lblMess.Text = user_std.UtSn.Traduci("NonAuth");
+ }
+}
diff --git a/GPW/WebUserControls/mod_unauthorized.ascx.designer.cs b/GPW/WebUserControls/mod_unauthorized.ascx.designer.cs
new file mode 100644
index 0000000..2288349
--- /dev/null
+++ b/GPW/WebUserControls/mod_unauthorized.ascx.designer.cs
@@ -0,0 +1,40 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+public partial class mod_unauthorized {
+
+ ///
+ /// lblTitleMain control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTitleMain;
+
+ ///
+ /// lblTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTitle;
+
+ ///
+ /// lblMess control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblMess;
+}
diff --git a/GPW/packages.config b/GPW/packages.config
index e1c8a4b..dadfce3 100644
--- a/GPW/packages.config
+++ b/GPW/packages.config
@@ -1,9 +1,12 @@

+
+
+