diff --git a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx index 4cda909..2e49777 100644 --- a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx +++ b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx @@ -4,6 +4,12 @@ { %> <% } %> + +
+
+ +
+
@@ -206,7 +212,7 @@ - + diff --git a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs index 05a048c..057abcd 100644 --- a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs +++ b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs @@ -12,54 +12,31 @@ namespace GPW_Admin.WebUserControls { public partial class mod_adminDipendenti : System.Web.UI.UserControl { - #region area standard (non modificare) + #region Public Events - #region gestione eventi - - public event EventHandler eh_resetSelezione; public event EventHandler eh_nuovoValore; - #endregion + public event EventHandler eh_resetSelezione; + + #endregion Public Events + + #region Public Properties /// - /// effettua traduzione del lemma + /// controllo stato licenze! /// - /// - /// - public string traduci(string lemma) + public bool chkLicOk { - return user_std.UtSn.Traduci(lemma); - } - /// - /// caricamento - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - grView.PageSize = utils.pageSize; - } - /// - /// resetta la selezione dei valori in caso di modifiche su altri controlli - /// - public void resetSelezione() - { - grView.SelectedIndex = -1; - grView.DataBind(); - if (eh_resetSelezione != null) + get { - eh_resetSelezione(this, new EventArgs()); + return (licenzeGPW.utentiAttivi < licenzeGPW.licenzeAttive); } } - /// - /// reset della selezione - /// - /// - /// - protected void btnReset_Click(object sender, EventArgs e) - { - resetSelezione(); - } + + #endregion Public Properties + + #region Protected Methods + /// /// gestione evento richiesta nuovo valore (mostra footer, ...) /// @@ -80,26 +57,43 @@ namespace GPW_Admin.WebUserControls eh_nuovoValore(this, new EventArgs()); } } + /// - /// inserisce nuovo valore da footer + /// reset della selezione /// /// /// - protected void lblIns_click(object sender, EventArgs e) + protected void btnReset_Click(object sender, EventArgs e) { - // click su inserimento, chiamo il metodo insert dell'ObjectDataSource - ods.Insert(); + resetSelezione(); } + + protected void chkshowAll_CheckedChanged(object sender, EventArgs e) + { + // in base a selezione cambio metodo ods + string selMethod = "GetData"; + if (!chkshowAll.Checked) + { + selMethod = "getAttivi"; + } + ods.SelectMethod = selMethod; + grView.DataBind(); + } + /// - /// annulla inserimento nuovo valore da footer + /// elenco colonne del datagrid /// - /// - /// - protected void lblCanc_click(object sender, EventArgs e) + /// + protected DataColumnCollection colonneObj() { - // annullo inserimento: nascondo footer, bind controlli... - grView.FooterRow.Visible = false; + DataColumnCollection colonne = null; + using (DS_Applicazione.DipendentiDataTable tabella = new DS_Applicazione.DipendentiDataTable()) + { + colonne = tabella.Columns; + } + return colonne; } + /// /// traduce gli header delle colonne /// @@ -110,7 +104,7 @@ namespace GPW_Admin.WebUserControls if (grView.Rows.Count > 0) { LinkButton lb; - // aggiorno gli headers + // aggiorno gli headers foreach (TableCell cella in grView.HeaderRow.Cells) { try @@ -130,56 +124,57 @@ namespace GPW_Admin.WebUserControls } } - #endregion - - #region area CUSTOM (da modificare) - /// - /// elenco colonne del datagrid + /// annulla inserimento nuovo valore da footer /// - /// - protected DataColumnCollection colonneObj() + /// + /// + protected void lblCanc_click(object sender, EventArgs e) { - DataColumnCollection colonne = null; - using (DS_Applicazione.DipendentiDataTable tabella = new DS_Applicazione.DipendentiDataTable()) - { - colonne = tabella.Columns; - } - return colonne; + // annullo inserimento: nascondo footer, bind controlli... + grView.FooterRow.Visible = false; } + /// - /// determina se sia eliminabile il record (=non usato) + /// inserisce nuovo valore da footer /// - /// - /// - public bool delEnabled(object idxObj) + /// + /// + protected void lblIns_click(object sender, EventArgs e) { - bool answ = true; - // solo se ha diritti scrittura controllo - if (idxObj != null) + // click su inserimento, chiamo il metodo insert dell'ObjectDataSource + ods.Insert(); + } + + /// + /// check licenze in fase di update... + /// + /// + /// + protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e) + { + if (e != null) { - int trovati = 0; - int idxDip = 0; - _ = int.TryParse(idxObj.ToString(), out idxDip); - trovati = DataProxy.DP.taTimb.getLastByDip(idxDip).Count; - // controllo se ci sono record correlati... - if (trovati > 0) + if (!licenzeGPW.checkLicenze) { - answ = false; + // annullo insert se licenze sforate... + e.Cancel = true; + grView.EditIndex = -1; + grView.DataBind(); } } - return answ; } + /// - /// controllo stato licenze! + /// caricamento /// - public bool chkLicOk + /// + /// + protected void Page_Load(object sender, EventArgs e) { - get - { - return (licenzeGPW.utentiAttivi < licenzeGPW.licenzeAttive); - } + grView.PageSize = utils.pageSize; } + /// /// recupera i dati di un nuovo record contenuti nel footer di un gridView; /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...) @@ -218,12 +213,15 @@ namespace GPW_Admin.WebUserControls 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; } @@ -241,26 +239,58 @@ namespace GPW_Admin.WebUserControls } } } + + #endregion Protected Methods + + #region Public Methods + /// - /// check licenze in fase di update... + /// determina se sia eliminabile il record (=non usato) /// - /// - /// - protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e) + /// + /// + public bool delEnabled(object idxObj) { - if (e != null) + bool answ = true; + // solo se ha diritti scrittura controllo + if (idxObj != null) { - if (!licenzeGPW.checkLicenze) + int trovati = 0; + int idxDip = 0; + _ = int.TryParse(idxObj.ToString(), out idxDip); + trovati = DataProxy.DP.taTimb.getLastByDip(idxDip).Count; + // controllo se ci sono record correlati... + if (trovati > 0) { - // annullo insert se licenze sforate... - e.Cancel = true; - grView.EditIndex = -1; - grView.DataBind(); + answ = false; } } + return answ; + } + + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + if (eh_resetSelezione != null) + { + eh_resetSelezione(this, new EventArgs()); + } } - #endregion + /// + /// effettua traduzione del lemma + /// + /// + /// + public string traduci(string lemma) + { + return user_std.UtSn.Traduci(lemma); + } + #endregion Public Methods } } \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.designer.cs b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.designer.cs index 7bf3d82..a0a7972 100644 --- a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.designer.cs @@ -14,6 +14,15 @@ namespace GPW_Admin.WebUserControls public partial class mod_adminDipendenti { + /// + /// Controllo chkshowAll. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.CheckBox chkshowAll; + /// /// Controllo grView. /// diff --git a/Jenkinsfile b/Jenkinsfile index 2ac81a9..6dc1dd9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=4133']) { + withEnv(['NEXT_BUILD_NUMBER=4134']) { // env.versionNumber = VersionNumber(versionNumberString : '2.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '2.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'GPW'