From e474cc5b2b896cb21a9288452c2dc64e8f3d433d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 5 Sep 2018 18:57:06 +0200 Subject: [PATCH] =?UTF-8?q?FIX=20SEL=20POST=20(solo=20se=20=C3=A8=20LUI=20?= =?UTF-8?q?a=20occuparla...)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- C-TRACK/WebUserControls/mod_postazioni.ascx | 2 +- C-TRACK/WebUserControls/mod_postazioni.ascx.cs | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/C-TRACK/WebUserControls/mod_postazioni.ascx b/C-TRACK/WebUserControls/mod_postazioni.ascx index 296f923..2ca3cbb 100644 --- a/C-TRACK/WebUserControls/mod_postazioni.ascx +++ b/C-TRACK/WebUserControls/mod_postazioni.ascx @@ -12,7 +12,7 @@ - + diff --git a/C-TRACK/WebUserControls/mod_postazioni.ascx.cs b/C-TRACK/WebUserControls/mod_postazioni.ascx.cs index 40330f5..4b2ec13 100644 --- a/C-TRACK/WebUserControls/mod_postazioni.ascx.cs +++ b/C-TRACK/WebUserControls/mod_postazioni.ascx.cs @@ -116,5 +116,16 @@ namespace C_TRACK.WebUserControls return hasLock && (isPower || isHimself); } + /// + /// Verifica se sia possibile sbloccare la postazione (togliere Opr corrente: + /// - è un user "power" + /// - è LUI STESSO l'utente da levare + /// + public bool canSelPost(string thisCodOpr) + { + bool hasLock = thisCodOpr != ""; + bool isHimself = (CodOpr == thisCodOpr); + return hasLock && isHimself; + } } } \ No newline at end of file