corretto errore utenti soloCC/User se vuoto in registro attività di competenza

This commit is contained in:
Samuele Locatelli
2013-09-16 17:06:34 +02:00
parent 011dcaf762
commit 2fca73c30a
3 changed files with 31 additions and 19 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
<add key="appName" value="PROJ-ETS" />
<add key="SiteName" value="ETS" />
<add key="mainRev" value="0.9" />
<add key="minRev" value="210" />
<add key="minRev" value="211" />
<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-->
@@ -131,6 +131,14 @@ namespace PROJ_ETS.WebUserControls
TabellaRisorse = new ETS_Data.Type.ImpiegoRes[numDip, numComm];
oreTotDip = new int[numDip];
oreTotComm = new int[numComm];
for (int ii = 0; ii < numDip; ii++)
{
oreTotDip[ii] = 0;
}
for (int ii = 0; ii < numComm; ii++)
{
oreTotComm[ii] = 0;
}
// carico i dati nell'array: di default tutto VUOTO, con posizione attiva...
for (int pos_y = 0; pos_y < numComm; pos_y++)
{
@@ -194,29 +202,33 @@ namespace PROJ_ETS.WebUserControls
riga.Cells.Add(cell);
// variabili accessorie x dip
Ds_ProjEts.DipendentiRow rigaDip;
// preparo celle!
for (int pos_x = 0; pos_x < numDip; pos_x++)
// se ho dati
if (numDip > 0 && numComm > 0)
{
cell = new TableCell();
cell.CssClass = "cBia";
if (showOre)
// preparo celle!
for (int pos_x = 0; pos_x < numDip; pos_x++)
{
cell.Text = string.Format("{0:0#} h", oreTotDip[pos_x]);
cell.ToolTip = "";
// SE sono oltre 40h coloro di rosso!!!
if (oreTotDip[pos_x] > 40)
cell = new TableCell();
cell.CssClass = "cBia";
if (showOre)
{
cell.CssClass = "cBia lblErrore";
cell.Text = string.Format("{0:0#} h", oreTotDip[pos_x]);
cell.ToolTip = "";
// SE sono oltre 40h coloro di rosso!!!
if (oreTotDip[pos_x] > 40)
{
cell.CssClass = "cBia lblErrore";
}
}
else
{
rigaDip = (Ds_ProjEts.DipendentiRow)tabDip.Select(string.Format("idxDipendente={0}", tabD2ATR[pos_x].idxDipendente))[0];
//cell.Text = rigaDip.SIGLA;
cell.Text = rigaDip.Nome.Substring(0, 1) + rigaDip.Cognome.Substring(0, 1) + rigaDip.Cognome.Substring(1, 2).ToLower();
cell.ToolTip = string.Format("{0} {1}", rigaDip.Nome, rigaDip.Cognome);
}
riga.Cells.Add(cell);
}
else
{
rigaDip = (Ds_ProjEts.DipendentiRow)tabDip.Select(string.Format("idxDipendente={0}", tabD2ATR[pos_x].idxDipendente))[0];
//cell.Text = rigaDip.SIGLA;
cell.Text = rigaDip.Nome.Substring(0, 1) + rigaDip.Cognome.Substring(0, 1) + rigaDip.Cognome.Substring(1, 2).ToLower();
cell.ToolTip = string.Format("{0} {1}", rigaDip.Nome, rigaDip.Cognome);
}
riga.Cells.Add(cell);
}
// cella vuota finale
cell = new TableCell();
Binary file not shown.