fi creazione primo record quotidiano
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
+64
-64
@@ -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
|
||||
{ }
|
||||
|
||||
Reference in New Issue
Block a user