-
-
+
+
diff --git a/GPW_Smart/WebMasterPages/JQMob.Master.cs b/GPW_Smart/WebMasterPages/JQMob.Master.cs
index eaa52fe..dd72c52 100644
--- a/GPW_Smart/WebMasterPages/JQMob.Master.cs
+++ b/GPW_Smart/WebMasterPages/JQMob.Master.cs
@@ -35,5 +35,27 @@ namespace GPW.WebMasterPages
if (Request.Url.ToString().Contains(nomeElem.ToString())) answ = "ui-btn-active";
return answ;
}
+
+ public bool showSettings { get; set; }
+ public bool showLeftPnl{ get; set; }
+
+ public string hideSettings
+ {
+ get
+ {
+ string answ = "";
+ if (!showSettings) answ = "hidden";
+ return answ;
+ }
+ }
+ public string hideLeftPnl
+ {
+ get
+ {
+ string answ = "";
+ if (!showLeftPnl) answ = "hidden";
+ return answ;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/GPW_Smart/WebUserControls/mod_commAttivitaDesk.ascx b/GPW_Smart/WebUserControls/mod_commAttivitaDesk.ascx
deleted file mode 100644
index 9a3d633..0000000
--- a/GPW_Smart/WebUserControls/mod_commAttivitaDesk.ascx
+++ /dev/null
@@ -1,225 +0,0 @@
-<%@ 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_Smart/WebUserControls/mod_commAttivitaDesk.ascx.cs b/GPW_Smart/WebUserControls/mod_commAttivitaDesk.ascx.cs
deleted file mode 100644
index 37af218..0000000
--- a/GPW_Smart/WebUserControls/mod_commAttivitaDesk.ascx.cs
+++ /dev/null
@@ -1,635 +0,0 @@
-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_Smart/WebUserControls/mod_commAttivitaDesk.ascx.designer.cs b/GPW_Smart/WebUserControls/mod_commAttivitaDesk.ascx.designer.cs
deleted file mode 100644
index 51cd4c2..0000000
--- a/GPW_Smart/WebUserControls/mod_commAttivitaDesk.ascx.designer.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 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_Smart/WebUserControls/mod_commUtLog.ascx b/GPW_Smart/WebUserControls/mod_commUtLog.ascx
deleted file mode 100644
index 2d47ffb..0000000
--- a/GPW_Smart/WebUserControls/mod_commUtLog.ascx
+++ /dev/null
@@ -1,178 +0,0 @@
-<%@ 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_Smart/WebUserControls/mod_commUtLog.ascx.cs b/GPW_Smart/WebUserControls/mod_commUtLog.ascx.cs
deleted file mode 100644
index e808819..0000000
--- a/GPW_Smart/WebUserControls/mod_commUtLog.ascx.cs
+++ /dev/null
@@ -1,397 +0,0 @@
-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_Smart/WebUserControls/mod_commUtLog.ascx.designer.cs b/GPW_Smart/WebUserControls/mod_commUtLog.ascx.designer.cs
deleted file mode 100644
index 710b3da..0000000
--- a/GPW_Smart/WebUserControls/mod_commUtLog.ascx.designer.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 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_Smart/WebUserControls/mod_commUtMancTimbr.ascx b/GPW_Smart/WebUserControls/mod_commUtMancTimbr.ascx
deleted file mode 100644
index dcd04dd..0000000
--- a/GPW_Smart/WebUserControls/mod_commUtMancTimbr.ascx
+++ /dev/null
@@ -1,127 +0,0 @@
-<%@ 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_Smart/WebUserControls/mod_commUtMancTimbr.ascx.cs b/GPW_Smart/WebUserControls/mod_commUtMancTimbr.ascx.cs
deleted file mode 100644
index 2cb1e18..0000000
--- a/GPW_Smart/WebUserControls/mod_commUtMancTimbr.ascx.cs
+++ /dev/null
@@ -1,224 +0,0 @@
-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_Smart/WebUserControls/mod_commUtMancTimbr.ascx.designer.cs b/GPW_Smart/WebUserControls/mod_commUtMancTimbr.ascx.designer.cs
deleted file mode 100644
index 5f21a9a..0000000
--- a/GPW_Smart/WebUserControls/mod_commUtMancTimbr.ascx.designer.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 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_Smart/WebUserControls/mod_dateTime.ascx b/GPW_Smart/WebUserControls/mod_dateTime.ascx
deleted file mode 100644
index 04c81c8..0000000
--- a/GPW_Smart/WebUserControls/mod_dateTime.ascx
+++ /dev/null
@@ -1,30 +0,0 @@
-<%@ 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_Smart/WebUserControls/mod_dateTime.ascx.cs b/GPW_Smart/WebUserControls/mod_dateTime.ascx.cs
deleted file mode 100644
index b0b413e..0000000
--- a/GPW_Smart/WebUserControls/mod_dateTime.ascx.cs
+++ /dev/null
@@ -1,154 +0,0 @@
-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_Smart/WebUserControls/mod_dateTime.ascx.designer.cs b/GPW_Smart/WebUserControls/mod_dateTime.ascx.designer.cs
deleted file mode 100644
index e2377f4..0000000
--- a/GPW_Smart/WebUserControls/mod_dateTime.ascx.designer.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 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_Smart/WebUserControls/mod_elencoTimbr.ascx b/GPW_Smart/WebUserControls/mod_elencoTimbr.ascx
deleted file mode 100644
index f8a8129..0000000
--- a/GPW_Smart/WebUserControls/mod_elencoTimbr.ascx
+++ /dev/null
@@ -1,99 +0,0 @@
-<%@ 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_Smart/WebUserControls/mod_elencoTimbr.ascx.cs b/GPW_Smart/WebUserControls/mod_elencoTimbr.ascx.cs
deleted file mode 100644
index 43fd965..0000000
--- a/GPW_Smart/WebUserControls/mod_elencoTimbr.ascx.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-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_Smart/WebUserControls/mod_elencoTimbr.ascx.designer.cs b/GPW_Smart/WebUserControls/mod_elencoTimbr.ascx.designer.cs
deleted file mode 100644
index 59bb84c..0000000
--- a/GPW_Smart/WebUserControls/mod_elencoTimbr.ascx.designer.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 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_Smart/WebUserControls/mod_filtro.ascx b/GPW_Smart/WebUserControls/mod_filtro.ascx
deleted file mode 100644
index 6be4ce8..0000000
--- a/GPW_Smart/WebUserControls/mod_filtro.ascx
+++ /dev/null
@@ -1,13 +0,0 @@
-<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_filtro" CodeBehind="mod_filtro.ascx.cs" %>
-<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
-
diff --git a/GPW_Smart/WebUserControls/mod_filtro.ascx.cs b/GPW_Smart/WebUserControls/mod_filtro.ascx.cs
deleted file mode 100644
index 3b0598f..0000000
--- a/GPW_Smart/WebUserControls/mod_filtro.ascx.cs
+++ /dev/null
@@ -1,446 +0,0 @@
-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_Smart/WebUserControls/mod_filtro.ascx.designer.cs b/GPW_Smart/WebUserControls/mod_filtro.ascx.designer.cs
deleted file mode 100644
index f4cb510..0000000
--- a/GPW_Smart/WebUserControls/mod_filtro.ascx.designer.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 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_Smart/WebUserControls/mod_login.ascx b/GPW_Smart/WebUserControls/mod_login.ascx
deleted file mode 100644
index 592dbe6..0000000
--- a/GPW_Smart/WebUserControls/mod_login.ascx
+++ /dev/null
@@ -1,58 +0,0 @@
-<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_login" CodeBehind="mod_login.ascx.cs" %>
-<% if (false)
- { %>
-
-<% } %>
-
-
-
-
- |
-
- |
-
-
- |
-
-
- |
-
- |
-
-
- |
-
-
- |
-
- |
-
-
- |
-
-
- |
-
- |
-
-
-
-
diff --git a/GPW_Smart/WebUserControls/mod_login.ascx.cs b/GPW_Smart/WebUserControls/mod_login.ascx.cs
deleted file mode 100644
index 90fa9c4..0000000
--- a/GPW_Smart/WebUserControls/mod_login.ascx.cs
+++ /dev/null
@@ -1,241 +0,0 @@
-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_Smart/WebUserControls/mod_login.ascx.designer.cs b/GPW_Smart/WebUserControls/mod_login.ascx.designer.cs
deleted file mode 100644
index 7d2f20b..0000000
--- a/GPW_Smart/WebUserControls/mod_login.ascx.designer.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 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_Smart/WebUserControls/mod_mancTimb.ascx b/GPW_Smart/WebUserControls/mod_mancTimb.ascx
index c0d22d2..b9afd79 100644
--- a/GPW_Smart/WebUserControls/mod_mancTimb.ascx
+++ b/GPW_Smart/WebUserControls/mod_mancTimb.ascx
@@ -44,7 +44,7 @@