diff --git a/ETS_Data/DataProxy_ProjEts.cs b/ETS_Data/DataProxy_ProjEts.cs
new file mode 100644
index 0000000..d640e20
--- /dev/null
+++ b/ETS_Data/DataProxy_ProjEts.cs
@@ -0,0 +1,194 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace ETS_Data
+{
+ ///
+ /// classe proxy dati x PROJ-ETS
+ ///
+ public class DataProxy_ProjEts
+ {
+ #region area table adapters
+
+#if false
+ public DS_ApplicazioneTableAdapters.AnagClientiTableAdapter taAnCli;
+ public DS_ApplicazioneTableAdapters.TimbratureTableAdapter taTimb;
+ public DS_ApplicazioneTableAdapters.TimbratureExplTableAdapter taTimbExpl;
+ public DS_ApplicazioneTableAdapters.AnagDevicesTableAdapter taAnagDev;
+ public DS_ApplicazioneTableAdapters.DipendentiTableAdapter taDipendenti;
+ public DS_ApplicazioneTableAdapters.Dipendenti2RuoliTableAdapter taDip2Ruoli;
+#endif
+ public Ds_ProjEtsTableAdapters.AnagProgettiTableAdapter taAP;
+#if false
+ public DS_ApplicazioneTableAdapters.AnagFasiTableAdapter taAF;
+ public DS_ApplicazioneTableAdapters.v_logCommUtTableAdapter taLCU;
+ public DS_ApplicazioneTableAdapters.RegAttivitaTableAdapter taRA;
+ public DS_ApplicazioneTableAdapters.regAttDayExplTableAdapter taRAExpl;
+ public DS_ApplicazioneTableAdapters.AnagOrariTableAdapter taAO;
+ public DS_ApplicazioneTableAdapters.GiustificativiTableAdapter taGiust;
+ public DS_ApplicazioneTableAdapters.stp_DipendentiAndAnomalieTableAdapter taDipAnom;
+ public DS_ApplicazioneTableAdapters.TE_RA_ExplTableAdapter taTimbRegAtt;
+
+ public DS_UtilityTableAdapters.nextValContatoreTableAdapter taNextVal;
+ public DS_UtilityTableAdapters.AnagKeyValueTableAdapter taAKV;
+
+ public DS_exportTableAdapters.TimbratureZucchettiTableAdapter taExpZucc;
+ public DS_exportTableAdapters.RegAtt_pivotTableAdapter taExpComm;
+#endif
+
+ ///
+ /// init dei table adapters
+ ///
+ protected void initTA()
+ {
+#if false
+ taAnCli = new DS_ApplicazioneTableAdapters.AnagClientiTableAdapter();
+ taTimb = new DS_ApplicazioneTableAdapters.TimbratureTableAdapter();
+ taTimbExpl = new DS_ApplicazioneTableAdapters.TimbratureExplTableAdapter();
+ taAnagDev = new DS_ApplicazioneTableAdapters.AnagDevicesTableAdapter();
+ taDipendenti = new DS_ApplicazioneTableAdapters.DipendentiTableAdapter();
+ taDip2Ruoli = new DS_ApplicazioneTableAdapters.Dipendenti2RuoliTableAdapter();
+#endif
+ taAP = new Ds_ProjEtsTableAdapters.AnagProgettiTableAdapter();
+#if false
+ taAF = new DS_ApplicazioneTableAdapters.AnagFasiTableAdapter();
+ taLCU = new DS_ApplicazioneTableAdapters.v_logCommUtTableAdapter();
+ taRA = new DS_ApplicazioneTableAdapters.RegAttivitaTableAdapter();
+ taRAExpl = new DS_ApplicazioneTableAdapters.regAttDayExplTableAdapter();
+ taAO = new DS_ApplicazioneTableAdapters.AnagOrariTableAdapter();
+ taGiust = new DS_ApplicazioneTableAdapters.GiustificativiTableAdapter();
+ taDipAnom = new DS_ApplicazioneTableAdapters.stp_DipendentiAndAnomalieTableAdapter();
+ taTimbRegAtt = new DS_ApplicazioneTableAdapters.TE_RA_ExplTableAdapter();
+ taNextVal = new DS_UtilityTableAdapters.nextValContatoreTableAdapter();
+ taAKV = new DS_UtilityTableAdapters.AnagKeyValueTableAdapter();
+ taExpZucc = new DS_exportTableAdapters.TimbratureZucchettiTableAdapter();
+ taExpComm = new DS_exportTableAdapters.RegAtt_pivotTableAdapter();
+#endif
+ }
+ ///
+ /// effettua setup dei connection strings da web.config delal singola applicazione
+ ///
+ protected virtual void setupConnectionStringBase()
+ {
+ // connections del db
+#if false
+ taAnCli.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taTimb.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taTimbExpl.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taAnagDev.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taDipendenti.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taDip2Ruoli.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+#endif
+ taAP.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+#if false
+ taAF.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taLCU.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taRA.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taRAExpl.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taAO.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taGiust.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taDipAnom.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taTimbRegAtt.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taNextVal.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taAKV.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taExpZucc.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+ taExpComm.Connection.ConnectionString = utils.obj.confReadString("GPWConnectionString");
+#endif
+ }
+
+ #endregion
+
+ protected DataProxy_ProjEts()
+ {
+ initTA();
+ setupConnectionStringBase();
+ }
+ ///
+ /// Singleton accesso a DataProxy
+ ///
+ public static DataProxy_ProjEts DP = new DataProxy_ProjEts();
+
+ #region utility public esposte
+
+ ///
+ /// invia una mail al destinatario x linkare nuovi devices tramite URL
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool sendUserAuthEmail(string destinatario, string UserAuthKey, int idxDipendente)
+ {
+ bool fatto = false;
+ string smtpCli = "";
+ string mittente = "";
+ string oggetto = "";
+ string userUrl = "";
+ string baseUrl = "";
+ string userWebUrl = "";
+ string baseWebUrl = "";
+ string corpo = "";
+ try
+ {
+ // compongo la stringa
+ smtpCli = utils.obj.confReadString("_smtpCli");
+ mittente = utils.obj.confReadString("_fromEmail");
+ oggetto = "Link autorizzazione device per GPW";
+ baseUrl = utils.obj.confReadString("baseUrl");
+ baseWebUrl = utils.obj.confReadString("baseWebUrl");
+ userUrl = string.Format("{2}jumper.aspx?UserAuthkey={0}&idxDipendente={1}", UserAuthKey, idxDipendente, baseUrl);
+ userWebUrl = string.Format("{2}jumper.aspx?UserAuthkey={0}&idxDipendente={1}", UserAuthKey, idxDipendente, baseWebUrl);
+ corpo = string.Format("Hai ricevuto questa email su richiesta tua o dell'Admin per poter procedere a registrare un (nuovo) devices con GPW:{0}
Per proseguire clicca sul link seguente(rete interna):
{0}{0}{1}{0}{0}
oppure sul link seguente (internet):
{0}{0}{2}{0}{0}
Team GPW Steamware", Environment.NewLine, userUrl, userWebUrl);
+#if false
+ gestEmail.ge.mandaEmail(mittente, destinatario, oggetto, corpo);
+ fatto = true;
+#endif
+ }
+ catch
+ { }
+ return fatto;
+ }
+
+
+ ///
+ /// idxDipendente in sessione
+ ///
+ public static int idxDipendente
+ {
+ get
+ {
+ int idx = 0;
+ try
+ {
+ idx = utils.obj.IntSessionObj("IdxDipendente");
+ }
+ catch
+ { }
+ return idx;
+ }
+ set
+ {
+ utils.obj.setSessionVal("idxDipendente", value);
+ }
+ }
+
+ public string CognomeNomeByIdx(int idxDip)
+ {
+ string answ = "";
+#if false
+ try
+ {
+ DS_Applicazione.DipendentiRow rigaDip = taDipendenti.getByIdx(idxDip)[0];
+ answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome);
+ }
+ catch
+ { }
+#endif
+ return answ;
+ }
+
+ #endregion
+ }
+}
diff --git a/ETS_Data/Ds_ProjEts.Designer.cs b/ETS_Data/Ds_ProjEts.Designer.cs
index b8d4725..449d35c 100644
--- a/ETS_Data/Ds_ProjEts.Designer.cs
+++ b/ETS_Data/Ds_ProjEts.Designer.cs
@@ -1099,7 +1099,7 @@ namespace ETS_Data.Ds_ProjEtsTableAdapters {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitCommandCollection() {
- this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "dbo.stp_AP_Expl_getData";
@@ -1111,6 +1111,19 @@ namespace ETS_Data.Ds_ProjEtsTableAdapters {
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxCliente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showPrjArch", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showPrjZeroH", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[1].Connection = this.Connection;
+ this._commandCollection[1].CommandText = "dbo.stp_AP_getByIdxCli";
+ this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxCliente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showPrjArch", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[2].Connection = this.Connection;
+ this._commandCollection[2].CommandText = "dbo.stp_AP_getByIdxPrj";
+ this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxProgetto", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -1209,6 +1222,46 @@ namespace ETS_Data.Ds_ProjEtsTableAdapters {
return dataTable;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
+ public virtual Ds_ProjEts.AnagProgettiDataTable geByIdxCli(global::System.Nullable idxCliente, global::System.Nullable showPrjArch) {
+ this.Adapter.SelectCommand = this.CommandCollection[1];
+ if ((idxCliente.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxCliente.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ if ((showPrjArch.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[2].Value = ((bool)(showPrjArch.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ Ds_ProjEts.AnagProgettiDataTable dataTable = new Ds_ProjEts.AnagProgettiDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
+ public virtual Ds_ProjEts.AnagProgettiDataTable getByIdxPrj(global::System.Nullable idxProgetto) {
+ this.Adapter.SelectCommand = this.CommandCollection[2];
+ if ((idxProgetto.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxProgetto.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ Ds_ProjEts.AnagProgettiDataTable dataTable = new Ds_ProjEts.AnagProgettiDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
diff --git a/ETS_Data/Ds_ProjEts.xsd b/ETS_Data/Ds_ProjEts.xsd
index de6a32c..772a05a 100644
--- a/ETS_Data/Ds_ProjEts.xsd
+++ b/ETS_Data/Ds_ProjEts.xsd
@@ -70,7 +70,31 @@
-
+
+
+
+
+ dbo.stp_AP_getByIdxCli
+
+
+
+
+
+
+
+
+
+
+
+ dbo.stp_AP_getByIdxPrj
+
+
+
+
+
+
+
+
@@ -80,7 +104,7 @@
-
+
diff --git a/ETS_Data/Ds_ProjEts.xss b/ETS_Data/Ds_ProjEts.xss
index 5f28270..a47ba7d 100644
--- a/ETS_Data/Ds_ProjEts.xss
+++ b/ETS_Data/Ds_ProjEts.xss
@@ -1 +1,12 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ETS_Data/ETS_Data.csproj b/ETS_Data/ETS_Data.csproj
index 174e441..352d563 100644
--- a/ETS_Data/ETS_Data.csproj
+++ b/ETS_Data/ETS_Data.csproj
@@ -81,6 +81,7 @@
+
True
True
diff --git a/ETS_Data/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/ETS_Data/obj/Debug/DesignTimeResolveAssemblyReferences.cache
index b034123..8dde906 100644
Binary files a/ETS_Data/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/ETS_Data/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/ETS_Data/obj/Debug/ETS_Data.dll b/ETS_Data/obj/Debug/ETS_Data.dll
index 39f210c..1e1769b 100644
Binary files a/ETS_Data/obj/Debug/ETS_Data.dll and b/ETS_Data/obj/Debug/ETS_Data.dll differ
diff --git a/ETS_Data/obj/Debug/TempPE/Ds_ProjEts.Designer.cs.dll b/ETS_Data/obj/Debug/TempPE/Ds_ProjEts.Designer.cs.dll
index 771644d..17132ce 100644
Binary files a/ETS_Data/obj/Debug/TempPE/Ds_ProjEts.Designer.cs.dll and b/ETS_Data/obj/Debug/TempPE/Ds_ProjEts.Designer.cs.dll differ
diff --git a/ETS_Data/utils.cs b/ETS_Data/utils.cs
index d0ed9f9..3c3c78d 100644
--- a/ETS_Data/utils.cs
+++ b/ETS_Data/utils.cs
@@ -509,6 +509,13 @@ namespace ETS_Data
return answ;
}
+ public static int pageSize
+ {
+ get
+ {
+ return obj.confReadInt("pageSize");
+ }
+ }
#endregion
}
///
diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_periodoAnalisi.ascx.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_periodoAnalisi.ascx.cs
index 94ce9a8..31b4f62 100644
--- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_periodoAnalisi.ascx.cs
+++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_periodoAnalisi.ascx.cs
@@ -319,6 +319,14 @@ namespace PROJ_ETS.WebUserControls
utils.obj.setSessionVal("rltUpdatePeriodo", value);
}
}
+ ///
+ ///
+ ///
+ ///
+ public bool isWritable()
+ {
+ return true;
+ }
#region gestione eventi
diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx
index c8e6e56..a81811a 100644
--- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx
+++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx
@@ -5,17 +5,174 @@
<%----%>
- <%--
-
-
--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+ --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%----%>
\ No newline at end of file
diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.cs
index cd5e930..85d0ec9 100644
--- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.cs
+++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.cs
@@ -4,14 +4,481 @@ using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
+using System.Data;
+using ETS_Data;
namespace PROJ_ETS.WebUserControls
{
public partial class mod_progetti : System.Web.UI.UserControl
{
+ #region area standard (non modificare)
+
+ #region gestione eventi
+
+ public event EventHandler eh_resetSelezione;
+ public event EventHandler eh_nuovoValore;
+ public event EventHandler eh_selValore;
+
+ #endregion
+#if false
+
+ ///
+ /// effettua traduzione del lemma
+ ///
+ ///
+ ///
+ public string traduci(string lemma)
+ {
+ return user_std.UtSn.Traduci(lemma);
+ }
+#endif
+
+ ///
+ /// resetta la selezione dei valori in caso di modifiche su altri controlli
+ ///
+ public void resetSelezione()
+ {
+ grView.SelectedIndex = -1;
+ grView.DataBind();
+ //mod_dettaglioProgetto1.Visible = false;
+ if (eh_resetSelezione != null)
+ {
+ eh_resetSelezione(this, new EventArgs());
+ }
+ }
+ ///
+ /// reset della selezione
+ ///
+ ///
+ ///
+ protected void btnReset_Click(object sender, EventArgs e)
+ {
+ resetSelezione();
+ }
+ ///
+ /// gestione evento richiesta nuovo valore (mostra footer, ...)
+ ///
+ ///
+ ///
+ protected void btnNew_Click(object sender, EventArgs e)
+ {
+ // reset selezione...
+ resetSelezione();
+ // mostro il footer oppure la riga dei dettagli x nuovo...
+ if (grView.FooterRow != null)
+ {
+ grView.FooterRow.Visible = true;
+ }
+ // sollevo evento nuovo valore...
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// 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)
+ {
+ 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 = "";
+ }
+ }
+
+ #endregion
+
+ #region area CUSTOM (da modificare)
+
+ ///
+ /// pagina corrente (URL finale)
+ ///
+ public string _paginaCorrente { get; set; }
+ ///
+ /// determina se siano da visualizzare i progetti già chiusi
+ ///
+ public bool showChiusi
+ {
+ get
+ {
+ return utils.obj.BoolSessionObj("showPrjArch");
+ }
+ set
+ {
+ utils.obj.setSessionVal("showPrjArch", value);
+ }
+ }
+ ///
+ /// determina se siano visibili progetti "vuoti" con zero ore caricate quindi
+ ///
+ public bool showVuoti
+ {
+ get
+ {
+ return utils.obj.BoolSessionObj("showPrjZeroH");
+ }
+ set
+ {
+ utils.obj.setSessionVal("showPrjZeroH", value);
+ }
+ }
+ ///
+ /// caricamento
+ ///
+ ///
+ ///
protected void Page_Load(object sender, EventArgs e)
{
-
+ //grView.PageSize = utils.pageSize;
+ if (!Page.IsPostBack)
+ {
+ // imposto intervallo date...10 anni...
+ intervalloDate date = new intervalloDate();
+ date.fine = DateTime.Now.Date.AddDays(1);
+ date.inizio = date.fine.AddYears(-10);
+ mod_periodoAnalisi1.intervalloAnalisi = date;
+ // svuoto variabili sessione
+ utils.obj.emptySessionVal("idxProgetto_sel");
+ utils.obj.emptySessionVal("idxCli_sel");
+#if false
+ filtroCli.ods = odsClienti;
+ filtroCli.reselFirst();
+ filtroCli.isChecked = false;
+#endif
+ showChiusi = false;
+ showVuoti = true;
+#if false
+ mod_dettaglioProgetto1.Visible = false;
+#endif
+ }
+#if false
+ filtroCli.eh_selValore += new EventHandler(filtroCli_eh_selValore);
+ mod_dettaglioProgetto1.eh_nuovoValore += new EventHandler(mod_dettaglioProgetto1_eh_nuovoValore);
+#endif
}
+ ///
+ /// 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();
+ }
+ ///
+ /// cambiati dati dettaglio (attivo/inattivo)
+ ///
+ ///
+ ///
+ void mod_dettaglioProgetto1_eh_nuovoValore(object sender, EventArgs e)
+ {
+ doUpdate();
+ }
+ ///
+ /// selezionato valore, filtro!
+ ///
+ ///
+ ///
+ void filtroCli_eh_selValore(object sender, EventArgs e)
+ {
+#if false
+ if (filtroCli.isChecked)
+ {
+ utils.obj.setSessionVal("idxCli_sel", filtroCli.valoreInt);
+ }
+ else
+ {
+ utils.obj.setSessionVal("idxCli_sel", 0);
+ }
+ grView.DataBind();
+#endif
+ }
+ ///
+ /// elenco colonne del datagrid
+ ///
+ ///
+ protected DataColumnCollection colonneObj()
+ {
+ Ds_ProjEts.AnagProgettiDataTable tabella = new Ds_ProjEts.AnagProgettiDataTable();
+ DataColumnCollection colonne = tabella.Columns;
+ return colonne;
+ }
+ ///
+ /// determina se sia eliminabile il record (=non usato)
+ ///
+ ///
+ ///
+ public bool delEnabled(object idxObj)
+ {
+ bool answ = isWritable();
+ // solo se ha diritti scrittura controllo
+ if (answ)
+ {
+ int trovati = 0;
+ // !!!FARE!!!
+#if false
+ // controllo se ci siano tipo celle associate
+ trovati = MagClass.magazzino.taTipoCella.getByCodMag(utils.obj.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
+ // controllo se ci siano blocchi associati
+ trovati = trovati + MagClass.magazzino.taBlocchi.getByCodMag(utils.obj.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
+#endif
+ // controllo se ci sono record correlati...
+ if (trovati > 0)
+ {
+ answ = false;
+ }
+ }
+ return answ;
+ }
+ ///
+ /// evento selezione!
+ ///
+ ///
+ ///
+ protected void grView_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ utils.obj.setSessionVal("idxProgetto_sel", grView.SelectedDataKey["idxProgetto"]);
+ //mod_dettaglioProgetto1.Visible = true;
+ if (eh_selValore != null)
+ {
+ eh_selValore(this, new EventArgs());
+ }
+ }
+ ///
+ /// determina se mostrare i progetti archiviati
+ ///
+ ///
+ ///
+ protected void chkShowChiusi_CheckedChanged(object sender, EventArgs e)
+ {
+ showChiusi = chkShowChiusi.Checked;
+ grView.DataBind();
+ }
+ ///
+ /// salvo in session che il prox comando è clonare...
+ ///
+ ///
+ ///
+ protected void imgDettFasi_Click(object sender, ImageClickEventArgs e)
+ {
+ utils.obj.setSessionVal("nextObjCommand", "dettFasi");
+ }
+ ///
+ /// intercetto eventuale update fittizio x rimandare a pagina dett fasi
+ ///
+ ///
+ ///
+ protected void grView_RowUpdating(object sender, GridViewUpdateEventArgs e)
+ {
+ // salvo progetto sel
+ utils.obj.setSessionVal("idxProgetto_sel", e.Keys["idxProgetto"]);
+ // quale comando?
+ string _comando = "";
+ if (utils.obj.isInSessionObject("nextObjCommand"))
+ {
+ _comando = utils.obj.StringSessionObj("nextObjCommand");
+ utils.obj.emptySessionVal("nextObjCommand");
+ }
+ // verifico il tipo di richiesta (clona o update normale)
+ switch (_comando)
+ {
+ case "dettFasi":
+ // salvo idxCli...
+ int idxCli = 0;
+ try
+ {
+ idxCli = DataProxy_ProjEts.DP.taAP.getByIdxPrj(utils.obj.IntSessionObj("idxProgetto_sel"))[0].idxCliente;
+ }
+ catch
+ { }
+ utils.obj.setSessionVal("idxCli_sel", idxCli);
+ Response.Redirect("fasi.aspx");
+ // blocco update!
+ e.Cancel = true;
+ break;
+ default:
+ // faccio update!
+ break;
+ }
+ }
+ ///
+ /// effettua update controllo
+ ///
+ public void doUpdate()
+ {
+ resetSelezione();
+ }
+ ///
+ /// inverte valore booleano
+ ///
+ ///
+ ///
+ public bool invBool(object valore)
+ {
+ bool answ = true;
+ try
+ {
+ answ = !Convert.ToBoolean(valore);
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// restituisce una classe css a seconda dei valori passati:
+ /// green: bdgt > real
+ /// orange: real > bdgt*warning
+ /// red: real > bdgt
+ /// std: errore...
+ ///
+ ///
+ ///
+ ///
+ public string colorByVal(object real, object bdgt)
+ {
+ string answ = "badgeStd";
+ try
+ {
+ double valoreReal = Convert.ToDouble(real);
+ double valoreBdget = Convert.ToDouble(bdgt);
+ double valoreWarn = Convert.ToDouble(bdgt) * Convert.ToDouble(utils.obj.confReadString("warningRatioPerc")) / 100;
+ if (valoreReal >= valoreBdget)
+ {
+ answ = "badgeRosso";
+ }
+ else if (valoreReal >= valoreWarn)
+ {
+ answ = "badgeArancio";
+ }
+ else
+ {
+ answ = "badgeVerde";
+ }
+ }
+ catch
+ {
+ }
+ return "ui-corner-all " + answ;
+ }
+ ///
+ /// cambia impsotazione show/hide progetti con ore a zero...
+ ///
+ ///
+ ///
+ protected void chkShowVuoti_CheckedChanged(object sender, EventArgs e)
+ {
+ showVuoti = chkShowVuoti.Checked;
+ grView.DataBind();
+ }
+ ///
+ /// 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;
+ }
+ ///
+ /// 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 = "";
+ }
+ }
+ ///
+ /// check licenze in fase di update...
+ ///
+ ///
+ ///
+ protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
+ {
+#if false
+ if (!licenzeGPW.checkLicenze)
+ {
+ // annullo insert se licenze sforate...
+ e.Cancel = true;
+ grView.EditIndex = -1;
+ grView.DataBind();
+ }
+#endif
+ }
+
+
+ #endregion
}
}
\ No newline at end of file
diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.designer.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.designer.cs
index 73c38ef..5da3445 100644
--- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.designer.cs
+++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_progetti.ascx.designer.cs
@@ -20,5 +20,59 @@ namespace PROJ_ETS.WebUserControls {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::PROJ_ETS.WebUserControls.mod_periodoAnalisi mod_periodoAnalisi1;
+
+ ///
+ /// chkShowChiusi control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox chkShowChiusi;
+
+ ///
+ /// chkShowVuoti control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox chkShowVuoti;
+
+ ///
+ /// 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;
+
+ ///
+ /// 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;
+
+ ///
+ /// 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/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll b/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll
index 39f210c..1e1769b 100644
Binary files a/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll and b/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll differ
diff --git a/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll b/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll
index 33ac9f5..8d13330 100644
Binary files a/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll and b/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll differ
diff --git a/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.csprojResolveAssemblyReference.cache b/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.csprojResolveAssemblyReference.cache
index d5dfe3d..20f28d7 100644
Binary files a/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.csprojResolveAssemblyReference.cache and b/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.csprojResolveAssemblyReference.cache differ
diff --git a/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.dll b/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.dll
index 33ac9f5..8d13330 100644
Binary files a/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.dll and b/PROJ-ETS/PROJ-ETS/obj/Debug/PROJ-ETS.dll differ