Merge branch 'develop'

This commit is contained in:
Samuele Locatelli
2021-03-23 08:37:44 +01:00
12 changed files with 568 additions and 483 deletions
+12 -7
View File
@@ -32,15 +32,20 @@ namespace GPW_Commesse.Controllers
}
else
{
var tabDati = DataProxy.DP.taHT.GetData(id, dtRif, numRec);
// ciclo
foreach (var item in tabDati)
try
{
answ.Add(new chartJsXY() { x = item.tempRil, y = item.freq });
var tabDati = DataProxy.DP.taHT.GetData(id, dtRif, numRec);
// ciclo
foreach (var item in tabDati)
{
answ.Add(new chartJsXY() { x = item.tempRil, y = item.freq });
}
// salvo
rawData = JsonConvert.SerializeObject(answ);
SteamWare.memLayer.ML.setRSV(histTemp, rawData, 5);
}
// salvo
rawData = JsonConvert.SerializeObject(answ);
SteamWare.memLayer.ML.setRSV(histTemp, rawData, 5);
catch
{ }
}
// restituisco
return answ;
+12 -7
View File
@@ -33,15 +33,20 @@ namespace GPW_Commesse.Controllers
}
else
{
var tabDati = DataProxy.DP.taRT.getByUserPeriod(id, dtRif, numRec);
// ciclo
foreach (var item in tabDati)
try
{
answ.Add(new chartJsTSerie() { x = item.dtRilievo, y = item.tempRil });
var tabDati = DataProxy.DP.taRT.getByUserPeriod(id, dtRif, numRec);
// ciclo
foreach (var item in tabDati)
{
answ.Add(new chartJsTSerie() { x = item.dtRilievo, y = item.tempRil });
}
// salvo
rawData = JsonConvert.SerializeObject(answ);
SteamWare.memLayer.ML.setRSV(histTemp, rawData, 5);
}
// salvo
rawData = JsonConvert.SerializeObject(answ);
SteamWare.memLayer.ML.setRSV(histTemp, rawData, 5);
catch
{ }
}
// restituisco
return answ;
+33 -19
View File
@@ -3,16 +3,16 @@
<script type="text/javascript">
Sys.Application.add_init(appl_init);
//Sys.Application.add_init(appl_init);
function appl_init() {
var pgRegMgr = Sys.WebForms.PageRequestManager.getInstance();
pgRegMgr.add_endRequest(EndHandler);
}
function EndHandler() {
redrawAll();
console.log('EndHandler!');
}
//function appl_init() {
// var pgRegMgr = Sys.WebForms.PageRequestManager.getInstance();
// pgRegMgr.add_endRequest(EndHandler);
//}
//function EndHandler() {
// redrawAll();
// console.log('EndHandler!');
//}
//var prm = Sys.WebForms.PageRequestManager.getInstance();
//prm.add_pageLoaded(function () {
@@ -134,11 +134,11 @@
alert("Errore recupero dati grafico HIST!");
}
// effettuo plotting grafico TimeSerie!
function plotTS() {
function plotTS(idxDip, dataReq, numReq) {
// caricamento pagina
$.ajax({
type: "GET",
url: "api/TempRil/<%=hfIdxDip.Value %>?date=<%=hfData.Value%>&numRec=<%=ddlMaxNum.SelectedValue%>",
url: "api/TempRil/" + idxDip + "?date=" + dataReq + "&numRec=" + numReq,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess_,
@@ -146,11 +146,11 @@
});
}
// effettuo plotting grafico Hist!
function plotHist() {
function plotHist(idxDip, dataReq, numReq) {
// caricamento pagina
$.ajax({
type: "GET",
url: "api/TempHist/<%=hfIdxDip.Value %>?date=<%=hfData.Value%>&numRec=<%=ddlMaxNum.SelectedValue%>",
url: "api/TempHist/" + idxDip + "?date=" + dataReq + "&numRec=" + numReq,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: HistOnSuccess_,
@@ -158,10 +158,25 @@
});
}
function redrawAll() {
plotTS();
plotHist();
console.log('numRec: <%=ddlMaxNum.SelectedValue%>');
<%-- function redrawAll() {
var idxDip =<%=hfIdxDip.Value %>;
var dataReq ="<%=hfData.Value %>";
var numReq = <%=ddlMaxNum.SelectedValue%>;
plotTS(idxDip, dataReq, numReq);
plotHist(idxDip, dataReq, numReq);
//console.log('R idxDip: ' + idxDip);
//console.log('R dataReq: ' + dataReq);
//console.log('R numReq: ' + numReq);
}--%>
function forceRedrawAll(numReq) {
var idxDip =<%=hfIdxDip.Value %>;
var dataReq ="<%=hfData.Value %>";
plotTS(idxDip, dataReq, numReq);
plotHist(idxDip, dataReq, numReq);
//console.log('FR idxDip: ' + idxDip);
//console.log('FR dataReq: ' + dataReq);
//console.log('FR numReq: ' + numReq);
}
</script>
@@ -172,7 +187,7 @@
Periodo
</div>
<div class="col-6">
<asp:DropDownList runat="server" ID="ddlMaxNum" AutoPostBack="true">
<asp:DropDownList runat="server" ID="ddlMaxNum" AutoPostBack="true" OnSelectedIndexChanged="ddlMaxNum_SelectedIndexChanged">
<asp:ListItem Text="1 mese" Value="30"></asp:ListItem>
<asp:ListItem Text="2 mesi" Value="60"></asp:ListItem>
<asp:ListItem Text="3 mesi" Value="90"></asp:ListItem>
@@ -180,7 +195,6 @@
<asp:ListItem Text="1 anno" Value="366"></asp:ListItem>
<asp:ListItem Text="Tutto" Value="0"></asp:ListItem>
</asp:DropDownList>
<asp:LinkButton runat="server" ID="lbtUpdate" OnClientClick="redrawAll();" CssClass="btn btn-info btn-sm small"><i class="fa fa-refresh" aria-hidden="true"></i></asp:LinkButton>
</div>
</div>
<div class="row" runat="server" id="divGraphs">
@@ -32,6 +32,11 @@ namespace GPW_Commesse.WebUserControls
#region Protected Methods
protected void ddlMaxNum_SelectedIndexChanged(object sender, EventArgs e)
{
doUpdate();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
@@ -46,5 +51,14 @@ namespace GPW_Commesse.WebUserControls
}
#endregion Protected Methods
#region Public Methods
public void doUpdate()
{
ScriptManager.RegisterStartupScript(divGraphs, this.GetType(), "ForceAction", $"forceRedrawAll({ddlMaxNum.SelectedValue});", true);
}
#endregion Public Methods
}
}
-9
View File
@@ -41,15 +41,6 @@ namespace GPW_Commesse.WebUserControls
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlMaxNum;
/// <summary>
/// lbtUpdate 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 lbtUpdate;
/// <summary>
/// divGraphs control.
/// </summary>
@@ -2,79 +2,79 @@
<%@ Register Src="~/WebUserControls/cmp_toggle.ascx" TagPrefix="uc1" TagName="cmp_toggle" %>
<div class="row">
<div class="col-12 text-center">
<asp:RadioButtonList ID="rblOre" runat="server" CssClass="radioBtn" RepeatLayout="Flow" RepeatDirection="Horizontal"
RepeatColumns="8" AutoPostBack="true" OnSelectedIndexChanged="rblOre_SelectedIndexChanged">
<asp:ListItem Text="ult." Value="0"></asp:ListItem>
<asp:ListItem Text="15'" Value="15"></asp:ListItem>
<asp:ListItem Text="30'" Value="30"></asp:ListItem>
<asp:ListItem Text="1 h" Value="60" Selected="True"></asp:ListItem>
<asp:ListItem Text="2 h" Value="120"></asp:ListItem>
<asp:ListItem Text="3 h" Value="180"></asp:ListItem>
<asp:ListItem Text="4 h" Value="240"></asp:ListItem>
<asp:ListItem Text="8 h" Value="480"></asp:ListItem>
</asp:RadioButtonList>
<uc1:cmp_toggle runat="server" ID="cmp_toggle" tooltipOn="Nascondi TagCloud" tooltipOff="Mostra TagCloud" classOn="text-primary" classOff="text-primary" />
</div>
<div class="col-12 text-center">
<asp:RadioButtonList ID="rblOre" runat="server" CssClass="radioBtn" RepeatLayout="Flow" RepeatDirection="Horizontal"
RepeatColumns="8" AutoPostBack="true" OnSelectedIndexChanged="rblOre_SelectedIndexChanged">
<asp:ListItem Text="ult." Value="0"></asp:ListItem>
<asp:ListItem Text="15'" Value="15"></asp:ListItem>
<asp:ListItem Text="30'" Value="30"></asp:ListItem>
<asp:ListItem Text="1 h" Value="60" Selected="True"></asp:ListItem>
<asp:ListItem Text="2 h" Value="120"></asp:ListItem>
<asp:ListItem Text="3 h" Value="180"></asp:ListItem>
<asp:ListItem Text="4 h" Value="240"></asp:ListItem>
<asp:ListItem Text="8 h" Value="480"></asp:ListItem>
</asp:RadioButtonList>
<uc1:cmp_toggle runat="server" ID="cmp_toggle" tooltipOn="Nascondi TagCloud" tooltipOff="Mostra TagCloud" classOn="text-primary" classOff="text-primary" />
</div>
</div>
<div class="row" runat="server" id="tagBlock">
<div class="col-12" id="tagCloud">
<asp:Repeater ID="repTagCloud" runat="server" DataSourceID="ods">
<ItemTemplate>
<%--Modo standard: tag cloud--%>
<span id="Standard" runat="server" visible='<%# modo == GPW_Commesse.WebUserControls.TagCloudMode.standard %>'>
<asp:LinkButton runat="server" ID="lnkTag" CssClass='<%# tagClass(Eval("freq")) %>' ToolTip='<%# Eval("nomeComm") + " | " + Eval("nomeFase") %>' OnClick="lnkTag_Click">
<div class="col-12" id="tagCloud">
<asp:Repeater ID="repTagCloud" runat="server" DataSourceID="ods">
<ItemTemplate>
<%--Modo standard: tag cloud--%>
<span id="Standard" runat="server" visible='<%# modo == GPW_Commesse.WebUserControls.TagCloudMode.standard %>'>
<asp:LinkButton runat="server" ID="lnkTag1" CssClass='<%# tagClass(Eval("freq")) %>' ToolTip='<%# Eval("nomeComm") + " | " + Eval("nomeFase") %>' OnClick="lnkTag_Click">
<%# Eval("nomeProj") %>
</asp:LinkButton>
</span>
<%--Modo piramide--%>
<span id="Piramide" runat="server" visible='<%# modo == GPW_Commesse.WebUserControls.TagCloudMode.piramide %>'>
<asp:LinkButton runat="server" ID="LinkButton1" ToolTip='<%# Eval("nomeProj") %>' CommandArgument='<%# Eval("idxFase") %>' OnClick="lnkTag_Click" CssClass='<%# tagClassPiram(Eval("RowNum")) %>'>
</asp:LinkButton>
</span>
<%--Modo piramide--%>
<span id="Piramide" runat="server" visible='<%# modo == GPW_Commesse.WebUserControls.TagCloudMode.piramide %>'>
<asp:LinkButton runat="server" ID="lnkTag2" ToolTip='<%# Eval("nomeProj") %>' CommandArgument='<%# Eval("idxFase") %>' OnClick="lnkTag_Click" CssClass='<%# tagClassPiram(Eval("RowNum")) %>'>
<%# "[" + Eval("nomeComm") + "] " + Eval("nomeFase") %>
</asp:LinkButton>
</span>
<%--Modo elenco--%>
<div id="Elenco" runat="server" visible='<%# modo == GPW_Commesse.WebUserControls.TagCloudMode.elenco %>'>
<asp:LinkButton runat="server" ID="LinkButton2" CssClass='<%# tagClassElenco(Eval("RowNum")) %>' CommandArgument='<%# Eval("idxFase") %>' OnClick="lnkTag_Click" ToolTip='<%# Eval("nomeComm") + " | " + Eval("nomeFase") + " | " + Eval("Qty","{0:N1} h") + " | " + Eval("freq","{0:P1}") %>'>
</asp:LinkButton>
</span>
<%--Modo elenco--%>
<div id="Elenco" runat="server" visible='<%# modo == GPW_Commesse.WebUserControls.TagCloudMode.elenco %>'>
<asp:LinkButton runat="server" ID="lnkTag3" CssClass='<%# tagClassElenco(Eval("RowNum")) %>' CommandArgument='<%# Eval("idxFase") %>' OnClick="lnkTag_Click" ToolTip='<%# Eval("nomeComm") + " | " + Eval("nomeFase") + " | " + Eval("Qty","{0:N1} h") + " | " + Eval("freq","{0:P1}") %>'>
<%# Eval("RowNum","{0:00}") + ") " + Eval("nomeProj").ToString().ToUpper() + " | " + Eval("nomeComm") + " | " + Eval("nomeFase") %>
</asp:LinkButton>
</div>
<%--Modo elencoCPF--%>
<div id="ElencoCPF" runat="server" visible='<%# modo == GPW_Commesse.WebUserControls.TagCloudMode.elencoCPF %>'>
<asp:LinkButton runat="server" ID="LinkButton3" CssClass='<%# tagClassElenco(Eval("RowNum")) %>' CommandArgument='<%# Eval("idxFase") %>' OnClick="lnkTag_Click" ToolTip='<%# Eval("nomeComm") + " | " + Eval("nomeFase") + " | " + Eval("Qty","{0:N1} h") %>'>
</asp:LinkButton>
</div>
<%--Modo elencoCPF--%>
<div id="ElencoCPF" runat="server" visible='<%# modo == GPW_Commesse.WebUserControls.TagCloudMode.elencoCPF %>'>
<asp:LinkButton runat="server" ID="lnkTag4" CssClass='<%# tagClassElenco(Eval("RowNum")) %>' CommandArgument='<%# Eval("idxFase") %>' OnClick="lnkTag_Click" ToolTip='<%# Eval("nomeComm") + " | " + Eval("nomeFase") + " | " + Eval("Qty","{0:N1} h") %>'>
<%# Eval("RowNum","{0:00}") + ") " + Eval("nomeComm") + " | " + Eval("nomeProj") + " | " + Eval("nomeFase") %>
</asp:LinkButton>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
</asp:LinkButton>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
</div>
<div class="row">
<div class="col-6 text-left small">
<asp:DropDownList runat="server" ID="ddlModoTag" AutoPostBack="true" OnSelectedIndexChanged="ddlModoTag_SelectedIndexChanged">
<asp:ListItem Selected="True">elenco</asp:ListItem>
<asp:ListItem>elencoCPF</asp:ListItem>
<asp:ListItem>piramide</asp:ListItem>
<asp:ListItem>standard</asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-6 text-right small">
<asp:DropDownList runat="server" ID="ddlPageSize" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<asp:ListItem>5</asp:ListItem>
<asp:ListItem Selected="True">10</asp:ListItem>
<asp:ListItem>15</asp:ListItem>
<asp:ListItem>20</asp:ListItem>
<asp:ListItem>25</asp:ListItem>
<asp:ListItem>30</asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-6 text-left small">
<asp:DropDownList runat="server" ID="ddlModoTag" AutoPostBack="true" OnSelectedIndexChanged="ddlModoTag_SelectedIndexChanged">
<asp:ListItem Selected="True">elenco</asp:ListItem>
<asp:ListItem>elencoCPF</asp:ListItem>
<asp:ListItem>piramide</asp:ListItem>
<asp:ListItem>standard</asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-6 text-right small">
<asp:DropDownList runat="server" ID="ddlPageSize" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<asp:ListItem>5</asp:ListItem>
<asp:ListItem Selected="True">10</asp:ListItem>
<asp:ListItem>15</asp:ListItem>
<asp:ListItem>20</asp:ListItem>
<asp:ListItem>25</asp:ListItem>
<asp:ListItem>30</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_UtilityTableAdapters.freqProgettiTableAdapter">
<SelectParameters>
<asp:SessionParameter Name="idxDipendente" SessionField="idxDipCurr" Type="Int32" />
<asp:SessionParameter DefaultValue="" Name="inizio" SessionField="_inizio" Type="DateTime" />
<asp:SessionParameter Name="fine" SessionField="_fine" Type="DateTime" />
<%--<asp:Parameter DefaultValue="20" Name="maxRes" Type="Int32" />--%>
<asp:ControlParameter ControlID="ddlPageSize" PropertyName="SelectedValue" Name="maxRes" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<SelectParameters>
<asp:SessionParameter Name="idxDipendente" SessionField="idxDipCurr" Type="Int32" />
<asp:SessionParameter DefaultValue="" Name="inizio" SessionField="_inizio" Type="DateTime" />
<asp:SessionParameter Name="fine" SessionField="_fine" Type="DateTime" />
<%--<asp:Parameter DefaultValue="20" Name="maxRes" Type="Int32" />--%>
<asp:ControlParameter ControlID="ddlPageSize" PropertyName="SelectedValue" Name="maxRes" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
@@ -9,324 +9,376 @@ using SteamWare;
namespace GPW_Commesse.WebUserControls
{
public partial class mod_TagCloudProgetti : System.Web.UI.UserControl
{
/// <summary>
/// evento selezione valore tag
/// </summary>
public event EventHandler eh_newVal;
/// <summary>
/// evento refresh numero items
/// </summary>
public event EventHandler eh_refresh;
/// <summary>
/// data di riferimento per controllo
/// </summary>
public DateTime dataRif
public enum TagCloudMode
{
get
{
return Convert.ToDateTime(memLayer.ML.StringSessionObj("dataRifTC"));
}
set
{
memLayer.ML.setSessionVal("dataRifTC", value);
}
/// <summary>
/// modalità elenco (con codice colore) standard (Progetto-Fase-Sottofase)
/// </summary>
elenco,
/// <summary>
/// modalità elenco Commessa-Progetto-Fase (con codice colore)
/// </summary>
elencoCPF,
/// <summary>
/// modalità piramide 1 | 2-2 | 3-3-3 | 4-4-4-4 | ...
/// </summary>
piramide,
/// <summary>
/// modalità normale
/// </summary>
standard
}
/// <summary>
/// valore in sessione dello show add new
/// </summary>
public bool showAdd
public partial class mod_TagCloudProgetti : System.Web.UI.UserControl
{
get
{
bool answ = true;
if (memLayer.ML.isInSessionObject("showAddNewRec"))
#region Public Events
/// <summary>
/// evento selezione valore tag
/// </summary>
public event EventHandler eh_newVal;
/// <summary>
/// evento refresh numero items
/// </summary>
public event EventHandler eh_refresh;
#endregion Public Events
#region Public Properties
/// <summary>
/// data di riferimento per controllo
/// </summary>
public DateTime dataRif
{
answ = memLayer.ML.BoolSessionObj("showAddNewRec");
get
{
return Convert.ToDateTime(memLayer.ML.StringSessionObj("dataRifTC"));
}
set
{
memLayer.ML.setSessionVal("dataRifTC", value);
}
}
return answ;
}
set
{
memLayer.ML.setSessionVal("showAddNewRec", value);
setShowAdd();
}
}
/// <summary>
/// sistema visualizzazione
/// </summary>
protected void setShowAdd()
{
tagBlock.Visible = showAdd;
}
/// <summary>
/// load pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// se vuoto lo imposto...
if (!memLayer.ML.isInSessionObject("TagCloudMode"))
public TagCloudMode modo
{
modo = TagCloudMode.standard;
get
{
return (TagCloudMode)memLayer.ML.objSessionObj("TagCloudMode");
}
set
{
memLayer.ML.setSessionVal("TagCloudMode", value);
}
}
cmp_toggle.toggleValue = showAdd;
setShowAdd();
}
cmp_toggle.ehToggle += Cmp_toggle_ehToggle;
}
/// <summary>
/// Gestione evento toggle
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Cmp_toggle_ehToggle(object sender, EventArgs e)
{
showAdd = cmp_toggle.toggleValue;
}
/// <summary>
/// calcola calsse css data freq ripetizione
/// </summary>
/// <param name="freq"></param>
/// <returns></returns>
public string tagClass(object _freq)
{
string answ = "";
double freq = Convert.ToDouble(_freq);
if (freq > 0.25)
{
answ = "w1";
}
else if (freq > 0.16)
{
answ = "w2";
}
else if (freq > 0.1)
{
answ = "w3";
}
else if (freq > 0.05)
{
answ = "w4";
}
else
{
answ = "w5";
}
return answ;
}
/// <summary>
/// calcola calsse css data posizione in elenco
/// </summary>
/// <param name="posiz"></param>
/// <returns></returns>
public string tagClassElenco(object _posiz)
{
string answ = "";
int posiz = Convert.ToInt32(_posiz);
if (posiz <= 1)
{
answ = "e1";
}
else if (posiz <= 3)
{
answ = "e2";
}
else if (posiz <= 6)
{
answ = "e3";
}
else if (posiz <= 10)
{
answ = "e4";
}
else
{
answ = "e5";
}
return answ;
}
/// <summary>
/// calcola calsse css data posizione in piramide
/// </summary>
/// <param name="posiz"></param>
/// <returns></returns>
public string tagClassPiram(object _posiz)
{
string answ = "";
int posiz = Convert.ToInt32(_posiz);
if (posiz == 1)
{
answ = "p1";
}
else if (posiz <= 3)
{
answ = "p2";
}
else if (posiz <= 6)
{
answ = "p3";
}
else if (posiz <= 10)
{
answ = "p4";
}
else if (posiz <= 15)
{
answ = "p5";
}
else if (posiz <= 21)
{
answ = "p6";
}
else
{
answ = "p7";
}
return answ;
}
/// <summary>
/// crea una nuova attività dal tag indicato
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lnkTag_Click(object sender, EventArgs e)
{
// variabili!
int idxDipCurr = memLayer.ML.IntSessionObj("idxDipCurr");
// inizia con dataRif = 8 del mattino
DateTime inizio = dataRif.Date.AddHours(8);
int idxFase = 0;
// leggo valore fase
LinkButton lbtn = (LinkButton)sender;
try
{
idxFase = Convert.ToInt32(lbtn.CommandArgument);
}
catch
{ }
// chiamo clona!
int minuti = 0;
try
{
minuti = Convert.ToInt32(rblOre.SelectedValue);
}
catch
{ }
DataProxy.DP.taRA.clonaLastRA_byFaseUtente(idxDipCurr, inizio, idxFase, minuti);
repTagCloud.DataBind();
// riporto evento!
if (eh_newVal != null)
{
eh_newVal(this, new EventArgs());
}
}
/// <summary>
/// evento selezione nuovo valore durata
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void rblOre_SelectedIndexChanged(object sender, EventArgs e)
{
// salvo il valore scelto
memLayer.ML.setSessionVal("stdMinDurata", rblOre.SelectedValue);
repTagCloud.DataBind();
// riporto evento!
if (eh_newVal != null)
{
eh_newVal(this, new EventArgs());
}
}
/// <summary>
/// chiamata aggiornamento controllo
/// </summary>
public void doUpdate()
{
repTagCloud.DataBind();
}
/// <summary>
/// valore in sessione dello show add new
/// </summary>
public bool showAdd
{
get
{
bool answ = true;
if (memLayer.ML.isInSessionObject("showAddNewRec"))
{
answ = memLayer.ML.BoolSessionObj("showAddNewRec");
}
return answ;
}
set
{
memLayer.ML.setSessionVal("showAddNewRec", value);
setShowAdd();
}
}
public TagCloudMode modo
{
get
{
return (TagCloudMode)memLayer.ML.objSessionObj("TagCloudMode");
}
set
{
memLayer.ML.setSessionVal("TagCloudMode", value);
}
}
#endregion Public Properties
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
// riporto evento!
if (eh_refresh != null)
{
eh_refresh(this, new EventArgs());
}
}
#region Private Methods
protected void ddlModoTag_SelectedIndexChanged(object sender, EventArgs e)
{
// cambio modo!
switch (ddlModoTag.SelectedValue)
{
case "elenco":
modo = TagCloudMode.elenco;
break;
case "elencoCPF":
modo = TagCloudMode.elencoCPF;
break;
case "piramide":
modo = TagCloudMode.piramide;
break;
case "standard":
modo = TagCloudMode.standard;
break;
default:
break;
}
repTagCloud.DataBind();
// riporto evento!
if (eh_refresh != null)
{
eh_refresh(this, new EventArgs());
}
}
/// <summary>
/// Gestione evento toggle
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Cmp_toggle_ehToggle(object sender, EventArgs e)
{
showAdd = cmp_toggle.toggleValue;
}
protected void lbtToggleOn_Click(object sender, EventArgs e)
{
showAdd = !showAdd;
}
#endregion Private Methods
protected void lbtToggleOff_Click(object sender, EventArgs e)
{
showAdd = !showAdd;
}
}
#region Protected Methods
public enum TagCloudMode
{
/// <summary>
/// modalità elenco (con codice colore) standard (Progetto-Fase-Sottofase)
/// </summary>
elenco,
/// <summary>
/// modalità elenco Commessa-Progetto-Fase (con codice colore)
/// </summary>
elencoCPF,
/// <summary>
/// modalità piramide 1 | 2-2 | 3-3-3 | 4-4-4-4 | ...
/// </summary>
piramide,
/// <summary>
/// modalità normale
/// </summary>
standard
}
protected void ddlModoTag_SelectedIndexChanged(object sender, EventArgs e)
{
// cambio modo!
switch (ddlModoTag.SelectedValue)
{
case "elenco":
modo = TagCloudMode.elenco;
break;
case "elencoCPF":
modo = TagCloudMode.elencoCPF;
break;
case "piramide":
modo = TagCloudMode.piramide;
break;
case "standard":
modo = TagCloudMode.standard;
break;
default:
break;
}
repTagCloud.DataBind();
// riporto evento!
if (eh_refresh != null)
{
eh_refresh(this, new EventArgs());
}
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
// riporto evento!
if (eh_refresh != null)
{
eh_refresh(this, new EventArgs());
}
}
protected void lbtToggleOff_Click(object sender, EventArgs e)
{
showAdd = !showAdd;
}
protected void lbtToggleOn_Click(object sender, EventArgs e)
{
showAdd = !showAdd;
}
/// <summary>
/// crea una nuova attività dal tag indicato
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lnkTag_Click(object sender, EventArgs e)
{
// variabili!
int idxDipCurr = memLayer.ML.IntSessionObj("idxDipCurr");
// default: inizia ora la dichiarazione
double oraStart = DateTime.Now.Hour;
int durataMinuti = memLayer.ML.IntSessionObj("stdMinDurata");
// se c'è timbratura ingresso prendo quella come ora inizio...
try
{
DS_Applicazione.TimbratureRow riga = DataProxy.DP.taTimb.getByIdxDipPeriodo(DataProxy.idxDipendente, dataRif, dataRif.AddDays(1))[0];
oraStart = Convert.ToDouble(riga.dataOra.Hour + (double)riga.dataOra.Minute / 60);
}
catch
{ }
// inizia con dataRif = 8 del mattino
DateTime inizio = dataRif.Date.AddHours(oraStart);
int idxFase = 0;
// leggo valore fase
LinkButton lbtn = (LinkButton)sender;
try
{
idxFase = Convert.ToInt32(lbtn.CommandArgument);
}
catch
{ }
// chiamo clona!
int minuti = 0;
try
{
minuti = Convert.ToInt32(rblOre.SelectedValue);
}
catch
{ }
DataProxy.DP.taRA.clonaLastRA_byFaseUtente(idxDipCurr, inizio, idxFase, minuti);
repTagCloud.DataBind();
// riporto evento!
if (eh_newVal != null)
{
eh_newVal(this, new EventArgs());
}
}
/// <summary>
/// load pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// se vuoto lo imposto...
if (!memLayer.ML.isInSessionObject("TagCloudMode"))
{
modo = TagCloudMode.standard;
}
cmp_toggle.toggleValue = showAdd;
setShowAdd();
}
cmp_toggle.ehToggle += Cmp_toggle_ehToggle;
}
/// <summary>
/// evento selezione nuovo valore durata
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void rblOre_SelectedIndexChanged(object sender, EventArgs e)
{
// salvo il valore scelto
memLayer.ML.setSessionVal("stdMinDurata", rblOre.SelectedValue);
repTagCloud.DataBind();
// riporto evento!
if (eh_newVal != null)
{
eh_newVal(this, new EventArgs());
}
}
/// <summary>
/// sistema visualizzazione
/// </summary>
protected void setShowAdd()
{
tagBlock.Visible = showAdd;
}
#endregion Protected Methods
#region Public Methods
/// <summary>
/// chiamata aggiornamento controllo
/// </summary>
public void doUpdate()
{
repTagCloud.DataBind();
}
/// <summary>
/// calcola calsse css data freq ripetizione
/// </summary>
/// <param name="freq"></param>
/// <returns></returns>
public string tagClass(object _freq)
{
string answ = "";
double freq = Convert.ToDouble(_freq);
if (freq > 0.25)
{
answ = "w1";
}
else if (freq > 0.16)
{
answ = "w2";
}
else if (freq > 0.1)
{
answ = "w3";
}
else if (freq > 0.05)
{
answ = "w4";
}
else
{
answ = "w5";
}
return answ;
}
/// <summary>
/// calcola calsse css data posizione in elenco
/// </summary>
/// <param name="posiz"></param>
/// <returns></returns>
public string tagClassElenco(object _posiz)
{
string answ = "";
int posiz = Convert.ToInt32(_posiz);
if (posiz <= 1)
{
answ = "e1";
}
else if (posiz <= 3)
{
answ = "e2";
}
else if (posiz <= 6)
{
answ = "e3";
}
else if (posiz <= 10)
{
answ = "e4";
}
else
{
answ = "e5";
}
return answ;
}
/// <summary>
/// calcola calsse css data posizione in piramide
/// </summary>
/// <param name="posiz"></param>
/// <returns></returns>
public string tagClassPiram(object _posiz)
{
string answ = "";
int posiz = Convert.ToInt32(_posiz);
if (posiz == 1)
{
answ = "p1";
}
else if (posiz <= 3)
{
answ = "p2";
}
else if (posiz <= 6)
{
answ = "p3";
}
else if (posiz <= 10)
{
answ = "p4";
}
else if (posiz <= 15)
{
answ = "p5";
}
else if (posiz <= 21)
{
answ = "p6";
}
else
{
answ = "p7";
}
return answ;
}
#endregion Public Methods
}
}
@@ -1,80 +1,80 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// This code was generated by a tool.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW_Commesse.WebUserControls
{
public partial class mod_TagCloudProgetti
{
public partial class mod_TagCloudProgetti
{
/// <summary>
/// Controllo rblOre.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButtonList rblOre;
/// <summary>
/// rblOre 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.RadioButtonList rblOre;
/// <summary>
/// Controllo cmp_toggle.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.cmp_toggle cmp_toggle;
/// <summary>
/// cmp_toggle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Commesse.WebUserControls.cmp_toggle cmp_toggle;
/// <summary>
/// Controllo tagBlock.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl tagBlock;
/// <summary>
/// tagBlock control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl tagBlock;
/// <summary>
/// Controllo repTagCloud.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater repTagCloud;
/// <summary>
/// repTagCloud 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.Repeater repTagCloud;
/// <summary>
/// Controllo ddlModoTag.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlModoTag;
/// <summary>
/// ddlModoTag 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.DropDownList ddlModoTag;
/// <summary>
/// Controllo ddlPageSize.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlPageSize;
/// <summary>
/// ddlPageSize 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.DropDownList ddlPageSize;
/// <summary>
/// Controllo ods.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
}
/// <summary>
/// ods 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.ObjectDataSource ods;
}
}
@@ -202,7 +202,7 @@ namespace GPW_Commesse.WebUserControls
try
{
DS_Applicazione.TimbratureRow riga = DataProxy.DP.taTimb.getByIdxDipPeriodo(DataProxy.idxDipendente, valoreDateTime, valoreDateTime.AddDays(1))[0];
oraStart = Convert.ToDouble(riga.dataOra.Hour + riga.dataOra.Minute / 60);
oraStart = Convert.ToDouble(riga.dataOra.Hour + (double)riga.dataOra.Minute / 60);
}
catch
{ }
@@ -54,17 +54,17 @@
function toggleCharts() {
$("#<%:divRilTemp.ClientID%>").toggle();
$("#<%:divCharts.ClientID%>").toggle();
console.log("toggleCharts");
//console.log("toggleCharts");
}
function showCharts() {
$("#<%:divRilTemp.ClientID%>").toggle(true);
$("#<%:divCharts.ClientID%>").toggle(true);
console.log("showCharts");
//console.log("showCharts");
}
function hideCharts() {
$("#<%:divRilTemp.ClientID%>").toggle(false);
$("#<%:divCharts.ClientID%>").toggle(false);
console.log("hideCharts");
//console.log("hideCharts");
}
</script>
<asp:UpdatePanel ID="upCharts" runat="server" UpdateMode="Conditional" RenderMode="Block">
@@ -358,6 +358,10 @@ namespace GPW_Commesse.WebUserControls
{
divRilTemp.Visible = doShow;
divCharts.Visible = doShow;
if (doShow)
{
cmp_chart.doUpdate();
}
}
/// <summary>
Vendored
+1 -1
View File
@@ -10,7 +10,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=4153']) {
withEnv(['NEXT_BUILD_NUMBER=4154']) {
// env.versionNumber = VersionNumber(versionNumberString : '2.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '2.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'GPW'