diff --git a/Db/GIM.zip b/Db/GIM.zip index a1da76c..5f825c5 100644 Binary files a/Db/GIM.zip and b/Db/GIM.zip differ diff --git a/WebSites/WebGIM/mod_dettaglioIntervento.ascx.cs b/WebSites/WebGIM/mod_dettaglioIntervento.ascx.cs index 59a4a9d..9873623 100644 --- a/WebSites/WebGIM/mod_dettaglioIntervento.ascx.cs +++ b/WebSites/WebGIM/mod_dettaglioIntervento.ascx.cs @@ -36,6 +36,9 @@ public partial class mod_dettaglioIntervento : System.Web.UI.UserControl frmView_default.ChangeMode(FormViewMode.ReadOnly); frmView_default.Visible = true; frmView_full.Visible = false; + btnCancel.Enabled= userCanEditData; + btnCompilaMtz.Enabled = userCanEditData; + btnEditFull.Enabled = userCanEditData; } /// /// effettua traduzione pagina in lingua corrente @@ -126,4 +129,15 @@ public partial class mod_dettaglioIntervento : System.Web.UI.UserControl { btnCancel.Visible = true; } + + /// + /// determina se l'utente possa editare i dati (permesso "_SU" + /// + public bool userCanEditData + { + get + { + return (user_std.UtSn.diritti.Select("COD_FUNZIONE = 'GIM_SU'").Length > 0); + } + } } diff --git a/WebSites/WebGIM/mod_elencoRichieste.ascx.cs b/WebSites/WebGIM/mod_elencoRichieste.ascx.cs index 0fdae4a..d8ce85f 100644 --- a/WebSites/WebGIM/mod_elencoRichieste.ascx.cs +++ b/WebSites/WebGIM/mod_elencoRichieste.ascx.cs @@ -91,7 +91,7 @@ public partial class mod_elencoRichieste : ApplicationUserControl protected void grView_SelectedIndexChanged(object sender, EventArgs e) { // salvo in session il valore selezionato... - SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue,true); + SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, true); // sollevo evento nuovo valore... if (eh_selValore != null) { @@ -308,13 +308,20 @@ public partial class mod_elencoRichieste : ApplicationUserControl public bool isPrInCarEnabl(object num) { bool answ = false; - try + // se l'utente è BASE la presa in carico NON è permessa... + if (user_std.UtSn.diritti.Select("COD_FUNZIONE = 'GIM_SU'").Length > 0) { - int idxStato = TA_app.obj.taInterventiMtz.getByIdx(Convert.ToInt32(num))[0].idxStato; - if (idxStato == 1) answ = true; + try + { + int idxStato = TA_app.obj.taInterventiMtz.getByIdx(Convert.ToInt32(num))[0].idxStato; + if (idxStato == 1) + { + answ = true; + } + } + catch + { } } - catch - { } return answ; } /// @@ -351,7 +358,7 @@ public partial class mod_elencoRichieste : ApplicationUserControl if (!chkMostraIntChiusi.Checked) { ods.FilterExpression += " AND (idxStato < 3)"; - } + } ods.DataBind(); } #endregion