fix permesso visibilità a tutti i CC di TUTTO lo schedulato, con editing solo proprio
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<add key="appName" value="PROJ-ETS" />
|
||||
<add key="SiteName" value="ETS" />
|
||||
<add key="mainRev" value="1.0" />
|
||||
<add key="minRev" value="224" />
|
||||
<add key="minRev" value="226" />
|
||||
<add key="stdEmail" value="info@steamware.net" />
|
||||
<add key="_safePages" value="Default.aspx#unauthorized.aspx#forceUser.aspx#login.aspx#test.aspx#Test.aspx" />
|
||||
<!--area gestione auth cookie-->
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace PROJ_ETS.WebUserControls
|
||||
btnReleaseWeek.ToolTip = "Rilascia il piano settimanale copiando in GPW lo schema delle ore a progetto indicate per la settimana";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// anno selezionato (wrapper)
|
||||
@@ -232,15 +232,7 @@ namespace PROJ_ETS.WebUserControls
|
||||
idxDip = tabBaz[0].idxDipendente;
|
||||
// calcolo num celel totali
|
||||
totCelle = tabBaz.Rows.Count;
|
||||
// a secondo del ruolo utente (PowerUser|PowerReader oppure CC) determino quali commesse siano visibili
|
||||
if (isCC && !(isPowerReader || isPowerUser))
|
||||
{
|
||||
tabBazSingle = DataProxy_ProjEts.DP.taBaz.getByAnnoSettCC(anno, settimana, idxDip, user_std.UtSn.currUserNomeCognome);
|
||||
}
|
||||
else
|
||||
{
|
||||
tabBazSingle = DataProxy_ProjEts.DP.taBaz.getByAnnoSettDip(anno, settimana, idxDip);
|
||||
}
|
||||
tabBazSingle = DataProxy_ProjEts.DP.taBaz.getByAnnoSettDip(anno, settimana, idxDip);
|
||||
// calcolo numero commesse!
|
||||
numComm = tabBazSingle.Rows.Count;
|
||||
numDip = tabD2ATR.Rows.Count;
|
||||
@@ -401,7 +393,7 @@ namespace PROJ_ETS.WebUserControls
|
||||
if (showOre)
|
||||
{
|
||||
// controllo edit è abilitato
|
||||
if (editEnabled)
|
||||
if (editEnabled && (isPowerUser || isCurrentCC(tabBazSingle[pos_y].idxFase)))
|
||||
{
|
||||
// aggiungo button x fare elemento cliccabile
|
||||
LinkButton lnkbDel = new LinkButton();
|
||||
@@ -494,7 +486,7 @@ namespace PROJ_ETS.WebUserControls
|
||||
cell = new TableCell();
|
||||
cell.CssClass = TabellaRisorse[pos_x, pos_y].Css;
|
||||
// controllo edit è abilitato
|
||||
if (editEnabled)
|
||||
if (editEnabled && (isPowerUser || isCurrentCC(TabellaRisorse[pos_x, pos_y].IdxFase)))
|
||||
{
|
||||
// aggiungo button x fare elemento cliccabile
|
||||
LinkButton lnkb = new LinkButton();
|
||||
@@ -802,6 +794,27 @@ namespace PROJ_ETS.WebUserControls
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// risponde alla domanda se l'utente sia CC della commessa indicata dalla fase
|
||||
/// </summary>
|
||||
/// <param name="idxFase"></param>
|
||||
/// <returns></returns>
|
||||
public bool isCurrentCC(int idxFase)
|
||||
{
|
||||
bool answ = false;
|
||||
string CapoCommessa = "";
|
||||
try
|
||||
{
|
||||
CapoCommessa = DataProxy_ProjEts.DP.taDC.GetData(idxFase)[0].CapoCommessa;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (user_std.UtSn.currUserNomeCognome == CapoCommessa || user_std.UtSn.currUserCognomeNome == CapoCommessa)
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se la settimana sia già stata rilasciata (c'è record in tab ReleasedWeek e quindi è stato esportato su GPW)
|
||||
/// </summary>
|
||||
public bool isReleased
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user