0.8.197
completato con spostamenti rapidi (e ri-verifica criteri editabilità...)
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<add key="appName" value="PROJ-ETS" />
|
||||
<add key="SiteName" value="ETS" />
|
||||
<add key="mainRev" value="0.8" />
|
||||
<add key="minRev" value="196" />
|
||||
<add key="minRev" value="197" />
|
||||
<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-->
|
||||
@@ -49,7 +49,7 @@
|
||||
<add key="codTipoRisorsaStd" value="DIS" />
|
||||
<add key="oreBdgtStd" value="1" />
|
||||
<!--gestione bazaar-->
|
||||
<add key="bazCudPastEnabled" value="false"/>
|
||||
<add key="bazCudPastEnabled" value="true"/>
|
||||
<add key="soglia1" value="10" />
|
||||
<add key="soglia2" value="20" />
|
||||
<add key="soglia3" value="30" />
|
||||
|
||||
@@ -13,21 +13,18 @@
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource ID="odsWeek" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="ETS_Data.DS_utilsProjEtsTableAdapters.v_selWeekTableAdapter"></asp:ObjectDataSource>
|
||||
</div>
|
||||
<div class="divSx filtro_2 ui-corner-all" style="padding: 6px; margin-right: 4px; height: 1.5em; font-weight:bold; width:2em; vertical-align:middle; text-align:center;">
|
||||
<asp:LinkButton runat="server" ID="lnkWPrev" CommandArgument="Prev" Text="-1" ToolTip="Vai alla sett precedente" OnClick="lnkW_Click" />
|
||||
</div>
|
||||
<div class="divSx filtro_2 ui-corner-all" style="padding: 6px 3px; margin-right: 4px; height: 1.5em; font-weight:bold; width:2.5em; vertical-align:middle; text-align:center;">
|
||||
<asp:LinkButton runat="server" ID="lnkW" CommandArgument="Curr" Text="W" ToolTip="Vai alla sett corrente" OnClick="lnkW_Click" />
|
||||
</div>
|
||||
<div class="divSx filtro_2 ui-corner-all" style="padding: 6px; margin-right: 4px; height: 1.5em; font-weight:bold; width:2em; vertical-align:middle; text-align:center;">
|
||||
<asp:LinkButton runat="server" ID="lnkWNext" CommandArgument="Next" Text="+1" ToolTip="Vai alla sett successiva" OnClick="lnkW_Click" />
|
||||
</div>
|
||||
<div class="divSx" style="padding: 0px; margin-right: 4px; height: 2em;">
|
||||
<asp:Button runat="server" ID="btnAddNew" Text="Aggiungi Commesse" ToolTip="Mostra pannello Aggiungi Commesse" CssClass="btnNew" OnClick="btnAddNew_Click" />
|
||||
</div>
|
||||
<div class="divSx" style="padding: 0px; margin-right: 4px; height: 2em;">
|
||||
W-1
|
||||
</div>
|
||||
<div class="divSx" style="padding: 0px; margin-right: 4px; height: 2em;">
|
||||
W
|
||||
</div>
|
||||
<div class="divSx" style="padding: 0px; margin-right: 4px; height: 2em;">
|
||||
W+1
|
||||
</div>
|
||||
<div class="divSx" style="padding: 0px; margin-right: 4px; height: 2em;">
|
||||
W+2
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearDiv">
|
||||
<asp:Panel runat="server" ID="pnlAddNew" Visible="false" CssClass="divSx filtro_1 fontPiccolo ui-corner-all shadowBox">
|
||||
|
||||
@@ -68,9 +68,20 @@ namespace PROJ_ETS.WebUserControls
|
||||
/// </summary>
|
||||
protected DateTime adesso
|
||||
{
|
||||
set
|
||||
{
|
||||
utils.obj.setSessionVal("timeBazaar", value);
|
||||
}
|
||||
get
|
||||
{
|
||||
return DateTime.Now;
|
||||
DateTime answ = DateTime.Now;
|
||||
try
|
||||
{
|
||||
answ = (DateTime)utils.obj.objSessionObj("timeBazaar");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -82,10 +93,11 @@ namespace PROJ_ETS.WebUserControls
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
ddlAnno.SelectedValue = adesso.Year.ToString();
|
||||
ddlWeek.SelectedValue = (datario.WeekOfYearISO8601(adesso) + 1).ToString();
|
||||
setDdlPeriodo();
|
||||
showPnlAddNewComm(false);
|
||||
lblOut.Text = "";
|
||||
//importo sett corrente
|
||||
lnkW.Text = string.Format("W{0:0#}", datario.WeekOfYearISO8601(DateTime.Now));
|
||||
}
|
||||
// carico tabelle: elenco dipendenti (raggruppato x tipo) ed elenco dip in bazaar...
|
||||
tabDip = DataProxy_ProjEts.DP.taDip.GetData();
|
||||
@@ -94,6 +106,14 @@ namespace PROJ_ETS.WebUserControls
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta DDL del periodo
|
||||
/// </summary>
|
||||
private void setDdlPeriodo()
|
||||
{
|
||||
ddlAnno.SelectedValue = adesso.Year.ToString();
|
||||
ddlWeek.SelectedValue = (datario.WeekOfYearISO8601(adesso)).ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// esegue update controllo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
@@ -132,7 +152,7 @@ namespace PROJ_ETS.WebUserControls
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = datario.WeekOfYearISO8601(adesso) + 1;
|
||||
int answ = datario.WeekOfYearISO8601(adesso);
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(ddlWeek.SelectedValue);
|
||||
@@ -154,7 +174,8 @@ namespace PROJ_ETS.WebUserControls
|
||||
// se non globalmente permesso controllo se sia anno/sett successiva a quelal corrente
|
||||
if (!answ)
|
||||
{
|
||||
if ((anno > adesso.Year) || ((anno == adesso.Year) && (settimana > datario.WeekOfYearISO8601(adesso))))
|
||||
DateTime ora = DateTime.Now;
|
||||
if ((anno > ora.Year) || ((anno == ora.Year) && (settimana > datario.WeekOfYearISO8601(ora))))
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
@@ -189,7 +210,10 @@ namespace PROJ_ETS.WebUserControls
|
||||
numDip = totCelle / numComm;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
{
|
||||
numDip = 0;
|
||||
numComm = 0;
|
||||
}
|
||||
if (numDip > 0 && numComm > 0)
|
||||
{
|
||||
// inizializzo i miei array...
|
||||
@@ -537,7 +561,7 @@ namespace PROJ_ETS.WebUserControls
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void btnSalva_Click(object sender, EventArgs e)
|
||||
{
|
||||
// procedo SOLO se cud enabled
|
||||
@@ -585,5 +609,34 @@ namespace PROJ_ETS.WebUserControls
|
||||
{
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua selezione periodo rapida: 0 = corrente (ovvero la PROSSIMA), +1 = successiva (a seleizonata), -1 = precedente (a selezionata)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkW_Click(object sender, EventArgs e)
|
||||
{
|
||||
// sposto!
|
||||
LinkButton lnk = (LinkButton)sender;
|
||||
if (lnk.CommandArgument == "Curr")
|
||||
{
|
||||
adesso = DateTime.Now;
|
||||
}
|
||||
else if (lnk.CommandArgument == "Prev")
|
||||
{
|
||||
adesso = adesso.AddDays(-7);
|
||||
}
|
||||
else if (lnk.CommandArgument == "Next")
|
||||
{
|
||||
adesso = adesso.AddDays(7);
|
||||
}
|
||||
setDdlPeriodo();
|
||||
// rendo invisibile (se c'era) pannello add commesse (se non permesso edit)
|
||||
if (!cudEnabled)
|
||||
{
|
||||
pnlAddNew.Visible = cudEnabled;
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,33 @@ namespace PROJ_ETS.WebUserControls {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsWeek;
|
||||
|
||||
/// <summary>
|
||||
/// lnkWPrev control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lnkWPrev;
|
||||
|
||||
/// <summary>
|
||||
/// lnkW control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lnkW;
|
||||
|
||||
/// <summary>
|
||||
/// lnkWNext control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lnkWNext;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddNew control.
|
||||
/// </summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user