Tolto sito MP-Site come MP_Site-old e creato sito empty MP-SITE x travaso
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_AnPro_DettArt.ascx.cs" Inherits="MoonPro.WebUserControls.mod_AnPro_DettArt" %>
|
||||
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc2" %>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-info text-light">
|
||||
<h5 class="card-title"><%: traduci("AnProDetODL") %></h5>
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<asp:GridView ID="grView" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="ods" CssClass="table table-striped table-bordered table-condensed" AllowPaging="True">
|
||||
<HeaderStyle CssClass="default" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="info" />
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="ODL" SortExpression="IdxODL">
|
||||
<ItemTemplate>
|
||||
<div runat="server" id="divStato" class='<%# cssByStato(Eval("Stato")) %>'>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("IdxODL") %>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TCiclo" SortExpression="TCAssegnato">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblTCAssMS" runat="server" Text='<%# SteamWare.TempiCiclo.minSec(Eval("TCAssegnato", "{0:N3}")) %>' />
|
||||
<br />
|
||||
<asp:Label ID="lblTCAssMC" runat="server" Text='<%# Bind("TCAssegnato", "{0:N2} min.cent") %>' Font-Size="0.8em" ForeColor="#696969" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ordinato" SortExpression="pzOrd">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblpzOrd" runat="server" Text='<%# Eval("pzOrd") %>' />
|
||||
<div style="color: #636363; font-size: 0.8em;">
|
||||
<asp:Label ID="lblpzRiman" runat="server" Text='<%# Eval("pzRiman","({0} rim)") %>' CssClass='<%# cssFromQty(Eval("pzRiman"))%>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Confermati" SortExpression="pzConf">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblpzConf" runat="server" Text='<%# Eval("pzConf") %>' />
|
||||
<div style="color: #636363; font-size: 0.8em;">
|
||||
<asp:Label ID="lblpzProd" runat="server" Text='<%# Eval("pzProd","({0} prod)") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MapoDb.DS_ProdTempiTableAdapters.ResProdDett_splitODLTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxMacchina" Name="IdxMacchina" PropertyName="Value" Type="String" />
|
||||
<asp:ControlParameter ControlID="hfCodArticolo" Name="CodArticolo" PropertyName="Value" Type="String" />
|
||||
<asp:SessionParameter Name="dataFrom" SessionField="_inizio" Type="DateTime" />
|
||||
<asp:SessionParameter Name="dataTo" SessionField="_fine" Type="DateTime" />
|
||||
<asp:ControlParameter ControlID="hfClosed" Name="OdlClosed" PropertyName="Value" Type="Boolean" />
|
||||
<asp:ControlParameter ControlID="hfOpen" Name="OdlOpen" PropertyName="Value" Type="Boolean" />
|
||||
<asp:ControlParameter ControlID="hfNew" Name="OdlNew" PropertyName="Value" Type="Boolean" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfIdxMacchina" />
|
||||
<asp:HiddenField runat="server" ID="hfCodArticolo" />
|
||||
<asp:HiddenField runat="server" ID="hfClosed" />
|
||||
<asp:HiddenField runat="server" ID="hfOpen" />
|
||||
<asp:HiddenField runat="server" ID="hfNew" />
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<uc2:mod_righePag ID="mod_righePag" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,68 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_AnPro_DettArt : SteamWare.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_righePag.numRowPag = Convert.ToInt32(memLayer.ML.CRI("_righeDataGridMed") / 2);
|
||||
grView.PageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
mod_righePag.eh_newNum += Mod_righePag_eh_newNum;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno numero righe da mostrare
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Mod_righePag_eh_newNum(object sender, EventArgs e)
|
||||
{
|
||||
grView.PageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione
|
||||
/// </summary>
|
||||
/// <param name="IdxMacchina">Macchina</param>
|
||||
/// <param name="CodArticolo">Articolo</param>
|
||||
/// <param name="OdlChiusi">Si/No ODL già conclusi</param>
|
||||
/// <param name="OdlAperti">Si/No ODL in corso</param>
|
||||
/// <param name="OdlNew">Si/No ODL da attrezzare</param>
|
||||
public void doUpdate(string IdxMacchina, string CodArticolo, bool OdlChiusi, bool OdlAperti, bool OdlNew)
|
||||
{
|
||||
hfIdxMacchina.Value = IdxMacchina;
|
||||
hfCodArticolo.Value = CodArticolo;
|
||||
hfClosed.Value = OdlChiusi.ToString();
|
||||
hfOpen.Value = OdlAperti.ToString();
|
||||
hfNew.Value = OdlNew.ToString();
|
||||
grView.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// formato grafico post verifica qta > 0
|
||||
/// </summary>
|
||||
/// <param name="qty"></param>
|
||||
/// <returns></returns>
|
||||
public string cssFromQty(object qty)
|
||||
{
|
||||
string answ = "";
|
||||
if (Convert.ToInt32(qty) >= 0)
|
||||
{
|
||||
answ = "valOk";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "valKo";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
public string cssByStato(object stato)
|
||||
{
|
||||
return string.Format("css_{0}", stato); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_AnPro_DettArt {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </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.GridView grView;
|
||||
|
||||
/// <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>
|
||||
/// Controllo hfIdxMacchina.
|
||||
/// </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.HiddenField hfIdxMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfCodArticolo.
|
||||
/// </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.HiddenField hfCodArticolo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfClosed.
|
||||
/// </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.HiddenField hfClosed;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfOpen.
|
||||
/// </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.HiddenField hfOpen;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfNew.
|
||||
/// </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.HiddenField hfNew;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_righePag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonPro.WebUserControls.mod_righePag mod_righePag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_AnPro_DettGg.ascx.cs" Inherits="MoonPro.WebUserControls.mod_AnPro_DettGg" %>
|
||||
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc2" %>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-info text-light">
|
||||
<h5 class="card-title2"><%: traduci("AnProDetGG") %></h5>
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<asp:GridView ID="grView" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="ods" CssClass="table table-striped table-bordered table-condensed" AllowPaging="True">
|
||||
<HeaderStyle CssClass="default" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="info" />
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="ODL" SortExpression="IdxODL">
|
||||
<ItemTemplate>
|
||||
<div runat="server" id="divStato" class='<%# cssByStato(Eval("Stato")) %>'>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("IdxODL") %>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Data" HeaderText="Data" SortExpression="Data" ReadOnly="True" DataFormatString="{0:ddd dd/MM/yyyy}" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="TCiclo" SortExpression="TCAssegnato">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblTCAssMS" runat="server" Text='<%# SteamWare.TempiCiclo.minSec(Eval("TCAssegnato", "{0:N3}")) %>' />
|
||||
<br />
|
||||
<asp:Label ID="lblTCAssMC" runat="server" Text='<%# Bind("TCAssegnato", "{0:N2} min.cent") %>' Font-Size="0.8em" ForeColor="#696969" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Confermati" SortExpression="pzConf">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblpzConf" runat="server" Text='<%# Eval("pzConf") %>' />
|
||||
<div style="color: #636363; font-size: 0.8em;">
|
||||
<asp:Label ID="lblpzProd" runat="server" Text='<%# Eval("pzProd","({0} prod)") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MapoDb.DS_ProdTempiTableAdapters.ResProdDett_splitGGTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxMacchina" Name="IdxMacchina" PropertyName="Value" Type="String" />
|
||||
<asp:ControlParameter ControlID="hfCodArticolo" Name="CodArticolo" PropertyName="Value" Type="String" />
|
||||
<asp:SessionParameter Name="dataFrom" SessionField="_inizio" Type="DateTime" />
|
||||
<asp:SessionParameter Name="dataTo" SessionField="_fine" Type="DateTime" />
|
||||
<asp:ControlParameter ControlID="hfClosed" Name="OdlClosed" PropertyName="Value" Type="Boolean" />
|
||||
<asp:ControlParameter ControlID="hfOpen" Name="OdlOpen" PropertyName="Value" Type="Boolean" />
|
||||
<asp:ControlParameter ControlID="hfNew" Name="OdlNew" PropertyName="Value" Type="Boolean" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfIdxMacchina" />
|
||||
<asp:HiddenField runat="server" ID="hfCodArticolo" />
|
||||
<asp:HiddenField runat="server" ID="hfClosed" />
|
||||
<asp:HiddenField runat="server" ID="hfOpen" />
|
||||
<asp:HiddenField runat="server" ID="hfNew" />
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<uc2:mod_righePag ID="mod_righePag" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_AnPro_DettGg : SteamWare.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_righePag.numRowPag = Convert.ToInt32(memLayer.ML.CRI("_righeDataGridMed") / 2);
|
||||
grView.PageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
mod_righePag.eh_newNum += Mod_righePag_eh_newNum;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno numero righe da mostrare
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Mod_righePag_eh_newNum(object sender, EventArgs e)
|
||||
{
|
||||
grView.PageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione
|
||||
/// </summary>
|
||||
/// <param name="IdxMacchina">Macchina</param>
|
||||
/// <param name="CodArticolo">Articolo</param>
|
||||
/// <param name="OdlChiusi">Si/No ODL già conclusi</param>
|
||||
/// <param name="OdlAperti">Si/No ODL in corso</param>
|
||||
/// <param name="OdlNew">Si/No ODL da attrezzare</param>
|
||||
public void doUpdate(string IdxMacchina, string CodArticolo, bool OdlChiusi, bool OdlAperti, bool OdlNew)
|
||||
{
|
||||
hfIdxMacchina.Value = IdxMacchina;
|
||||
hfCodArticolo.Value = CodArticolo;
|
||||
hfClosed.Value = OdlChiusi.ToString();
|
||||
hfOpen.Value = OdlAperti.ToString();
|
||||
hfNew.Value = OdlNew.ToString();
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
public string cssByStato(object stato)
|
||||
{
|
||||
return string.Format("css_{0}", stato); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_AnPro_DettGg {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </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.GridView grView;
|
||||
|
||||
/// <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>
|
||||
/// Controllo hfIdxMacchina.
|
||||
/// </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.HiddenField hfIdxMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfCodArticolo.
|
||||
/// </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.HiddenField hfCodArticolo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfClosed.
|
||||
/// </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.HiddenField hfClosed;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfOpen.
|
||||
/// </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.HiddenField hfOpen;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfNew.
|
||||
/// </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.HiddenField hfNew;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_righePag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonPro.WebUserControls.mod_righePag mod_righePag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_AnPro_ODL.ascx.cs" Inherits="MoonPro.WebUserControls.mod_AnPro_ODL" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc2" %>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header py-1">
|
||||
<h4 class="card-title">ODL <%: traduci("AnProTotPer") %></h4>
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<asp:GridView ID="grView" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="ods" DataKeyNames="IdxMacchina,CodArticolo" OnSelectedIndexChanged="grView_SelectedIndexChanged" CssClass="table table-striped table-sm" AllowPaging="True" OnPageIndexChanged="grView_PageIndexChanged" OnSorted="grView_Sorted">
|
||||
<HeaderStyle CssClass="default" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="bg-info text-light" />
|
||||
<EmptyDataTemplate>
|
||||
NESSUN RISULTATO
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
|
||||
<HeaderTemplate>
|
||||
<div style="text-align: center; margin: auto;">
|
||||
<asp:LinkButton ID="lbtReset" runat="server" OnClick="lbtReset_Click" CssClass="btn btn-info btn-sm" Visible="true" ToolTip='<%# traduci("Reset") %>'><i class="fa fa-refresh"></i></asp:LinkButton>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div runat="server" id="divStato" class='<%# cssByStato(Eval("Stato")) %>'>
|
||||
<asp:LinkButton runat="server" ID="lbSelect" CausesValidation="false" CommandName="Select" ToolTip='<%# traduci("Select") %>'><i class="fa fa-search fa-2x"></i></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Wrap="False"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Nome" HeaderText="Impianto" SortExpression="Nome" />
|
||||
<asp:BoundField DataField="CodArticolo" HeaderText="Articolo" SortExpression="CodArticolo" />
|
||||
<asp:TemplateField HeaderText="Ordinato" SortExpression="pzOrd">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblpzOrd" runat="server" Text='<%# Eval("pzOrd") %>' />
|
||||
<div style="color: #636363; font-size: 0.8em;">
|
||||
<asp:Label ID="lblpzRiman" runat="server" Text='<%# Eval("pzRiman","({0} rim)") %>' CssClass='<%# cssFromQty(Eval("pzRiman"))%>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Confermati" SortExpression="pzConf">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblpzConf" runat="server" Text='<%# Eval("pzConf") %>' />
|
||||
<div style="color: #636363; font-size: 0.8em;">
|
||||
<asp:Label ID="lblpzProd" runat="server" Text='<%# Eval("pzProd","({0} prod)") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="MapoDb.DS_ProdTempiTableAdapters.ResProdTotTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter Name="dataFrom" SessionField="_inizio" Type="DateTime" />
|
||||
<asp:SessionParameter Name="dataTo" SessionField="_fine" Type="DateTime" />
|
||||
<asp:ControlParameter ControlID="hfClosed" Name="OdlClosed" PropertyName="Value" Type="Boolean" />
|
||||
<asp:ControlParameter ControlID="hfOpen" Name="OdlOpen" PropertyName="Value" Type="Boolean" />
|
||||
<asp:ControlParameter ControlID="hfNew" Name="OdlNew" PropertyName="Value" Type="Boolean" />
|
||||
<asp:ControlParameter ControlID="hfIdxMulti" Name="idxMulti" PropertyName="Value" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfIdxMulti" />
|
||||
<asp:HiddenField runat="server" ID="hfClosed" />
|
||||
<asp:HiddenField runat="server" ID="hfOpen" />
|
||||
<asp:HiddenField runat="server" ID="hfNew" />
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<uc2:mod_righePag ID="mod_righePag" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,168 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_AnPro_ODL : SteamWare.UserControl
|
||||
{
|
||||
public event EventHandler eh_selVal;
|
||||
public event EventHandler eh_reset;
|
||||
/// <summary>
|
||||
/// innalzo evento in base al tipo richiesto
|
||||
/// </summary>
|
||||
protected void raiseEvent(tipoEvento evReq)
|
||||
{
|
||||
switch (evReq)
|
||||
{
|
||||
case tipoEvento.reset:
|
||||
// raise dell'evento
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
break;
|
||||
case tipoEvento.selection:
|
||||
// raise dell'evento
|
||||
if (eh_selVal != null)
|
||||
{
|
||||
eh_selVal(this, new EventArgs());
|
||||
}
|
||||
break;
|
||||
case tipoEvento.edit:
|
||||
case tipoEvento.delete:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_righePag.numRowPag = memLayer.ML.CRI("_righeDataGridShort");
|
||||
grView.PageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
mod_righePag.eh_newNum += Mod_righePag_eh_newNum;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno numero righe da mostrare
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Mod_righePag_eh_newNum(object sender, EventArgs e)
|
||||
{
|
||||
grView.PageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione
|
||||
/// </summary>
|
||||
/// <param name="idxMulti">Idx Macchine</param>
|
||||
/// <param name="OdlChiusi">Si/No ODL già conclusi</param>
|
||||
/// <param name="OdlAperti">Si/No ODL in corso</param>
|
||||
/// <param name="OdlNew">Si/No ODL da attrezzare</param>
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione
|
||||
/// </summary>
|
||||
public void doUpdate(string idxMulti, bool OdlChiusi, bool OdlAperti, bool OdlNew)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
hfIdxMulti.Value = idxMulti;
|
||||
hfClosed.Value = OdlChiusi.ToString();
|
||||
hfOpen.Value = OdlAperti.ToString();
|
||||
hfNew.Value = OdlNew.ToString();
|
||||
grView.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// comando selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseEvent(tipoEvento.selection);
|
||||
}
|
||||
/// <summary>
|
||||
/// comando reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseEvent(tipoEvento.reset);
|
||||
}
|
||||
/// <summary>
|
||||
/// IdxMacchina selezionata
|
||||
/// </summary>
|
||||
public string IdxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = grView.SelectedDataKey["IdxMacchina"].ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Cod articolo selezionato
|
||||
/// </summary>
|
||||
public string CodArticolo
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = grView.SelectedDataKey["CodArticolo"].ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// formato grafico post verifica qta > 0
|
||||
/// </summary>
|
||||
/// <param name="qty"></param>
|
||||
/// <returns></returns>
|
||||
public string cssFromQty(object qty)
|
||||
{
|
||||
string answ = "";
|
||||
if (Convert.ToInt32(qty) >= 0)
|
||||
{
|
||||
answ = "valOk";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "valKo";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseEvent(tipoEvento.reset);
|
||||
}
|
||||
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseEvent(tipoEvento.reset);
|
||||
}
|
||||
|
||||
public string cssByStato(object stato)
|
||||
{
|
||||
return string.Format("css_{0}", stato); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_AnPro_ODL {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </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.GridView grView;
|
||||
|
||||
/// <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>
|
||||
/// Controllo hfIdxMulti.
|
||||
/// </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.HiddenField hfIdxMulti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfClosed.
|
||||
/// </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.HiddenField hfClosed;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfOpen.
|
||||
/// </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.HiddenField hfOpen;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfNew.
|
||||
/// </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.HiddenField hfNew;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_righePag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonPro.WebUserControls.mod_righePag mod_righePag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_AnPro_PODL.ascx.cs" Inherits="MoonPro.WebUserControls.mod_AnPro_PODL" %>
|
||||
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc2" %>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header py-1 bg-success">
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-4">
|
||||
<h4>Promesse ODL</h4>
|
||||
</div>
|
||||
<div class="col-4 text-right">
|
||||
<asp:CheckBox runat="server" ID="chkByGroup" Checked="false" Text="Gruppo Impianti" AutoPostBack="True" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-1 table-success">
|
||||
<asp:GridView ID="grView" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="ods" DataKeyNames="idxPromessa" OnSelectedIndexChanged="grView_SelectedIndexChanged" CssClass="table table-striped table-sm bg-light" AllowPaging="True" OnPageIndexChanged="grView_PageIndexChanged" OnSorted="grView_Sorted">
|
||||
<HeaderStyle CssClass="default" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="bg-info text-light" />
|
||||
<EmptyDataTemplate>
|
||||
NESSUN RISULTATO
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:BoundField DataField="KeyRichiesta" HeaderText="Ordine" SortExpression="KeyRichiesta" />
|
||||
<asp:BoundField DataField="CodArticolo" HeaderText="Cod.Art" SortExpression="CodArticolo" />
|
||||
<asp:BoundField DataField="DescArticolo" HeaderText="Desc.Art" ReadOnly="True" SortExpression="DescArticolo" />
|
||||
<asp:BoundField DataField="Nome" HeaderText="Macc" SortExpression="Nome" />
|
||||
<asp:BoundField DataField="CodGruppo" HeaderText="Gruppo" SortExpression="CodGruppo" />
|
||||
<asp:BoundField DataField="NumPezzi" HeaderText="Qta" SortExpression="NumPezzi" />
|
||||
<asp:TemplateField HeaderText="TCiclo" SortExpression="TCAssegnato">
|
||||
<ItemTemplate>
|
||||
<%# Eval("TCAssegnato","{0:N3}") %> (min)<br />
|
||||
<%# SteamWare.TempiCiclo.minSec(Eval("TCAssegnato", "{0:N3}")) %> (m:s)
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Priorita" HeaderText="Priorita" SortExpression="Priorita" />
|
||||
<asp:BoundField DataField="PzPallet" HeaderText="Pz/Plt" SortExpression="PzPallet" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByMultiMacc" TypeName="MapoDb.DS_ProdTempiTableAdapters.PromesseODLTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxMulti" Name="idxMulti" PropertyName="Value" Type="String" />
|
||||
<asp:ControlParameter ControlID="chkByGroup" DefaultValue="0" Name="byGroup" PropertyName="Checked" Type="Boolean" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfIdxMulti" />
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<uc2:mod_righePag ID="mod_righePag" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,164 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_AnPro_PODL : SteamWare.UserControl
|
||||
{
|
||||
public event EventHandler eh_selVal;
|
||||
public event EventHandler eh_reset;
|
||||
/// <summary>
|
||||
/// innalzo evento in base al tipo richiesto
|
||||
/// </summary>
|
||||
protected void raiseEvent(tipoEvento evReq)
|
||||
{
|
||||
switch (evReq)
|
||||
{
|
||||
case tipoEvento.reset:
|
||||
// raise dell'evento
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
break;
|
||||
case tipoEvento.selection:
|
||||
// raise dell'evento
|
||||
if (eh_selVal != null)
|
||||
{
|
||||
eh_selVal(this, new EventArgs());
|
||||
}
|
||||
break;
|
||||
case tipoEvento.edit:
|
||||
case tipoEvento.delete:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_righePag.numRowPag = memLayer.ML.CRI("_righeDataGridShort");
|
||||
grView.PageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
mod_righePag.eh_newNum += Mod_righePag_eh_newNum;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno numero righe da mostrare
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Mod_righePag_eh_newNum(object sender, EventArgs e)
|
||||
{
|
||||
grView.PageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione
|
||||
/// </summary>
|
||||
/// <param name="idxMulti">Idx Macchine</param>
|
||||
/// <param name="OdlChiusi">Si/No ODL già conclusi</param>
|
||||
/// <param name="OdlAperti">Si/No ODL in corso</param>
|
||||
/// <param name="OdlNew">Si/No ODL da attrezzare</param>
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione
|
||||
/// </summary>
|
||||
public void doUpdate(string idxMulti)
|
||||
{
|
||||
hfIdxMulti.Value = idxMulti;
|
||||
grView.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// comando selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseEvent(tipoEvento.selection);
|
||||
}
|
||||
/// <summary>
|
||||
/// comando reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseEvent(tipoEvento.reset);
|
||||
}
|
||||
/// <summary>
|
||||
/// IdxMacchina selezionata
|
||||
/// </summary>
|
||||
public string IdxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = grView.SelectedDataKey["IdxMacchina"].ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Cod articolo selezionato
|
||||
/// </summary>
|
||||
public string CodArticolo
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
answ = grView.SelectedDataKey["CodArticolo"].ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// formato grafico post verifica qta > 0
|
||||
/// </summary>
|
||||
/// <param name="qty"></param>
|
||||
/// <returns></returns>
|
||||
public string cssFromQty(object qty)
|
||||
{
|
||||
string answ = "";
|
||||
if (Convert.ToInt32(qty) >= 0)
|
||||
{
|
||||
answ = "valOk";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "valKo";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseEvent(tipoEvento.reset);
|
||||
}
|
||||
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseEvent(tipoEvento.reset);
|
||||
}
|
||||
|
||||
public string cssByStato(object stato)
|
||||
{
|
||||
return string.Format("css_{0}", stato); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_AnPro_PODL {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkByGroup.
|
||||
/// </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.CheckBox chkByGroup;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </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.GridView grView;
|
||||
|
||||
/// <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>
|
||||
/// Controllo hfIdxMulti.
|
||||
/// </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.HiddenField hfIdxMulti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_righePag.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonPro.WebUserControls.mod_righePag mod_righePag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_AnPro_Totali.ascx.cs" Inherits="MoonPro.WebUserControls.mod_AnPro_Totali" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_AnPro_ODL.ascx" TagPrefix="uc1" TagName="mod_AnPro_ODL" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_AnPro_PODL.ascx" TagPrefix="uc1" TagName="mod_AnPro_PODL" %>
|
||||
|
||||
<uc1:mod_AnPro_ODL runat="server" id="mod_AnPro_ODL" />
|
||||
<uc1:mod_AnPro_PODL runat="server" id="mod_AnPro_PODL" />
|
||||
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_AnPro_Totali : SteamWare.UserControl
|
||||
{
|
||||
public event EventHandler eh_selVal;
|
||||
public event EventHandler eh_reset;
|
||||
/// <summary>
|
||||
/// innalzo evento in base al tipo richiesto
|
||||
/// </summary>
|
||||
protected void raiseEvent(tipoEvento evReq)
|
||||
{
|
||||
switch (evReq)
|
||||
{
|
||||
case tipoEvento.reset:
|
||||
// raise dell'evento
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
break;
|
||||
case tipoEvento.selection:
|
||||
// raise dell'evento
|
||||
if (eh_selVal != null)
|
||||
{
|
||||
eh_selVal(this, new EventArgs());
|
||||
}
|
||||
break;
|
||||
case tipoEvento.edit:
|
||||
case tipoEvento.delete:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_AnPro_PODL.Visible = false;
|
||||
}
|
||||
mod_AnPro_ODL.eh_selVal += Mod_AnPro_ODL_eh_selVal;
|
||||
mod_AnPro_ODL.eh_reset += Mod_AnPro_ODL_eh_reset;
|
||||
}
|
||||
private void Mod_AnPro_ODL_eh_selVal(object sender, EventArgs e)
|
||||
{
|
||||
if (eh_selVal != null)
|
||||
{
|
||||
eh_selVal(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
private void Mod_AnPro_ODL_eh_reset(object sender, EventArgs e)
|
||||
{
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione
|
||||
/// </summary>
|
||||
/// <param name="idxMulti">Idx Macchine</param>
|
||||
/// <param name="OdlChiusi">Si/No ODL già conclusi</param>
|
||||
/// <param name="OdlAperti">Si/No ODL in corso</param>
|
||||
/// <param name="OdlNew">Si/No ODL da attrezzare</param>
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione
|
||||
/// </summary>
|
||||
public void doUpdate(string idxMulti, bool OdlChiusi, bool OdlAperti, bool OdlNew)
|
||||
{
|
||||
// fix controlli
|
||||
mod_AnPro_ODL.doUpdate(idxMulti, OdlChiusi, OdlAperti, OdlNew);
|
||||
mod_AnPro_PODL.Visible = OdlNew;
|
||||
mod_AnPro_PODL.doUpdate(idxMulti);
|
||||
}
|
||||
/// <summary>
|
||||
/// IdxMacchina selezionata
|
||||
/// </summary>
|
||||
public string IdxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return mod_AnPro_ODL.IdxMacchina;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Cod articolo selezionato
|
||||
/// </summary>
|
||||
public string CodArticolo
|
||||
{
|
||||
get
|
||||
{
|
||||
return mod_AnPro_ODL.CodArticolo;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_AnPro_Totali {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_AnPro_ODL.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonPro.WebUserControls.mod_AnPro_ODL mod_AnPro_ODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_AnPro_PODL.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonPro.WebUserControls.mod_AnPro_PODL mod_AnPro_PODL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="MoonPro.WebUserControls.mod_andamentoStorico" Codebehind="mod_andamentoStorico.ascx.cs" %>
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_andamentoStorico : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_andamentoStorico {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_datiConfermati.ascx.cs"
|
||||
Inherits="MoonPro.WebUserControls.mod_datiConfermati" %>
|
||||
<div id="DatiConfermati" style="margin-top: 0px;">
|
||||
<asp:GridView ID="grView" runat="server" CssClass="table table-striped table-sm small" AutoGenerateColumns="False" DataKeyNames="DataOraConf,idxMacchina" DataSourceID="ods" AllowPaging="True" AllowSorting="True">
|
||||
<HeaderStyle CssClass="default" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="info" />
|
||||
<Columns>
|
||||
<asp:BoundField DataField="DataOraConf" HeaderText="Conferma" ReadOnly="True" SortExpression="DataOraConf" />
|
||||
<asp:BoundField DataField="CommessaEsterna" HeaderText="Commessa" SortExpression="CommessaEsterna" />
|
||||
<asp:BoundField DataField="pezziConf" HeaderText="pz. Conf" SortExpression="pezziConf" />
|
||||
<asp:BoundField DataField="pezziScar" HeaderText="pz. Scar" SortExpression="pezziScar" />
|
||||
<asp:BoundField DataField="CognomeNomeOpr" HeaderText="Operatore" ReadOnly="True" SortExpression="CognomeNomeOpr" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByMacchinaPeriodo" TypeName="MapoDb.DS_ProdTempiTableAdapters.ElencoConfermeProdTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="1" Name="IdxMacchina" SessionField="IdxMacchina" Type="String" />
|
||||
<asp:SessionParameter DefaultValue="DateTime.Now.AddWeeks(-1)" Name="dataFrom" SessionField="_inizio" Type="DateTime" />
|
||||
<asp:SessionParameter DefaultValue="DateTime.Now" Name="dataTo" SessionField="_fine" Type="DateTime" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<asp:HyperLink ID="HyperLink1" runat="server" AccessKey="X" Target="_blank" NavigateUrl="~/excelExportDatiConfermati.aspx" Visible="false">Excel Dati Confermati - solo macchina corrente</asp:HyperLink>
|
||||
-
|
||||
<asp:HyperLink ID="HyperLink3" runat="server" AccessKey="X" Target="_blank" NavigateUrl="~/excelAllMacchineDatiConfermati.aspx" Visible="false">Excel Dati Confermati - tutte le macchine</asp:HyperLink>
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_datiConfermati : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_datiConfermati {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </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.GridView grView;
|
||||
|
||||
/// <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>
|
||||
/// Controllo HyperLink1.
|
||||
/// </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.HyperLink HyperLink1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo HyperLink3.
|
||||
/// </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.HyperLink HyperLink3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="MoonPro.WebUserControls.mod_grafico" Codebehind="mod_grafico.ascx.cs" %>
|
||||
<%@ Register Assembly="SteamWare" Namespace="SteamWare" TagPrefix="cc1" %>
|
||||
<cc1:piechart id="PieChart1" runat="server"></cc1:piechart>
|
||||
@@ -0,0 +1,68 @@
|
||||
using SteamWare;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_grafico : System.Web.UI.UserControl
|
||||
{
|
||||
#region area public
|
||||
|
||||
public pieChart graficoTorta
|
||||
{
|
||||
get
|
||||
{
|
||||
return PieChart1;
|
||||
}
|
||||
set
|
||||
{
|
||||
PieChart1 = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int height
|
||||
{
|
||||
get
|
||||
{
|
||||
return PieChart1.height;
|
||||
}
|
||||
set
|
||||
{
|
||||
PieChart1.height = value;
|
||||
}
|
||||
}
|
||||
public int width
|
||||
{
|
||||
get
|
||||
{
|
||||
return PieChart1.width;
|
||||
}
|
||||
set
|
||||
{
|
||||
PieChart1.width = value;
|
||||
}
|
||||
}
|
||||
public float minPercent
|
||||
{
|
||||
get
|
||||
{
|
||||
return PieChart1.minPercent;
|
||||
}
|
||||
set
|
||||
{
|
||||
PieChart1.minPercent = value;
|
||||
}
|
||||
}
|
||||
public ChartType Tipo
|
||||
{
|
||||
get
|
||||
{
|
||||
return PieChart1.Tipo;
|
||||
}
|
||||
set
|
||||
{
|
||||
PieChart1.Tipo = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_grafico {
|
||||
|
||||
/// <summary>
|
||||
/// PieChart1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::SteamWare.pieChart PieChart1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true"
|
||||
Inherits="MoonPro.WebUserControls.mod_immagineStato" Codebehind="mod_immagineStato.ascx.cs" %>
|
||||
<asp:Panel ID="pnlImg" runat="server">
|
||||
<table cellpadding="0" cellspacing="0" id="stato1">
|
||||
<tr valign="top">
|
||||
<td valign="top">
|
||||
<asp:Label ID="lblMacchina" runat="server" />
|
||||
<br />
|
||||
<asp:Image ID="imgMacchina" runat="server" Width="350px" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
@@ -0,0 +1,87 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_immagineStato : System.Web.UI.UserControl
|
||||
{
|
||||
#region area protected
|
||||
|
||||
protected resoconti _resoconti;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
_resoconti = new resoconti();
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
aggiornamento();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// idx della macchina da mostrare
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
string idxMacchina = "1";
|
||||
try
|
||||
{
|
||||
idxMacchina = memLayer.ML.QSS("IdxMacchina");
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
return idxMacchina;
|
||||
}
|
||||
}
|
||||
public string statoDaIdx(object idx)
|
||||
{
|
||||
return _resoconti.statoDaIdx(Convert.ToInt32(idx));
|
||||
}
|
||||
public string urlMacchina()
|
||||
{
|
||||
string urlMacc = "";
|
||||
try
|
||||
{
|
||||
urlMacc = string.Format("~/images/macchine/{0}", _resoconti.urlMacchina(idxMacchina));
|
||||
if (urlMacc == "")
|
||||
{
|
||||
urlMacc = "~/images/macchine/okuma.jpg";
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
urlMacc = "~/images/macchine/okuma.jpg";
|
||||
}
|
||||
return urlMacc;
|
||||
}
|
||||
public void aggiornamento()
|
||||
{
|
||||
// sistemo i dati riguardo la macchina
|
||||
lblMacchina.Text = string.Format("{0} - {1}", _resoconti.nomeMacchina(idxMacchina), statoDaIdx(_resoconti.statoMacchina(idxMacchina)));
|
||||
imgMacchina.ImageUrl = urlMacchina();
|
||||
updateLayout();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna il layout grafico
|
||||
/// </summary>
|
||||
private void updateLayout()
|
||||
{
|
||||
if (idxMacchina != "nd")
|
||||
{
|
||||
// in base allo stato recupero il colore...
|
||||
string codColore = _resoconti.semaforoDaIdxStato(_resoconti.statoMacchina(idxMacchina));
|
||||
pnlImg.CssClass = codColore;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_immagineStato {
|
||||
|
||||
/// <summary>
|
||||
/// pnlImg 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.Panel pnlImg;
|
||||
|
||||
/// <summary>
|
||||
/// lblMacchina 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.Label lblMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// imgMacchina 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.Image imgMacchina;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_infoAggiuntive.ascx.cs"
|
||||
Inherits="MoonPro.WebUserControls.mod_infoAggiuntive" %>
|
||||
<div id="InfoAggiuntive">
|
||||
<%--Tabella dati ODL--%>
|
||||
<table cellpadding="3" cellspacing="0" style="font-size: x-small; border: solid 1px #666666;">
|
||||
<tr>
|
||||
<td colspan="4" style="width: 500px; color: White; background-color: #333333;">
|
||||
<asp:Label runat="server" ID="lblOdl" Font-Bold="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: #CDCDEF; color: Black; text-align: center; font-size: x-small">
|
||||
<td>Cod articolo
|
||||
</td>
|
||||
<td>Nr pezzi lanciati
|
||||
</td>
|
||||
<td>Nr pezzi confermati
|
||||
</td>
|
||||
<td>Nr pezzi fatti
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="font-weight: bold;">
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblCodArticolo" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblNumPzLanciati" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblNumPzConf" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblNumPzFatti" Font-Bold="false" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: #CDCDEF; color: Black; text-align: center;">
|
||||
<td>Nr pezzi restanti
|
||||
</td>
|
||||
<td>T. disp. impiegato
|
||||
</td>
|
||||
<td>T. rimanente
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblPezziRestantiConf" Font-Bold="true" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblPezziRestanti" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTDispImpiegatoConf" Font-Bold="true" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblTDispImpiegato" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTRimanenteConf" Font-Bold="true" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblTRimanente" />
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr style="background-color: #CDCDEF; color: Black; text-align: center;">
|
||||
<td colspan="1">Efficienza Globale (V+G+R)
|
||||
</td>
|
||||
<td colspan="1">Efficienza Lavoro (V+G)
|
||||
</td>
|
||||
<td colspan="1">Efficienza Teorica (V)
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<asp:Label runat="server" ID="lblEfficienzaTot" Font-Bold="true" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblEfficienzaTotRT" />
|
||||
</td>
|
||||
<td colspan="1">
|
||||
<asp:Label runat="server" ID="lblEfficienzaLavoro" Font-Bold="true" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblEfficienzaLavoroRT" />
|
||||
</td>
|
||||
<td colspan="1">
|
||||
<asp:Label runat="server" ID="lblEfficienzaEff" Font-Bold="true" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblEfficienzaEffRT" />
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr style="background-color: #CDCDEF; color: Black; text-align: center;">
|
||||
<td>Tc Medio (V+G+R)
|
||||
</td>
|
||||
<td>Tc Lavoro (V+G)
|
||||
</td>
|
||||
<td>Tc Tecnico (V)
|
||||
</td>
|
||||
<td>Tc impostato
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="font-weight: bold;">
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcMedio" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblTcMedioRT" Font-Bold="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcLavoro" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblTcLavoroRT" Font-Bold="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcEffettivo" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblTcEffettivoRT" Font-Bold="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcImpostato" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<%--Tabella dati Periodo visualizzato--%>
|
||||
<table cellpadding="3" cellspacing="0" style="font-size: x-small; border: solid 1px #666666; background-color: #ABABEF; color: White;">
|
||||
<tr>
|
||||
<td colspan="4" style="width: 500px; color: White; background-color: #333333;">
|
||||
<asp:Label runat="server" ID="lblPeriodo" Font-Bold="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: #CDCDEF; color: Black; text-align: center;">
|
||||
<td colspan="1">Efficienza Globale (V+G+R)
|
||||
</td>
|
||||
<td colspan="1">Efficienza Lavoro (V+G)
|
||||
</td>
|
||||
<td colspan="1">Efficienza Teorica (V)
|
||||
</td>
|
||||
<td>Nr pezzi fatti
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<asp:Label runat="server" ID="lblEfficienzaTotPerRT" />
|
||||
</td>
|
||||
<td colspan="1">
|
||||
<asp:Label runat="server" ID="lblEfficienzaLavoroPerRT" />
|
||||
</td>
|
||||
<td colspan="1">
|
||||
<asp:Label runat="server" ID="lblEfficienzaEffPerRT" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblNumPzFattiPer" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: #CDCDEF; color: Black; text-align: center;">
|
||||
<td>Tc Medio (V+G+R)
|
||||
</td>
|
||||
<td>Tc Lavoro (V+G)
|
||||
</td>
|
||||
<td>Tc Tecnico (V)
|
||||
</td>
|
||||
<td>Tc impostato
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="font-weight: bold;">
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcMedioPerRT" Font-Bold="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcLavoroPerRT" Font-Bold="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcEffettivoPerRT" Font-Bold="false" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblTcImpostatoPerRT" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,267 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_infoAggiuntive : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
popolaLabels();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// popola le labels
|
||||
/// </summary>
|
||||
private void popolaLabels()
|
||||
{
|
||||
// popolo labels sezione ODL
|
||||
setLabelsODL();
|
||||
// popolo labels sezione periodo selezionato
|
||||
setLabelsPeriodo();
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta le labels sezione "ODL"
|
||||
/// </summary>
|
||||
/// <param name="odl"></param>
|
||||
/// <param name="dataFrom"></param>
|
||||
private void setLabelsODL()
|
||||
{
|
||||
int odl = 0;
|
||||
DateTime dataFrom = DateTime.Now;
|
||||
DateTime dataTo = DateTime.Now;
|
||||
// label ODL
|
||||
try
|
||||
{
|
||||
DS_ProdTempi.ODLRow rigaOdl = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0];
|
||||
odl = rigaOdl.IdxODL;
|
||||
dataFrom = rigaOdl.DataInizio;
|
||||
lblOdl.Text = string.Format("ODL num: {0}, iniziato il {1:dd/MM/yy} alle {1:HH:mm}", odl, dataFrom);
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblOdl.Text = "n/a";
|
||||
}
|
||||
/************************************
|
||||
* data la postazione corrente decide cosa mostrare e come
|
||||
************************************/
|
||||
MapoDb.DS_ProdTempi.stp_repDonati_getDatiProdMacchinaRow rigaProd = DataLayer.obj.taDatiProdMacch.GetData(idxMacchina)[0];
|
||||
lblCodArticolo.Text = rigaProd.CodArticolo;
|
||||
lblNumPzLanciati.Text = string.Format("{0} pz.", rigaProd.PezziLanciati);
|
||||
lblNumPzConf.Text = string.Format("{0} pz.", rigaProd.PezziConf);
|
||||
lblNumPzFatti.Text = string.Format("({0} pz.)", rigaProd.PezziProd);
|
||||
int pezziRimConf = rigaProd.PezziLanciati - rigaProd.PezziConf;
|
||||
int pezziRim = rigaProd.PezziLanciati - rigaProd.PezziProd;
|
||||
if (pezziRimConf > 0)
|
||||
{
|
||||
lblPezziRestantiConf.Text = string.Format("{0} pz.", pezziRimConf);
|
||||
}
|
||||
else
|
||||
{
|
||||
pezziRim = 0;
|
||||
lblPezziRestantiConf.Text = string.Format("!!! {0} !!!", pezziRimConf);
|
||||
lblPezziRestantiConf.ForeColor = System.Drawing.Color.Red;
|
||||
}
|
||||
if (pezziRim > 0)
|
||||
{
|
||||
lblPezziRestanti.Text = string.Format("({0} pz.)", pezziRim);
|
||||
}
|
||||
else
|
||||
{
|
||||
pezziRim = 0;
|
||||
lblPezziRestanti.Text = string.Format("!!! {0} !!!", pezziRim);
|
||||
lblPezziRestanti.ForeColor = System.Drawing.Color.Red;
|
||||
}
|
||||
/************************************
|
||||
* imposto i TEMPI impiegati/rimanenti
|
||||
************************************/
|
||||
lblTDispImpiegatoConf.Text = string.Format("{0:0.0} h", rigaProd.PezziConf * rigaProd.TCAssegnato / 60);
|
||||
lblTDispImpiegato.Text = string.Format("({0:0.0} h)", rigaProd.PezziProd * rigaProd.TCAssegnato / 60);
|
||||
lblTRimanenteConf.Text = string.Format("{0:0.0} h", pezziRimConf * rigaProd.TCAssegnato / 60);
|
||||
lblTRimanente.Text = string.Format("({0:0.0} h)", pezziRim * rigaProd.TCAssegnato / 60);
|
||||
|
||||
|
||||
/************************************
|
||||
* calcolo efficienza totale
|
||||
* se il calcolo non è possibile mette n/a
|
||||
************************************/
|
||||
decimal tempoProd = rigaProd.TCAssegnato * rigaProd.PezziConf;
|
||||
try
|
||||
{
|
||||
lblEfficienzaTot.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaProd.TempoOn / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaTot.Text = "n/a";
|
||||
}
|
||||
// calcolo efficienza lavoro - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaLavoro.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaProd.TempoAuto / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaLavoro.Text = "n/a";
|
||||
|
||||
}
|
||||
// calcolo efficienza Teorica - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaEff.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaProd.TempoRun / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaEff.Text = "n/a";
|
||||
}
|
||||
|
||||
/************************************
|
||||
* imposto i TEMPI CICLO
|
||||
************************************/
|
||||
// riporto Tempo ciclo impostato
|
||||
lblTcImpostato.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCAssegnato));
|
||||
// riporto Tempo ciclo medio
|
||||
lblTcMedio.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCMedio));
|
||||
lblTcMedioRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCMedioRT));
|
||||
// riporto Tempo ciclo lavoro
|
||||
lblTcLavoro.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCLav));
|
||||
lblTcLavoroRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCLavRT));
|
||||
// riporto Tempo ciclo effettivo/tecnico, come media dei 10 migliori delle ultime 8 ore
|
||||
lblTcEffettivo.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCEff));
|
||||
lblTcEffettivoRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCEffRT));
|
||||
|
||||
/************************************
|
||||
* Sistemo efficienze RT da tempi ciclo
|
||||
************************************/
|
||||
try
|
||||
{
|
||||
lblEfficienzaTotRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCMedioRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaTotRT.Text = "n/a";
|
||||
}
|
||||
// calcolo efficienza lavoro - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaLavoroRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCLavRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaLavoroRT.Text = "n/a";
|
||||
|
||||
}
|
||||
// calcolo efficienza Teorica - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaEffRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCEffRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaEffRT.Text = "n/a";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta le labels sezione "Periodo"
|
||||
/// </summary>
|
||||
/// <param name="odl"></param>
|
||||
/// <param name="dataFrom"></param>
|
||||
private void setLabelsPeriodo()
|
||||
{
|
||||
DateTime dataFrom = Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio"));
|
||||
DateTime dataTo = Convert.ToDateTime(memLayer.ML.objSessionObj("_fine"));
|
||||
lblPeriodo.Text = string.Format("Periodo: {0:dd/MM/yy HH:mm} --> {1:dd/MM/yy HH:mm}", dataFrom, dataTo);
|
||||
|
||||
/************************************
|
||||
* recupero dati macchina / periodo
|
||||
************************************/
|
||||
MapoDb.DS_ProdTempi.stp_repDonati_getDatiProdMacchinaPeriodoRow rigaProd = DataLayer.obj.taDatiProdMacchPer.GetData(idxMacchina, dataFrom, dataTo)[0];
|
||||
|
||||
/************************************
|
||||
* calcolo pezzi fatti periodo
|
||||
************************************/
|
||||
int pezziFatti = 0;
|
||||
try
|
||||
{
|
||||
pezziFatti = rigaProd.PezziProd;
|
||||
}
|
||||
catch
|
||||
{
|
||||
pezziFatti = DataLayer.obj.taTempiCicloRilevati.getByMacchinaPeriodo(idxMacchina, dataFrom, dataTo).Rows.Count;
|
||||
}
|
||||
lblNumPzFattiPer.Text = string.Format("({0} pz.)", pezziFatti);
|
||||
|
||||
/************************************
|
||||
* imposto i TEMPI CICLO
|
||||
************************************/
|
||||
// riporto Tempo ciclo impostato
|
||||
lblTcImpostatoPerRT.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCAssegnato));
|
||||
// riporto Tempo ciclo medio
|
||||
lblTcMedioPerRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCMedioRT));
|
||||
// riporto Tempo ciclo lavoro
|
||||
lblTcLavoroPerRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCLavRT));
|
||||
// riporto Tempo ciclo effettivo/tecnico, come media dei 10 migliori delle ultime 8 ore
|
||||
lblTcEffettivoPerRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCEffRT));
|
||||
|
||||
/************************************
|
||||
* Sistemo efficienze RT da tempi ciclo
|
||||
************************************/
|
||||
try
|
||||
{
|
||||
lblEfficienzaTotPerRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCMedioRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaTotPerRT.Text = "n/a";
|
||||
}
|
||||
// calcolo efficienza lavoro - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaLavoroPerRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCLavRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaLavoroPerRT.Text = "n/a";
|
||||
|
||||
}
|
||||
// calcolo efficienza Teorica - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaEffPerRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCEffRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaEffPerRT.Text = "n/a";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idx della macchina da mostrare
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
string idxMacchina = "1";
|
||||
try
|
||||
{
|
||||
idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
return idxMacchina;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
popolaLabels();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_infoAggiuntive {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOdl.
|
||||
/// </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.Label lblOdl;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblCodArticolo.
|
||||
/// </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.Label lblCodArticolo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumPzLanciati.
|
||||
/// </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.Label lblNumPzLanciati;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumPzConf.
|
||||
/// </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.Label lblNumPzConf;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumPzFatti.
|
||||
/// </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.Label lblNumPzFatti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPezziRestantiConf.
|
||||
/// </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.Label lblPezziRestantiConf;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPezziRestanti.
|
||||
/// </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.Label lblPezziRestanti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTDispImpiegatoConf.
|
||||
/// </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.Label lblTDispImpiegatoConf;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTDispImpiegato.
|
||||
/// </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.Label lblTDispImpiegato;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTRimanenteConf.
|
||||
/// </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.Label lblTRimanenteConf;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTRimanente.
|
||||
/// </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.Label lblTRimanente;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaTot.
|
||||
/// </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.Label lblEfficienzaTot;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaTotRT.
|
||||
/// </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.Label lblEfficienzaTotRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaLavoro.
|
||||
/// </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.Label lblEfficienzaLavoro;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaLavoroRT.
|
||||
/// </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.Label lblEfficienzaLavoroRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaEff.
|
||||
/// </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.Label lblEfficienzaEff;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaEffRT.
|
||||
/// </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.Label lblEfficienzaEffRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcMedio.
|
||||
/// </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.Label lblTcMedio;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcMedioRT.
|
||||
/// </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.Label lblTcMedioRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcLavoro.
|
||||
/// </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.Label lblTcLavoro;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcLavoroRT.
|
||||
/// </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.Label lblTcLavoroRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcEffettivo.
|
||||
/// </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.Label lblTcEffettivo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcEffettivoRT.
|
||||
/// </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.Label lblTcEffettivoRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcImpostato.
|
||||
/// </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.Label lblTcImpostato;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPeriodo.
|
||||
/// </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.Label lblPeriodo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaTotPerRT.
|
||||
/// </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.Label lblEfficienzaTotPerRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaLavoroPerRT.
|
||||
/// </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.Label lblEfficienzaLavoroPerRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblEfficienzaEffPerRT.
|
||||
/// </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.Label lblEfficienzaEffPerRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumPzFattiPer.
|
||||
/// </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.Label lblNumPzFattiPer;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcMedioPerRT.
|
||||
/// </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.Label lblTcMedioPerRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcLavoroPerRT.
|
||||
/// </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.Label lblTcLavoroPerRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcEffettivoPerRT.
|
||||
/// </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.Label lblTcEffettivoPerRT;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTcImpostatoPerRT.
|
||||
/// </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.Label lblTcImpostatoPerRT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="MoonPro.WebUserControls.mod_listaStatiEventi"
|
||||
CodeBehind="mod_listaStatiEventi.ascx.cs" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Src="mod_infoAggiuntive.ascx" TagName="mod_infoAggiuntive" TagPrefix="uc1" %>
|
||||
<%@ Register Src="mod_datiConfermati.ascx" TagName="mod_datiConfermati" TagPrefix="uc2" %>
|
||||
|
||||
|
||||
<asp:TabContainer ID="TabContLogs" runat="server" ScrollBars="Auto" Visible="True"
|
||||
ActiveTabIndex="0" Width="500px">
|
||||
<asp:TabPanel ID="TabDatiAggiuntivi" runat="server" ScrollBars="Auto">
|
||||
<HeaderTemplate>
|
||||
Produzione
|
||||
</HeaderTemplate>
|
||||
<ContentTemplate>
|
||||
<uc1:mod_infoAggiuntive ID="mod_infoAggiuntive1" runat="server"></uc1:mod_infoAggiuntive>
|
||||
</ContentTemplate>
|
||||
</asp:TabPanel>
|
||||
<asp:TabPanel ID="DatiConfermati" runat="server" ScrollBars="Auto">
|
||||
<HeaderTemplate>
|
||||
Dati Confermati
|
||||
</HeaderTemplate>
|
||||
<ContentTemplate>
|
||||
<uc2:mod_datiConfermati ID="mod_datiConfermati1" runat="server" />
|
||||
</ContentTemplate>
|
||||
</asp:TabPanel>
|
||||
<asp:TabPanel ID="TabStati" runat="server" ScrollBars="Auto">
|
||||
<HeaderTemplate>
|
||||
Elenco Stati
|
||||
</HeaderTemplate>
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="gvStati" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
|
||||
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato"
|
||||
DataSourceID="ods_DiarioDiBordo" OnSorted="reportUpdt" OnPageIndexChanged="reportUpdt">
|
||||
<AlternatingRowStyle BackColor="White" Font-Size="Smaller" />
|
||||
<Columns>
|
||||
<asp:BoundField DataField="InizioStato" DataFormatString="{0:dd/MM/yy HH:mm:ss}"
|
||||
HeaderText="Inizio Stato" HtmlEncode="False" ReadOnly="True" SortExpression="InizioStato" />
|
||||
<asp:TemplateField HeaderText="Stato" SortExpression="IdxStato">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblStato" runat="server" Text='<%# statoDaIdx(Eval("IdxStato")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Minuti" SortExpression="DurataMinuti">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDurata" runat="server" Text='<%# durataEvento(Eval("DurataMinuti")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="CodArticolo" HeaderText="Articolo" SortExpression="CodArticolo" />
|
||||
<asp:BoundField DataField="pallet" HeaderText="Pallet" SortExpression="pallet" Visible="False" />
|
||||
<asp:TemplateField HeaderText="Operatore" SortExpression="MatrOpr">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblOperatore" runat="server" Text='<%# operatoreDaMatr(Eval("MatrOpr")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<EditRowStyle BackColor="#7C6F57" Font-Size="Smaller" />
|
||||
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" Font-Size="Smaller" />
|
||||
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" Font-Size="Smaller" />
|
||||
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" Font-Size="Smaller" />
|
||||
<RowStyle BackColor="#E3EAEB" Font-Size="Smaller" />
|
||||
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" Font-Size="Smaller" />
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods_DiarioDiBordo" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="GetDataFiltered" TypeName="MapoDb.DS_applicazioneTableAdapters.DiarioDiBordoTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="1" Name="IdxMacchina" SessionField="IdxMacchina"
|
||||
Type="String" />
|
||||
<asp:SessionParameter DefaultValue="DateTime.Now.AddWeeks(-1)" Name="inizio" SessionField="_inizio"
|
||||
Type="DateTime" />
|
||||
<asp:SessionParameter DefaultValue="DateTime.Now" Name="fine" SessionField="_fine"
|
||||
Type="DateTime" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="durataMin" SessionField="_durataMin"
|
||||
Type="Double" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HyperLink ID="HyperLink1" runat="server" AccessKey="X" Target="_blank" NavigateUrl="~/excelExportStati.aspx">Excel Stati - solo macchina corrente</asp:HyperLink>
|
||||
-
|
||||
<asp:HyperLink ID="HyperLink3" runat="server" AccessKey="X" Target="_blank" NavigateUrl="~/excelAllMacchineExportStati.aspx">Excel Stati - tutte le macchine</asp:HyperLink>
|
||||
</ContentTemplate>
|
||||
</asp:TabPanel>
|
||||
<asp:TabPanel ID="TabEventi" runat="server" ScrollBars="Auto">
|
||||
<HeaderTemplate>
|
||||
Log eventi
|
||||
</HeaderTemplate>
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="gvEventi" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
|
||||
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato"
|
||||
OnSorted="reportUpdt" OnPageIndexChanged="reportUpdt" DataSourceID="ods_EventList">
|
||||
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" Font-Size="Smaller" />
|
||||
<RowStyle BackColor="#E3EAEB" Font-Size="Smaller" />
|
||||
<EditRowStyle BackColor="#7C6F57" Font-Size="Smaller" />
|
||||
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" Font-Size="Smaller" />
|
||||
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" Font-Size="Smaller" />
|
||||
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" Font-Size="Smaller" />
|
||||
<AlternatingRowStyle BackColor="White" Font-Size="Smaller" />
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Invio messaggio" SortExpression="InizioStato">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblInizioStato" runat="server" Text='<%# Eval("InizioStato","{0:dd/MM/yy HH:mm:ss}" ) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Evento" SortExpression="IdxTipo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEvento" runat="server" Text='<%# tipoDaIdx(Eval("IdxTipo")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Articolo" SortExpression="CodArticolo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEvento" runat="server" Text='<%# Eval("CodArticolo") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="pallet" HeaderText="pallet" SortExpression="pallet" Visible="False" />
|
||||
<asp:TemplateField HeaderText="Operatore" SortExpression="MatrOpr">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblOperatore" runat="server" Text='<%# operatoreDaMatr(Eval("MatrOpr")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods_EventList" runat="server" OldValuesParameterFormatString="original_{0}"
|
||||
SelectMethod="GetDataFiltered" TypeName="MapoDb.DS_applicazioneTableAdapters.EventListTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="1" Name="IdxMacchina" SessionField="IdxMacchina"
|
||||
Type="String" />
|
||||
<asp:SessionParameter DefaultValue="DateTime.Now.AddWeeks(-1)" Name="inizio" SessionField="_inizio"
|
||||
Type="DateTime" />
|
||||
<asp:SessionParameter DefaultValue="DateTime.Now" Name="fine" SessionField="_fine"
|
||||
Type="DateTime" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HyperLink ID="HyperLink2" runat="server" AccessKey="X" Target="_blank" NavigateUrl="~/excelExportEventi.aspx">Excel Eventi - solo macchina corrente</asp:HyperLink>
|
||||
|
||||
<asp:HyperLink ID="HyperLink4" runat="server" AccessKey="X" Target="_blank" NavigateUrl="~/excelAllMacchineExportEventi.aspx">Excel Eventi - tutte le macchine</asp:HyperLink>
|
||||
</ContentTemplate>
|
||||
</asp:TabPanel>
|
||||
</asp:TabContainer>
|
||||
@@ -0,0 +1,149 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_listaStatiEventi : System.Web.UI.UserControl
|
||||
{
|
||||
#region area protected
|
||||
|
||||
protected resoconti _resoconti;
|
||||
protected int _numRighe = 17;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
_resoconti = new resoconti();
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
aggiornamento();
|
||||
}
|
||||
//ods_DiarioDiBordo.TypeName = "MapoDb.DataLayer.obj.taStati";
|
||||
//ods_EventList.TypeName = "MapoDb.DataLayer.obj.taEventi";
|
||||
}
|
||||
|
||||
protected void reportUpdate()
|
||||
{
|
||||
// alzo l'evento d update/inserimento e ricarico cache...
|
||||
if (eh_doUpdate != null)
|
||||
{
|
||||
eh_doUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void txtRighe_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//numRighe = Convert.ToInt32(txtRighe.Text);
|
||||
aggiornamento();
|
||||
}
|
||||
|
||||
#region area public
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_doUpdate;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// idx della macchina da mostrare
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
string idxMacchina = "1";
|
||||
try
|
||||
{
|
||||
idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
return idxMacchina;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
public string statoDaIdx(object idx)
|
||||
{
|
||||
return _resoconti.statoDaIdx(Convert.ToInt32(idx));
|
||||
}
|
||||
public string operatoreDaMatr(object matricola)
|
||||
{
|
||||
int matr = 0;
|
||||
try
|
||||
{
|
||||
matr = Convert.ToInt32(matricola);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return _resoconti.oprDaMatr(matr);
|
||||
}
|
||||
public string tipoDaIdx(object idx)
|
||||
{
|
||||
return _resoconti.tipoDaIdx(Convert.ToInt32(idx));
|
||||
}
|
||||
public void aggiornamento()
|
||||
{
|
||||
if (memLayer.ML.CRI("_logLevel") > 5)
|
||||
{
|
||||
logger.lg.scriviLog("inizio caricamento dati", SteamWare.tipoLog.INFO);
|
||||
}
|
||||
gvStati.PageSize = _numRighe;
|
||||
gvEventi.PageSize = _numRighe;
|
||||
ods_DiarioDiBordo.DataBind();
|
||||
ods_EventList.DataBind();
|
||||
mod_datiConfermati1.doUpdate();
|
||||
mod_infoAggiuntive1.doUpdate();
|
||||
if (memLayer.ML.CRI("_logLevel") > 5)
|
||||
{
|
||||
SteamWare.logger.lg.scriviLog("fine caricamento dati", SteamWare.tipoLog.INFO);
|
||||
}
|
||||
}
|
||||
public void reportUpdt(object sender, EventArgs e)
|
||||
{
|
||||
reportUpdate();
|
||||
}
|
||||
|
||||
public int numRighe
|
||||
{
|
||||
get
|
||||
{
|
||||
return _numRighe;
|
||||
}
|
||||
set
|
||||
{
|
||||
_numRighe = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// restituisce stringa formattata in HH:mm
|
||||
/// </summary>
|
||||
/// <param name="durataMinuti"></param>
|
||||
/// <returns></returns>
|
||||
public string durataEvento(object durataMinuti)
|
||||
{
|
||||
//string durataFormattata = "";
|
||||
//try
|
||||
//{
|
||||
// DateTime tempo = new DateTime();
|
||||
// tempo = tempo.AddMinutes((double)durataMinuti);
|
||||
// durataFormattata = string.Format("{0:00}:{1:00}:{2:00}", tempo.Hour, tempo.Minute, tempo.Second);
|
||||
//}
|
||||
//catch
|
||||
//{
|
||||
// logger.lg.scriviLog(string.Format("errore calcolo durata: durataMinuti {0}", durataMinuti), tipoLog.EXCEPTION);
|
||||
//}
|
||||
//return durataFormattata;
|
||||
return utility.durataEventoHMS((double)durataMinuti);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_listaStatiEventi {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo TabContLogs.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.TabContainer TabContLogs;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo TabDatiAggiuntivi.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.TabPanel TabDatiAggiuntivi;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_infoAggiuntive1.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonPro.WebUserControls.mod_infoAggiuntive mod_infoAggiuntive1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo DatiConfermati.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.TabPanel DatiConfermati;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_datiConfermati1.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonPro.WebUserControls.mod_datiConfermati mod_datiConfermati1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo TabStati.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.TabPanel TabStati;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo gvStati.
|
||||
/// </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.GridView gvStati;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ods_DiarioDiBordo.
|
||||
/// </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_DiarioDiBordo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo HyperLink1.
|
||||
/// </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.HyperLink HyperLink1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo HyperLink3.
|
||||
/// </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.HyperLink HyperLink3;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo TabEventi.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.TabPanel TabEventi;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo gvEventi.
|
||||
/// </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.GridView gvEventi;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ods_EventList.
|
||||
/// </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_EventList;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo HyperLink2.
|
||||
/// </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.HyperLink HyperLink2;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo HyperLink4.
|
||||
/// </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.HyperLink HyperLink4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_mainMap.ascx.cs" Inherits="MoonPro.WebUserControls.mod_mainMap" %>
|
||||
<div style="float: none; text-align: center; margin: auto; min-width: 600px;">
|
||||
<span runat="server" id="spStato" class="btn btn-secondary">
|
||||
<asp:HyperLink runat="server" ID="hlStato" CssClass="fa fa-th-large" Font-Size="1.3em" ToolTip="Passa a Visualizzazione Stato Corrente" NavigateUrl="~/MappaStato.aspx" Enabled="true"><span style="font-family: Verdana, Arial; font-size:0.8em;"> --> Mappa Stato</span></asp:HyperLink>
|
||||
</span>
|
||||
<span style="margin: 0px 4px;"></span>
|
||||
<span runat="server" id="spSequencer" class="btn btn-secondary">
|
||||
<asp:HyperLink runat="server" ID="hlSequencer" CssClass="fa fa-bars" Font-Size="1.3em" ToolTip="Passa a Visualizzazione Mappa Tempi" NavigateUrl="~/MappaStatoSeq.aspx" Enabled="true"><span style="font-family: Verdana, Arial; font-size:0.8em;"> --> Mappa Tempi</span></asp:HyperLink>
|
||||
</span>
|
||||
<span style="margin: 0px 4px;"></span>
|
||||
<span runat="server" id="spStatistiche" class="btn btn-secondary">
|
||||
<asp:HyperLink runat="server" ID="hlStatistiche" CssClass="fa fa-pie-chart" Font-Size="1.3em" ToolTip="Passa a Visualizzazione Statistiche Impiego" NavigateUrl="~/StatisticheImpiego.aspx" Enabled="true"><span style="font-family: Verdana, Arial; font-size:0.8em;"> --> Statistiche</span></asp:HyperLink>
|
||||
</span>
|
||||
<span style="margin: 0px 4px;"></span>
|
||||
<span runat="server" id="spProduzione" class="btn btn-secondary">
|
||||
<asp:HyperLink runat="server" ID="hlProduzione" CssClass="fa fa-industry" Font-Size="1.3em" ToolTip="Passa a Visualizzazione Riepilogo Produzione" NavigateUrl="~/AnalisiProduzione.aspx" Enabled="true"><span style="font-family: Verdana, Arial; font-size:0.8em;"> --> Produzione</span></asp:HyperLink>
|
||||
</span>
|
||||
<div class="clearDiv"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_mainMap : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// blocco button della pagina corrente...
|
||||
if (Page.Title.Contains("Stato"))
|
||||
{
|
||||
hlStato.Enabled = false;
|
||||
spStato.Attributes.Remove("class");
|
||||
spStato.Attributes.Add("class", "btn btn-warning");
|
||||
}
|
||||
else if (Page.Title.Contains("Sequencer"))
|
||||
{
|
||||
hlSequencer.Enabled = false;
|
||||
spSequencer.Attributes.Remove("class");
|
||||
spSequencer.Attributes.Add("class", "btn btn-warning");
|
||||
}
|
||||
else if (Page.Title.Contains("Statistiche"))
|
||||
{
|
||||
hlStatistiche.Enabled = false;
|
||||
spStatistiche.Attributes.Remove("class");
|
||||
spStatistiche.Attributes.Add("class", "btn btn-warning");
|
||||
}
|
||||
else if (Page.Title.Contains("Produzione"))
|
||||
{
|
||||
hlProduzione.Enabled = false;
|
||||
spProduzione.Attributes.Remove("class");
|
||||
spProduzione.Attributes.Add("class", "btn btn-warning");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_mainMap {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo spStato.
|
||||
/// </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 spStato;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlStato.
|
||||
/// </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.HyperLink hlStato;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo spSequencer.
|
||||
/// </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 spSequencer;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlSequencer.
|
||||
/// </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.HyperLink hlSequencer;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo spStatistiche.
|
||||
/// </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 spStatistiche;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlStatistiche.
|
||||
/// </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.HyperLink hlStatistiche;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo spProduzione.
|
||||
/// </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 spProduzione;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlProduzione.
|
||||
/// </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.HyperLink hlProduzione;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true"
|
||||
Inherits="mod_menuBottom" CodeBehind="mod_menuBottom.ascx.cs" %>
|
||||
|
||||
<div class="navbar navbar-dark text-light bg-dark fixed-bottom" role="navigation" style="border-top: 1px solid #ABABAB; padding: 0px;">
|
||||
<div class="d-flex justify-content-start pl-3 text-left">
|
||||
<asp:Label ID="lblrev" runat="server"></asp:Label>
|
||||
<asp:Label runat="server" ID="lblApp" Text="." /> |
|
||||
<asp:Label runat="server" ID="lblCopyRight" Text="..." />
|
||||
</div>
|
||||
<div class="d-flex justify-content-end pr-3 text-right">
|
||||
<asp:UpdateProgress ID="updtRicerca" runat="server" DisplayAfter="5" DynamicLayout="false">
|
||||
<ProgressTemplate>
|
||||
<div id="progress_back">
|
||||
</div>
|
||||
<div id="progress_top">
|
||||
<i class="fa fa-cog fa-spin fa-2x"></i> <i class="fa fa-cog fa-spin fa-2x"></i> <i class="fa fa-cog fa-spin fa-2x"></i>
|
||||
</div>
|
||||
</ProgressTemplate>
|
||||
</asp:UpdateProgress>
|
||||
Powered by <a href="http://www.steamware.net" target="_blank">
|
||||
<img src="Images/LogoSteamware.png" alt="Steamware" height="18" /></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Diagnostics;
|
||||
|
||||
public partial class mod_menuBottom : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// sistemo le stringhe...
|
||||
var versionInfo = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||
lblCopyRight.Text = string.Format("<b>{0}</b>", versionInfo.LegalCopyright);
|
||||
lblApp.Text = string.Format("{0} v.{1}", ConfigurationManager.AppSettings.Get("appName"), System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
public partial class mod_menuBottom {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblrev.
|
||||
/// </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.Label lblrev;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblApp.
|
||||
/// </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.Label lblApp;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblCopyRight.
|
||||
/// </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.Label lblCopyRight;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo updtRicerca.
|
||||
/// </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.UpdateProgress updtRicerca;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="MoonPro.WebUserControls.mod_menuTop"
|
||||
CodeBehind="mod_menuTop.ascx.cs" %>
|
||||
<% if (false)
|
||||
{ %>
|
||||
<link href="../Style.css" rel="stylesheet" type="text/css" />
|
||||
<% } %>
|
||||
<%-- Gestione resize --%>
|
||||
<asp:HiddenField runat="server" ID="HiddenHeight" OnValueChanged="HiddenHeight_ValueChanged" />
|
||||
<asp:HiddenField runat="server" ID="HiddenWidth" OnValueChanged="HiddenWidth_ValueChanged" />
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
document.getElementById("Mod_menuTop1_HiddenHeight").value = getClientHeight();
|
||||
document.getElementById("Mod_menuTop1_HiddenWidth").value = getClientWidth();
|
||||
window.onresize = updateValues;
|
||||
function updateValues() {
|
||||
document.getElementById("Mod_menuTop1_HiddenHeight").value = getClientHeight();
|
||||
document.getElementById("Mod_menuTop1_HiddenWidth").value = getClientWidth();
|
||||
document.forms[0].submit();
|
||||
}
|
||||
function getClientWidth() {
|
||||
return document.compatMode == 'CSS1Compat' && !window.opera ? document.documentElement.clientWidth : document.body.clientWidth;
|
||||
}
|
||||
function getClientHeight() {
|
||||
return document.compatMode == 'CSS1Compat' && !window.opera ? document.documentElement.clientHeight : document.body.clientHeight;
|
||||
}
|
||||
</script>
|
||||
<nav class="navbar navbar-expand fixed-top navbar-dark bg-black text-light titleBlock p-0">
|
||||
<div class="topTitle p-1" style="width: 100%;">
|
||||
<div class="row">
|
||||
<div class="col-3 text-left">
|
||||
<asp:LinkButton ID="btnUpdate" runat="server" CssClass="dxButtonClass" OnClick="btnUpdate_Click"></asp:LinkButton>
|
||||
<span>
|
||||
<asp:Label runat="server" ID="lastUpdate" CssClass="dateTimeSmall"><% =scriviOra() %></asp:Label>
|
||||
</span>
|
||||
<asp:LinkButton ID="btnLogOut" runat="server" CssClass="dxButtonClass" Visible="False"
|
||||
OnClick="btnLogOut_Click"></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-6 text-center text-uppercase">
|
||||
<asp:Label runat="server" ID="lblTitolo" Text="Stato Officina" CssClass="body fontMedio" />
|
||||
</div>
|
||||
<div class="col-3 text-right text-uppercase">
|
||||
MAPO
|
||||
<asp:Image ID="logo" CssClass="img-fluid" ImageUrl="~/images/logoMapoNoText.png" runat="server" Height="24px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="mb-4"> </div>
|
||||
@@ -0,0 +1,183 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_menuTop : System.Web.UI.UserControl
|
||||
{
|
||||
private string _titleString;
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_toggleMenuSx;
|
||||
public event EventHandler eh_reqUpdateMenu;
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
btnLogOut.Visible = user_std.UtSn.isForcedUser;
|
||||
if (memLayer.ML.isInSessionObject("doUpdateNow"))
|
||||
{
|
||||
doFullDataUpdate();
|
||||
memLayer.ML.emptySessionVal("doUpdateNow");
|
||||
}
|
||||
}
|
||||
protected void btnLogOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Session.Abandon();
|
||||
Response.Redirect("forceUser.aspx");
|
||||
}
|
||||
protected void btnUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
doFullDataUpdate();
|
||||
updateWindowSize();
|
||||
}
|
||||
|
||||
private void doFullDataUpdate()
|
||||
{
|
||||
// salvo i dati attuali...
|
||||
string cod_cdc = SteamWare.memLayer.ML.StringSessionObj("valRicercaCdC");
|
||||
string lingua = user_std.UtSn.lingua;
|
||||
string USER_NAME = SteamWare.memLayer.ML.StringSessionObj("USER_NAME");
|
||||
string DOMINIO = SteamWare.memLayer.ML.StringSessionObj("DOMINIO");
|
||||
bool isForceUser = user_std.UtSn.isForcedUser;
|
||||
// salvo i valori delle tab in session...
|
||||
Dictionary<string, string> sessionParam = SteamWare.memLayer.ML.valSess2SurvUpd;
|
||||
|
||||
// svuoto session e cache per rileggere i dati da Db
|
||||
Session.RemoveAll();
|
||||
|
||||
SteamWare.memLayer.ML.flushRegisteredCache();
|
||||
|
||||
// rimemorizzo
|
||||
SteamWare.memLayer.ML.setSessionVal("valRicercaCdC", cod_cdc);
|
||||
user_std.UtSn.startUpUtente(DOMINIO, USER_NAME);
|
||||
user_std.UtSn.lingua = lingua;
|
||||
user_std.UtSn.isForcedUser = isForceUser;
|
||||
DataWrap.DW.resetVocabolario();
|
||||
|
||||
// risalvo in session i valori...
|
||||
foreach (KeyValuePair<string, string> kvp in sessionParam)
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal(kvp.Key, kvp.Value, true);
|
||||
}
|
||||
|
||||
// cambio visibilità del menù laterale...
|
||||
if (eh_reqUpdateMenu != null)
|
||||
{
|
||||
eh_reqUpdateMenu(this, new EventArgs());
|
||||
}
|
||||
if (memLayer.ML.CRB("UpdateToDefault"))
|
||||
{
|
||||
Response.Redirect("Default.aspx");
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect(Page.Request.Url.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
protected void bindControlli()
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
//lnkHelp.ToolTip = traduci("ApriManualeHelp");
|
||||
// solo se user è auth...
|
||||
if (user_std.UtSn.isAuth)
|
||||
{
|
||||
if (_titleString != "")
|
||||
{
|
||||
_titleString = "";
|
||||
memLayer.ML.setSessionVal("_titleString",_titleString);
|
||||
memLayer.ML.setSessionVal("SessionUpdateMenu", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.setSessionVal("SessionUpdateMenu", false);
|
||||
}
|
||||
btnLogOut.Text = user_std.UtSn.Traduci("LogOut");
|
||||
btnUpdate.Text = user_std.UtSn.Traduci("Update");
|
||||
setTimer();
|
||||
setClock();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta il tempo di scadenza del timer x il refresh della pagina (della parte top) per evitare che la sessione sul server scada
|
||||
/// </summary>
|
||||
private void setTimer()
|
||||
{
|
||||
//Timer1.Interval = SteamWare.memLayer.ML.CRI("intUpdatePagina_ms");
|
||||
}
|
||||
protected void lnkShowHide_Click(object sender, EventArgs e)
|
||||
{
|
||||
// cambio visibilità del menù laterale...
|
||||
if (eh_toggleMenuSx != null)
|
||||
{
|
||||
eh_toggleMenuSx(this, new EventArgs());
|
||||
}
|
||||
|
||||
}
|
||||
protected void Timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
setClock();
|
||||
}
|
||||
|
||||
private void setClock()
|
||||
{
|
||||
//lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss");
|
||||
}
|
||||
protected void lblUser_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect("./chLang.aspx");
|
||||
}
|
||||
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
btnUpdate.Text = "Update";
|
||||
updateWindowSize();
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
}
|
||||
protected override void OnPreRender(EventArgs e)
|
||||
{
|
||||
base.OnPreRender(e);
|
||||
}
|
||||
|
||||
private void updateWindowSize()
|
||||
{
|
||||
if (HiddenHeight.Value != "")
|
||||
{
|
||||
memLayer.ML.setSessionVal("WindowHeight", HiddenHeight.Value, true);
|
||||
}
|
||||
if (HiddenWidth.Value != "")
|
||||
{
|
||||
memLayer.ML.setSessionVal("WindowWidth", HiddenWidth.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public string scriviOra()
|
||||
{
|
||||
return string.Format("{0:d} - {0:HH.mm.ss}", DateTime.Now);
|
||||
}
|
||||
protected void HiddenHeight_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateWindowSize();
|
||||
}
|
||||
|
||||
protected void HiddenWidth_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateWindowSize();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_menuTop {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo HiddenHeight.
|
||||
/// </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.HiddenField HiddenHeight;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo HiddenWidth.
|
||||
/// </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.HiddenField HiddenWidth;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo btnUpdate.
|
||||
/// </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.LinkButton btnUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lastUpdate.
|
||||
/// </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.Label lastUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo btnLogOut.
|
||||
/// </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.LinkButton btnLogOut;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTitolo.
|
||||
/// </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.Label lblTitolo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo logo.
|
||||
/// </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.Image logo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="MoonPro.WebUserControls.mod_periodoAnalisi"
|
||||
CodeBehind="mod_periodoAnalisi.ascx.cs" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<div class="filtraggio" style="width: 100%;">
|
||||
<div class="floSx padSmall">
|
||||
<asp:TextBox ID="txtInizio" TabIndex="1" runat="server" Width="7em" MaxLength="10"
|
||||
AutoPostBack="True" OnTextChanged="txtInizio_TextChanged" />
|
||||
<asp:DropDownList ID="ddlOraInizio" TabIndex="2" runat="server" AutoPostBack="True"
|
||||
OnTextChanged="txtInizio_TextChanged" Font-Size="Smaller" CssClass="pad3">
|
||||
<asp:ListItem>00</asp:ListItem>
|
||||
<asp:ListItem>01</asp:ListItem>
|
||||
<asp:ListItem>02</asp:ListItem>
|
||||
<asp:ListItem>03</asp:ListItem>
|
||||
<asp:ListItem>04</asp:ListItem>
|
||||
<asp:ListItem>05</asp:ListItem>
|
||||
<asp:ListItem>06</asp:ListItem>
|
||||
<asp:ListItem>07</asp:ListItem>
|
||||
<asp:ListItem>08</asp:ListItem>
|
||||
<asp:ListItem>09</asp:ListItem>
|
||||
<asp:ListItem>10</asp:ListItem>
|
||||
<asp:ListItem>11</asp:ListItem>
|
||||
<asp:ListItem>12</asp:ListItem>
|
||||
<asp:ListItem>13</asp:ListItem>
|
||||
<asp:ListItem>14</asp:ListItem>
|
||||
<asp:ListItem>15</asp:ListItem>
|
||||
<asp:ListItem>16</asp:ListItem>
|
||||
<asp:ListItem>17</asp:ListItem>
|
||||
<asp:ListItem>18</asp:ListItem>
|
||||
<asp:ListItem>19</asp:ListItem>
|
||||
<asp:ListItem>20</asp:ListItem>
|
||||
<asp:ListItem>21</asp:ListItem>
|
||||
<asp:ListItem>22</asp:ListItem>
|
||||
<asp:ListItem>23</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtInizio"
|
||||
FirstDayOfWeek="Monday" Format="dd/MM/yyyy">
|
||||
</asp:CalendarExtender>
|
||||
</div>
|
||||
<div class="floSx padSmall">
|
||||
<asp:TextBox ID="txtFine" TabIndex="3" runat="server" Width="7em" MaxLength="10"
|
||||
AutoPostBack="True" OnTextChanged="txtFine_TextChanged" />
|
||||
<asp:DropDownList ID="ddlOraFine" TabIndex="2" runat="server" AutoPostBack="True"
|
||||
OnTextChanged="txtFine_TextChanged" Font-Size="Smaller" CssClass="pad3">
|
||||
<asp:ListItem>00</asp:ListItem>
|
||||
<asp:ListItem>01</asp:ListItem>
|
||||
<asp:ListItem>02</asp:ListItem>
|
||||
<asp:ListItem>03</asp:ListItem>
|
||||
<asp:ListItem>04</asp:ListItem>
|
||||
<asp:ListItem>05</asp:ListItem>
|
||||
<asp:ListItem>06</asp:ListItem>
|
||||
<asp:ListItem>07</asp:ListItem>
|
||||
<asp:ListItem>08</asp:ListItem>
|
||||
<asp:ListItem>09</asp:ListItem>
|
||||
<asp:ListItem>10</asp:ListItem>
|
||||
<asp:ListItem>11</asp:ListItem>
|
||||
<asp:ListItem>12</asp:ListItem>
|
||||
<asp:ListItem>13</asp:ListItem>
|
||||
<asp:ListItem>14</asp:ListItem>
|
||||
<asp:ListItem>15</asp:ListItem>
|
||||
<asp:ListItem>16</asp:ListItem>
|
||||
<asp:ListItem>17</asp:ListItem>
|
||||
<asp:ListItem>18</asp:ListItem>
|
||||
<asp:ListItem>19</asp:ListItem>
|
||||
<asp:ListItem>20</asp:ListItem>
|
||||
<asp:ListItem>21</asp:ListItem>
|
||||
<asp:ListItem>22</asp:ListItem>
|
||||
<asp:ListItem>23</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtFine"
|
||||
FirstDayOfWeek="Monday" Format="dd/MM/yyyy">
|
||||
</asp:CalendarExtender>
|
||||
</div>
|
||||
<div class="floSx padSmall">
|
||||
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" Font-Size="Smaller" CssClass="pad3">
|
||||
<asp:ListItem>selezione</asp:ListItem>
|
||||
<asp:ListItem>oggi</asp:ListItem>
|
||||
<asp:ListItem>ieri</asp:ListItem>
|
||||
<asp:ListItem>questa settimana</asp:ListItem>
|
||||
<asp:ListItem Selected="True">ultimi 7gg</asp:ListItem>
|
||||
<asp:ListItem>questo mese</asp:ListItem>
|
||||
<asp:ListItem>ultimi 30gg</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:Button ID="btnUpdate" runat="server" Text="update" Visible="false" OnClick="btnUpdate_Click" />
|
||||
|
||||
</div>
|
||||
<div class="floSx padSmall">
|
||||
<asp:Label ID="lblDurataMin" runat="server" Visible="false" />
|
||||
|
||||
<asp:TextBox ID="txtDurataMin" TabIndex="3" runat="server" Width="30px" MaxLength="3"
|
||||
AutoPostBack="True" OnTextChanged="txtInizio_TextChanged" Visible="false"></asp:TextBox>
|
||||
</div>
|
||||
<div class="clearDiv"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,330 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_periodoAnalisi : System.Web.UI.UserControl
|
||||
{
|
||||
#region area protected
|
||||
|
||||
protected intervalloDate _intervallo;
|
||||
|
||||
protected bool dtModStarted
|
||||
{
|
||||
get
|
||||
{
|
||||
return btnUpdate.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack && !dtModStarted)
|
||||
{
|
||||
base.OnInit(e);
|
||||
setIntervallo();
|
||||
setDurataMin();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gestione del selettore rapido dell'intervallo temporale...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// verifico cosa sia cambiato ed imposto date...
|
||||
datario _datario = new datario();
|
||||
switch (DropDownList1.SelectedValue)
|
||||
{
|
||||
case "oggi":
|
||||
_intervallo = _datario.giornata(DateTime.Now);
|
||||
break;
|
||||
case "ieri":
|
||||
_intervallo = _datario.giornata(DateTime.Now.AddDays(-1));
|
||||
break;
|
||||
case "ultimi 7gg":
|
||||
_intervallo = _datario.ultimiGiorni(DateTime.Now, 7);
|
||||
break;
|
||||
case "questa settimana":
|
||||
_intervallo = _datario.questaSett(DateTime.Now);
|
||||
break;
|
||||
case "ultimi 30gg":
|
||||
_intervallo = _datario.ultimiGiorni(DateTime.Now, 30);
|
||||
break;
|
||||
case "questo mese":
|
||||
_intervallo = _datario.questoMese(DateTime.Now);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if ((intervalloAnalisi.inizio != _intervallo.inizio) || (intervalloAnalisi.fine != _intervallo.fine))
|
||||
{
|
||||
verificaCoerenzaDate();
|
||||
aggiornaDateMostrate(false);
|
||||
// mostro btn update
|
||||
btnUpdate.Visible = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua update delle date mostrate da intervallo analisi (ed eventualmente riporta update...)
|
||||
/// </summary>
|
||||
/// <param name="doReportUpdate"></param>
|
||||
private void aggiornaDateMostrate(bool doReportUpdate)
|
||||
{
|
||||
scriviDate();
|
||||
if (doReportUpdate)
|
||||
{
|
||||
reportUpdate();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// scrive nuove date in controllo
|
||||
/// </summary>
|
||||
private void scriviDate()
|
||||
{
|
||||
// se intervallo non è valorizzato leggo da sessione...
|
||||
if (!_intervallo.isValid)
|
||||
{
|
||||
_intervallo = intervalloAnalisi;
|
||||
}
|
||||
txtInizio.Text = _intervallo.inizio.ToShortDateString();
|
||||
ddlOraInizio.SelectedValue = _intervallo.inizio.Hour.ToString("00");
|
||||
txtFine.Text = _intervallo.fine.ToShortDateString();
|
||||
ddlOraFine.SelectedValue = _intervallo.fine.Hour.ToString("00");
|
||||
}
|
||||
|
||||
private void setIntervallo()
|
||||
{
|
||||
intervalloDate _intervallo;
|
||||
try
|
||||
{
|
||||
_intervallo = (intervalloDate)memLayer.ML.objSessionObj("_intervallo");
|
||||
}
|
||||
catch
|
||||
{
|
||||
_intervallo = new intervalloDate();
|
||||
_intervallo.inizio = DateTime.Now.AddDays(-7);
|
||||
_intervallo.fine = DateTime.Now;
|
||||
memLayer.ML.setSessionVal("_intervallo", _intervallo);
|
||||
memLayer.ML.setSessionVal("_inizio", _intervallo.inizio);
|
||||
memLayer.ML.setSessionVal("_fine", _intervallo.fine);
|
||||
}
|
||||
scriviDate();
|
||||
}
|
||||
private void setDurataMin()
|
||||
{
|
||||
int _durataMin;
|
||||
if (memLayer.ML.isInSessionObject("_durataMin"))
|
||||
{
|
||||
_durataMin = memLayer.ML.IntSessionObj("_durataMin");
|
||||
}
|
||||
else
|
||||
{
|
||||
_durataMin = 0;
|
||||
memLayer.ML.setSessionVal("_durataMin", _durataMin);
|
||||
}
|
||||
txtDurataMin.Text = _durataMin.ToString();
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
txtInizio.ToolTip = "inizio periodo di riferimento per i dati mostrati";
|
||||
txtFine.ToolTip = "fine periodo di riferimento per i dati mostrati";
|
||||
lblDurataMin.Text = "Visualizza eventi con durata superiore a";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void aggiornaPeriodo()
|
||||
{
|
||||
_intervallo = new intervalloDate();
|
||||
// calcolo tempi arrotondati
|
||||
int oraInizio = Convert.ToInt32(ddlOraInizio.SelectedValue);
|
||||
int oraFine = Convert.ToInt32(ddlOraFine.SelectedValue);
|
||||
_intervallo.inizio = Convert.ToDateTime(txtInizio.Text).AddHours(oraInizio);
|
||||
_intervallo.fine = Convert.ToDateTime(txtFine.Text).AddHours(oraFine);
|
||||
verificaCoerenzaDate();
|
||||
int _durataMin;
|
||||
_durataMin = Convert.ToInt32(txtDurataMin.Text);
|
||||
memLayer.ML.setSessionVal("_durataMin", _durataMin);
|
||||
reportUpdate();
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica che le date dell'intervallo siano coerenti (inizio < fine)
|
||||
/// </summary>
|
||||
private void verificaCoerenzaDate()
|
||||
{
|
||||
// controllo date siano coerenti (fine > inizio)...
|
||||
if (_intervallo.inizio >= _intervallo.fine)
|
||||
{
|
||||
// controllo non siano date successive ad oggi...
|
||||
if (_intervallo.fine > DateTime.Now)
|
||||
{
|
||||
_intervallo.fine = DateTime.Now;
|
||||
}
|
||||
_intervallo.inizio = _intervallo.fine.AddDays(-1);
|
||||
}
|
||||
//intervalloAnalisi = _intervallo;
|
||||
aggiornaDateMostrate(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// evento cambio testo data inizio
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtInizio_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// imposto il selettore a discesa...
|
||||
setPeriodoFree();
|
||||
// mostro btn update
|
||||
btnUpdate.Visible = true;
|
||||
}
|
||||
/// <summary>
|
||||
/// evento cambio testo data fine
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtFine_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// imposto il selettore a discesa...
|
||||
setPeriodoFree();
|
||||
// mostro btn update
|
||||
btnUpdate.Visible = true;
|
||||
}
|
||||
/// <summary>
|
||||
/// in questo caso faccio udpate periodo mostrato
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
aggiornaPeriodo();
|
||||
// nascondo btn update
|
||||
btnUpdate.Visible = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// riporta aggiornamento a controller
|
||||
/// </summary>
|
||||
protected void reportUpdate()
|
||||
{
|
||||
intervalloAnalisi = _intervallo;
|
||||
// alzo l'evento d update/inserimento e ricarico cache...
|
||||
if (eh_doUpdate != null)
|
||||
{
|
||||
eh_doUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
public intervalloDate intervalloAnalisi
|
||||
{
|
||||
get
|
||||
{
|
||||
return (intervalloDate)memLayer.ML.objSessionObj("_intervallo");
|
||||
}
|
||||
set
|
||||
{
|
||||
intervalloDate interv = value;
|
||||
memLayer.ML.setSessionVal("_intervallo", interv);
|
||||
memLayer.ML.setSessionVal("_inizio", interv.inizio);
|
||||
memLayer.ML.setSessionVal("_fine", interv.fine);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua update
|
||||
/// </summary>
|
||||
/// <param name="doReportUpdate"></param>
|
||||
public void doUpdate(bool doReportUpdate)
|
||||
{
|
||||
aggiornaDateMostrate(doReportUpdate);
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta periodo libero di selezione
|
||||
/// </summary>
|
||||
public void setPeriodoFree()
|
||||
{
|
||||
DropDownList1.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_doUpdate;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// effettua uno zoom 2 X sulle date attuali
|
||||
/// </summary>
|
||||
public void dateZoom()
|
||||
{
|
||||
// calcolo zoom 2X
|
||||
double intervMinutiOrig = intervalloAnalisi.fine.Subtract(intervalloAnalisi.inizio).TotalMinutes;
|
||||
// leggo data in cui lo zoom era centrato...
|
||||
DateTime centroZoom = Convert.ToDateTime(memLayer.ML.objSessionObj("zoomCenter"));
|
||||
// calcolo posizione relativa zoom...
|
||||
double posizioneZoom = centroZoom.Subtract(intervalloAnalisi.inizio).TotalMinutes / intervMinutiOrig;
|
||||
// init!
|
||||
_intervallo = intervalloAnalisi;
|
||||
// verifico che azione fare
|
||||
if (posizioneZoom < 0.25) // se è nel 1/4 lascio zoom inalterato e "vado a sx" di 1/2 intervallo
|
||||
{
|
||||
if (intervMinutiOrig > 120)
|
||||
{
|
||||
_intervallo.inizio = _intervallo.inizio.AddMinutes(-intervMinutiOrig / 2.0);
|
||||
_intervallo.fine = _intervallo.fine.AddMinutes(-intervMinutiOrig / 2.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
_intervallo.inizio = _intervallo.inizio.AddMinutes(-60);
|
||||
_intervallo.fine = _intervallo.fine.AddMinutes(-60);
|
||||
}
|
||||
}
|
||||
else if (posizioneZoom > 0.75) // se è nel 3/4 lascio zoom inalterato e "vado a dx"
|
||||
{
|
||||
// mi imposto al max tra spostamento di 1/2 e l'ultimo dato disponibile...
|
||||
if (intervMinutiOrig > 120)
|
||||
{
|
||||
_intervallo.fine = _intervallo.fine.AddMinutes(intervMinutiOrig / 2.0);
|
||||
if (_intervallo.fine > DateTime.Now)
|
||||
{
|
||||
_intervallo.fine = DateTime.Now;
|
||||
}
|
||||
_intervallo.inizio = _intervallo.fine.AddMinutes(-intervMinutiOrig);
|
||||
}
|
||||
else
|
||||
{
|
||||
_intervallo.inizio = _intervallo.inizio.AddMinutes(60);
|
||||
_intervallo.fine = _intervallo.fine.AddMinutes(60);
|
||||
}
|
||||
}
|
||||
else // zoom!!!
|
||||
{
|
||||
if (intervMinutiOrig > 120)
|
||||
{
|
||||
_intervallo.inizio = _intervallo.inizio.AddMinutes(intervMinutiOrig / 4.0);
|
||||
_intervallo.fine = _intervallo.fine.AddMinutes(-intervMinutiOrig / 4.0);
|
||||
}
|
||||
else // 1 ora di zoom!
|
||||
{
|
||||
_intervallo.inizio = _intervallo.inizio.Date.AddHours(_intervallo.inizio.TimeOfDay.Hours);
|
||||
_intervallo.fine = _intervallo.inizio.AddHours(1);
|
||||
}
|
||||
}
|
||||
// arrotondo all'ora...
|
||||
_intervallo.inizio = _intervallo.inizio.Date.AddHours(_intervallo.inizio.TimeOfDay.Hours);
|
||||
_intervallo.fine = _intervallo.fine.Date.AddHours(_intervallo.fine.TimeOfDay.Hours);
|
||||
// aggiorno in sessione
|
||||
intervalloAnalisi = _intervallo;
|
||||
Response.Redirect("~/DettaglioMacchina.aspx");
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_periodoAnalisi {
|
||||
|
||||
/// <summary>
|
||||
/// txtInizio 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.TextBox txtInizio;
|
||||
|
||||
/// <summary>
|
||||
/// ddlOraInizio 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 ddlOraInizio;
|
||||
|
||||
/// <summary>
|
||||
/// CalendarExtender1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.CalendarExtender CalendarExtender1;
|
||||
|
||||
/// <summary>
|
||||
/// txtFine 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.TextBox txtFine;
|
||||
|
||||
/// <summary>
|
||||
/// ddlOraFine 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 ddlOraFine;
|
||||
|
||||
/// <summary>
|
||||
/// CalendarExtender2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.CalendarExtender CalendarExtender2;
|
||||
|
||||
/// <summary>
|
||||
/// DropDownList1 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 DropDownList1;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdate 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.Button btnUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// lblDurataMin 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.Label lblDurataMin;
|
||||
|
||||
/// <summary>
|
||||
/// txtDurataMin 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.TextBox txtDurataMin;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_realtimeClock.ascx.cs"
|
||||
Inherits="MoonPro.WebUserControls.mod_realtimeClock" %>
|
||||
<div id="container">
|
||||
|
||||
<script src="/scripts/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<script src="/scripts/jintervals.js"></script>
|
||||
|
||||
<script src="/scripts/jquery.stopwatch.js"></script>
|
||||
|
||||
<div id="main">
|
||||
<div class="example">
|
||||
<div id="TimerClock" class="demo">
|
||||
0m, 0s</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/jscript">
|
||||
$(document).ready(function() {
|
||||
$('#TimerClock').stopwatch({ format: '{M}m, {s}s' }).stopwatch('start');
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_realtimeClock : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_realtimeClock {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_righePag.ascx.cs" Inherits="MoonPro.WebUserControls.mod_righePag" %>
|
||||
<div class="floDx">
|
||||
<asp:Label runat="server" ID="lblNumRighe" CssClass="didascalia"><%: traduci("righePerPag") %></asp:Label>
|
||||
<asp:TextBox ID="txtNumRighe" runat="server" AutoPostBack="True" OnTextChanged="txtNumRighe_TextChanged" Width="2em" />
|
||||
</div>
|
||||
@@ -0,0 +1,91 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_righePag : SteamWare.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// indicato (nuovo) numero righe x pagina
|
||||
/// </summary>
|
||||
public event EventHandler eh_newNum;
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
numRowReq = numRowPag;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno controllo paginazione...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtNumRighe_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo num righe...
|
||||
numRowPag = numRowReq;
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_newNum != null)
|
||||
{
|
||||
eh_newNum(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// numero righe per pagina (in sessione)
|
||||
/// </summary>
|
||||
public int numRowPag
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 10;
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj("numRowPag" + uid);
|
||||
}
|
||||
catch
|
||||
{
|
||||
answ = 10;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("numRowPag" + uid, value);
|
||||
numRowReq = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// numero righe gridview da mostrare legato a controllo textbox
|
||||
/// </summary>
|
||||
protected int numRowReq
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = numRowPag;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNumRighe.Text.Trim());
|
||||
if (answ == 0)
|
||||
{
|
||||
answ = numRowPag;
|
||||
txtNumRighe.Text = answ.ToString();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtNumRighe.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_righePag {
|
||||
|
||||
/// <summary>
|
||||
/// lblNumRighe 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.Label lblNumRighe;
|
||||
|
||||
/// <summary>
|
||||
/// txtNumRighe 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.TextBox txtNumRighe;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_schermataMacchina.ascx.cs"
|
||||
Inherits="MoonPro.WebUserControls.mod_schermataMacchina" %>
|
||||
<asp:Panel runat="server" ID="pnlSfondo">
|
||||
<h2>
|
||||
<asp:Label runat="server" ID="lblNomeMacchina" />
|
||||
</h2>
|
||||
</asp:Panel>
|
||||
qui devo mostrare la schermata relativa alla amcchina...
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_schermataMacchina : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
lblNomeMacchina.Text = "Nome macchina";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_schermataMacchina {
|
||||
|
||||
/// <summary>
|
||||
/// pnlSfondo 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.Panel pnlSfondo;
|
||||
|
||||
/// <summary>
|
||||
/// lblNomeMacchina 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.Label lblNomeMacchina;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_semaforo.ascx.cs"
|
||||
Inherits="MoonPro.WebUserControls.mod_semaforo" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Src="mod_realtimeClock.ascx" TagName="mod_realtimeClock" TagPrefix="uc1" %>
|
||||
<asp:Panel ID="pnlMacchina" runat="server" CssClass="statoMacchine">
|
||||
<div style="text-align: center;">
|
||||
<div class="testataSemaforo">
|
||||
<div style="float: left;" width="30%">
|
||||
<asp:Label runat="server" ID="lblArt" Text="Art." />
|
||||
<br />
|
||||
<asp:Label ID="lblCodArticolo" runat="server" Font-Size="20pt" />
|
||||
</div>
|
||||
<div style="float: right;" width="30%"">
|
||||
<asp:Label runat="server" ID="lblOperatore" Text="Oper." />
|
||||
<br />
|
||||
<asp:Label ID="lblOper" runat="server" Font-Size="20pt" />
|
||||
</div>
|
||||
<div>
|
||||
<b>
|
||||
<asp:Label ID="lblMacchina" runat="server" Font-Size="28pt" />
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearDiv">
|
||||
</div>
|
||||
<div class="blocchiSemaforoMain">
|
||||
<b>
|
||||
<asp:Label ID="lblStato" runat="server" Font-Size="52pt" /></b>
|
||||
</div>
|
||||
<div class="blocchiSemaforo">
|
||||
<div style="float: left;">
|
||||
<asp:Label ID="lblDurata" runat="server" /><br />
|
||||
<asp:Label ID="valDurata" runat="server" Font-Size="18pt" />
|
||||
<br />
|
||||
<br />
|
||||
<asp:Label ID="lblCausale" runat="server" /><br />
|
||||
<asp:Label ID="valCausale" runat="server" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:Label ID="lblDurataCiclo" runat="server" />
|
||||
<uc1:mod_realtimeClock ID="mod_realtimeClock1" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="imgResoconto">
|
||||
<asp:Image runat="server" ID="imgThumb" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
@@ -0,0 +1,205 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_semaforo : System.Web.UI.UserControl
|
||||
{
|
||||
|
||||
#region area protected / private
|
||||
|
||||
/// <summary>
|
||||
/// seriale associato alla macchina da controllare
|
||||
/// </summary>
|
||||
protected string _IdxMacchina;
|
||||
/// <summary>
|
||||
/// posizione macchina nella tabella
|
||||
/// </summary>
|
||||
protected string _locazione;
|
||||
protected resoconti _resoconti;
|
||||
|
||||
protected DS_applicazione.MacchineDataTable tabMacchine;
|
||||
protected DS_applicazione.StatoMacchineDataTable tabStatoMacchine;
|
||||
protected DS_applicazione.AnagraficaStatiDataTable tabAnagStati;
|
||||
protected DS_applicazione.KeepAliveDataTable tabKeepAlive;
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
updateMe();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
/// <summary>
|
||||
/// sistema il testo
|
||||
/// </summary>
|
||||
private void updateText()
|
||||
{
|
||||
if (_IdxMacchina != "nd")
|
||||
{
|
||||
// labels
|
||||
lblDurata.Text = traduci("DurataStato");
|
||||
// valori
|
||||
lblMacchina.Text = tabMacchine.FindByIdxMacchina(IdxMacchina).Nome;
|
||||
lblCodArticolo.Text = tabStatoMacchine.FindByIdxMacchina(IdxMacchina).CodArticolo;
|
||||
int matrOper = tabStatoMacchine.FindByIdxMacchina(IdxMacchina).MatrOpr;
|
||||
DS_applicazione.AnagraficaOperatoriRow rigaOper = DataLayer.obj.taOp.getByMatrOpr(matrOper)[0];
|
||||
lblOper.Text = string.Format("{0} {1}", rigaOper.Cognome, rigaOper.Nome);
|
||||
int idxStato = 0;
|
||||
int oreTot = 0;
|
||||
float minuti = 0;
|
||||
try
|
||||
{
|
||||
MapoDb.DS_ProdTempi.stp_repDonati_getLastStatoDurataMacchinaRow rigaStato = DataLayer.obj.taDatiStatoMacch.GetData(IdxMacchina, 0.1)[0];
|
||||
idxStato = rigaStato.idxStato;
|
||||
oreTot = Convert.ToInt32(Math.Floor(rigaStato.Minuti / 60));
|
||||
minuti = (float)rigaStato.Minuti - 60 * oreTot;
|
||||
}
|
||||
catch
|
||||
{
|
||||
idxStato = tabStatoMacchine.FindByIdxMacchina(IdxMacchina).IdxStato;
|
||||
DateTime inizioStato = tabStatoMacchine.FindByIdxMacchina(IdxMacchina).InizioStato;
|
||||
DateTime ora = DateTime.Now;
|
||||
TimeSpan durata = ora.Subtract(inizioStato);
|
||||
oreTot = durata.Days * 24 + durata.Hours;
|
||||
minuti = durata.Minutes;
|
||||
}
|
||||
// aggiorno stato e durata
|
||||
lblStato.Text = tabAnagStati.FindByIdxStato(idxStato).Descrizione;
|
||||
valDurata.Text = string.Format("{0}h {1}min", oreTot, minuti);
|
||||
|
||||
// solo se in stato NON di run...
|
||||
if (idxStato != 13)
|
||||
{
|
||||
lblCausale.Text = traduci("Causale");
|
||||
valCausale.Text = tabStatoMacchine.FindByIdxMacchina(IdxMacchina).Value;
|
||||
}
|
||||
lblDurataCiclo.Text = traduci("UltimoEvento");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna il layout grafico
|
||||
/// </summary>
|
||||
private void updateLayout()
|
||||
{
|
||||
if (_IdxMacchina != "nd")
|
||||
{
|
||||
string filtro = string.Format("IdxMacchina = '{0}'", _IdxMacchina);
|
||||
int stato = ((DS_applicazione.StatoMacchineRow)tabStatoMacchine.Select(filtro)[0]).IdxStato;
|
||||
// in base allo stato recupero il colore...
|
||||
string codColore = ((DS_applicazione.AnagraficaStatiRow)tabAnagStati.FindByIdxStato(stato)).Semaforo;
|
||||
pnlMacchina.CssClass = codColore;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// metto a posto l'immagine
|
||||
/// </summary>
|
||||
protected void updateImg()
|
||||
{
|
||||
string urlMacchina;
|
||||
if (_IdxMacchina != "nd")
|
||||
{
|
||||
urlMacchina = string.Format("~/images/macchine/thumb_{0}", _resoconti.urlMacchina(IdxMacchina));
|
||||
if (urlMacchina == "thumb_")
|
||||
{
|
||||
urlMacchina = "~/images/empty.png";
|
||||
imgThumb.ImageUrl = urlMacchina;
|
||||
}
|
||||
else
|
||||
{
|
||||
imgThumb.ImageUrl = urlMacchina;
|
||||
imgThumb.ToolTip = _resoconti.nomeMacchina(IdxMacchina);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
urlMacchina = "~/images/empty.png";
|
||||
imgThumb.ImageUrl = urlMacchina;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// recupera i dati
|
||||
/// </summary>
|
||||
private void retrieveData()
|
||||
{
|
||||
_resoconti = new resoconti();
|
||||
// popolazione tabelle
|
||||
tabMacchine = MapoDb.DataLayer.obj.taMacchine.GetData();
|
||||
tabStatoMacchine = MapoDb.DataLayer.obj.taStatoMacchine.GetData();
|
||||
tabAnagStati = MapoDb.DataLayer.obj.taAnagStati.GetData();
|
||||
tabKeepAlive = MapoDb.DataLayer.obj.taKeepAlive.GetData();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// Idx della macchina controllata
|
||||
/// </summary>
|
||||
public string IdxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return _IdxMacchina;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_resoconti == null)
|
||||
{
|
||||
_resoconti = new resoconti();
|
||||
}
|
||||
_IdxMacchina = value;
|
||||
_locazione = _resoconti.locazioneDaIdx(_IdxMacchina);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// stringa locazione macchina in tabella
|
||||
/// </summary>
|
||||
public string locazione
|
||||
{
|
||||
get
|
||||
{
|
||||
return _locazione;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_resoconti == null)
|
||||
{
|
||||
_resoconti = new resoconti();
|
||||
}
|
||||
_locazione = value;
|
||||
try
|
||||
{
|
||||
_IdxMacchina = _resoconti.idxDaLocazione(_locazione);
|
||||
}
|
||||
catch
|
||||
{
|
||||
_IdxMacchina = "nd";
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna controllo
|
||||
/// </summary>
|
||||
public void updateMe()
|
||||
{
|
||||
// effettua update visualizzazione
|
||||
retrieveData();
|
||||
updateLayout();
|
||||
updateText();
|
||||
updateImg();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_semaforo {
|
||||
|
||||
/// <summary>
|
||||
/// pnlMacchina 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.Panel pnlMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// lblArt 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.Label lblArt;
|
||||
|
||||
/// <summary>
|
||||
/// lblCodArticolo 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.Label lblCodArticolo;
|
||||
|
||||
/// <summary>
|
||||
/// lblOperatore 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.Label lblOperatore;
|
||||
|
||||
/// <summary>
|
||||
/// lblOper 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.Label lblOper;
|
||||
|
||||
/// <summary>
|
||||
/// lblMacchina 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.Label lblMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// lblStato 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.Label lblStato;
|
||||
|
||||
/// <summary>
|
||||
/// lblDurata 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.Label lblDurata;
|
||||
|
||||
/// <summary>
|
||||
/// valDurata 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.Label valDurata;
|
||||
|
||||
/// <summary>
|
||||
/// lblCausale 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.Label lblCausale;
|
||||
|
||||
/// <summary>
|
||||
/// valCausale 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.Label valCausale;
|
||||
|
||||
/// <summary>
|
||||
/// lblDurataCiclo 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.Label lblDurataCiclo;
|
||||
|
||||
/// <summary>
|
||||
/// mod_realtimeClock1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::MoonPro.WebUserControls.mod_realtimeClock mod_realtimeClock1;
|
||||
|
||||
/// <summary>
|
||||
/// imgThumb 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.Image imgThumb;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="MoonPro.WebUserControls.mod_sequencerStati"
|
||||
CodeBehind="mod_sequencerStati.ascx.cs" %>
|
||||
<asp:Chart ID="Chart1" runat="server" ImageLocation="~/WebCharts/Seq_#SEQ(5000,10)" RenderType="ImageTag"
|
||||
ImageStorageMode="UseImageLocation" SuppressExceptions="True" OnClick="Chart1_Click" Height="50">
|
||||
<Series>
|
||||
<asp:Series Name="SeqS">
|
||||
</asp:Series>
|
||||
<asp:Series Name="SeqV">
|
||||
</asp:Series>
|
||||
<asp:Series Name="SeqG">
|
||||
</asp:Series>
|
||||
<asp:Series Name="SeqB">
|
||||
</asp:Series>
|
||||
<asp:Series Name="SeqR">
|
||||
</asp:Series>
|
||||
</Series>
|
||||
<ChartAreas>
|
||||
<asp:ChartArea Name="Sequencer">
|
||||
<AxisX LineWidth="0" IsMarginVisible="False">
|
||||
</AxisX>
|
||||
<Position Height="100" Width="100" X="0" Y="0" />
|
||||
</asp:ChartArea>
|
||||
</ChartAreas>
|
||||
</asp:Chart>
|
||||
@@ -0,0 +1,523 @@
|
||||
using MapoDb;
|
||||
using Newtonsoft.Json;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_sequencerStati : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// dati x grafico sequencer
|
||||
/// </summary>
|
||||
public objSequencer datiSequencer
|
||||
{
|
||||
get
|
||||
{
|
||||
return _grafico;
|
||||
}
|
||||
set
|
||||
{
|
||||
_grafico = value;
|
||||
}
|
||||
}
|
||||
|
||||
public resoconti _resoconti;
|
||||
protected objSequencer _grafico;
|
||||
protected double _min2plot = 0.0;
|
||||
protected string _titolo = "Sequencer";
|
||||
protected int _larghezza = 100;
|
||||
protected int _timeSplits = 10;
|
||||
/// <summary>
|
||||
/// totale in minuti da plottare
|
||||
/// </summary>
|
||||
protected double totale = 1;
|
||||
/// <summary>
|
||||
/// numero dei segmenti del grafico
|
||||
/// </summary>
|
||||
public int numSplit { get; set; }
|
||||
protected double _minVerde = 0.5;
|
||||
protected double _minRosso = 0.5;
|
||||
protected double _minSpento = 0.5;
|
||||
/// <summary>
|
||||
/// altezza max grafico
|
||||
/// </summary>
|
||||
public int graphHeight { get; set; }
|
||||
/// <summary>
|
||||
/// identificativo
|
||||
/// </summary>
|
||||
public string identificativo { get; set; }
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// disegna la tabella
|
||||
/// </summary>
|
||||
protected void plottaGrafico()
|
||||
{
|
||||
// a seconda del numero di eventi da plottare decido la procedura...
|
||||
DataLayer_generic.serieDatiDataTable dati = _grafico.serieDati;
|
||||
try
|
||||
{
|
||||
// è la somma dei minuti totali dall'inizio alla fine...
|
||||
totale = _grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio).TotalMinutes;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
int numCelle = dati.Rows.Count;
|
||||
if (numCelle <= numSplit) // se ho eventi <= _num split....
|
||||
{
|
||||
plottaDettaglio(dati);
|
||||
}
|
||||
else // altrimenti raggruppo!
|
||||
{
|
||||
plottaGruppi(dati);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// popola il sequencer degli stati riportando tutti i singoli valori
|
||||
/// </summary>
|
||||
/// <param name="dati"></param>
|
||||
/// <returns></returns>
|
||||
private void plottaDettaglio(DataLayer_generic.serieDatiDataTable dati)
|
||||
{
|
||||
// nuovo plotting
|
||||
Chart1.Width = larghezza;
|
||||
Chart1.AntiAliasing = AntiAliasingStyles.All;
|
||||
Chart1.Height = graphHeight;
|
||||
// definizione intervallo asse Y (che qui è anche asse X...)
|
||||
Chart1.ChartAreas["Sequencer"].AxisY.Minimum = datiSequencer.intervallo.inizio.ToOADate();
|
||||
Chart1.ChartAreas["Sequencer"].AxisY.Maximum = datiSequencer.intervallo.fine.ToOADate();
|
||||
//Chart1.ChartAreas["Sequencer"].AxisY.IntervalType = DateTimeIntervalType.Auto;
|
||||
Chart1.ChartAreas["Sequencer"].AxisY.LabelAutoFitStyle = LabelAutoFitStyles.None;
|
||||
LabelStyle lbst = new LabelStyle();
|
||||
lbst.Format = "dd/MM HH:mm";
|
||||
lbst.Font = new System.Drawing.Font("Arial", 7.5f);
|
||||
Chart1.ChartAreas["Sequencer"].AxisY.LabelStyle = lbst;
|
||||
|
||||
// definizioni x chart area sequencer (tipo valori e nascondere asse)
|
||||
Chart1.Series["SeqV"].XValueType = ChartValueType.Int32;
|
||||
Chart1.Series["SeqV"].YValueType = ChartValueType.DateTime;
|
||||
Chart1.ChartAreas["Sequencer"].AxisX.Enabled = AxisEnabled.False;
|
||||
// per impostare grafici allineati
|
||||
Chart1.Series["SeqV"]["DrawSideBySide"] = "false";
|
||||
// colori e stile 3D
|
||||
Chart1.Series["SeqV"].Color = System.Drawing.Color.LimeGreen;
|
||||
Chart1.Series["SeqV"]["DrawingStyle"] = "Cylinder";
|
||||
Chart1.Series["SeqR"].Color = System.Drawing.Color.OrangeRed;
|
||||
Chart1.Series["SeqR"]["DrawingStyle"] = "Cylinder";
|
||||
Chart1.Series["SeqG"].Color = System.Drawing.Color.Yellow;
|
||||
Chart1.Series["SeqG"]["DrawingStyle"] = "Cylinder";
|
||||
Chart1.Series["SeqB"].Color = System.Drawing.Color.Blue;
|
||||
Chart1.Series["SeqB"]["DrawingStyle"] = "Cylinder";
|
||||
Chart1.Series["SeqS"].Color = System.Drawing.Color.Gray;
|
||||
Chart1.Series["SeqS"]["DrawingStyle"] = "Cylinder";
|
||||
// imposto tipo grafico
|
||||
Chart1.Series["SeqV"].ChartType = SeriesChartType.RangeBar;
|
||||
Chart1.Series["SeqR"].ChartType = SeriesChartType.RangeBar;
|
||||
Chart1.Series["SeqG"].ChartType = SeriesChartType.RangeBar;
|
||||
Chart1.Series["SeqB"].ChartType = SeriesChartType.RangeBar;
|
||||
Chart1.Series["SeqS"].ChartType = SeriesChartType.RangeBar;
|
||||
// impostazione larghezza relativa grafico
|
||||
Chart1.Series["SeqV"]["PointWidth"] = "2.0";
|
||||
Chart1.Series["SeqR"]["PointWidth"] = "2.0";
|
||||
Chart1.Series["SeqG"]["PointWidth"] = "2.0";
|
||||
Chart1.Series["SeqB"]["PointWidth"] = "2.0";
|
||||
Chart1.Series["SeqS"]["PointWidth"] = "2.0";
|
||||
|
||||
int tipo = 1;
|
||||
DateTime inizio, fine;
|
||||
double valore = 0;
|
||||
//DataLayer_generic.serieDatiRow rigaPrec = (DataLayer_generic.serieDatiRow)datiSequencer.serieDati[0];
|
||||
//foreach (DataLayer_generic.serieDatiRow riga in datiSequencer.serieDati)
|
||||
DataLayer_generic.serieDatiRow rigaPrec = dati[0];
|
||||
string codV = memLayer.ML.CRS("codV");
|
||||
string codG = memLayer.ML.CRS("codG");
|
||||
string codR = memLayer.ML.CRS("codR");
|
||||
string codB = memLayer.ML.CRS("codB");
|
||||
string codS = memLayer.ML.CRS("codS");
|
||||
foreach (DataLayer_generic.serieDatiRow riga in dati)
|
||||
{
|
||||
if (riga.valore > 0)
|
||||
{
|
||||
if ((rigaPrec.colore == riga.colore) && (rigaPrec.label == riga.label))
|
||||
{
|
||||
valore += riga.valore;
|
||||
}
|
||||
else if (valore > 0)
|
||||
{
|
||||
inizio = rigaPrec.timeData;
|
||||
fine = rigaPrec.timeData.AddMinutes(valore);
|
||||
accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codB, codS);
|
||||
// reset valore e colore...
|
||||
valore = riga.valore;
|
||||
rigaPrec = riga;
|
||||
}
|
||||
else
|
||||
{
|
||||
valore = riga.valore;
|
||||
rigaPrec = riga;
|
||||
}
|
||||
}
|
||||
}
|
||||
// aggiungo la riga precedente eventualmente non finita...
|
||||
inizio = rigaPrec.timeData;
|
||||
fine = rigaPrec.timeData.AddMinutes(rigaPrec.valore);
|
||||
accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codB, codS);
|
||||
// aggiungo ultimo dato che è stato escluso
|
||||
rigaPrec = dati[dati.Rows.Count - 1];
|
||||
inizio = rigaPrec.timeData;
|
||||
fine = rigaPrec.timeData.AddMinutes(rigaPrec.valore);
|
||||
accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codB, codS);
|
||||
}
|
||||
/// <summary>
|
||||
/// accoda i dati alla serie corretta
|
||||
/// </summary>
|
||||
/// <param name="tipo"></param>
|
||||
/// <param name="inizio"></param>
|
||||
/// <param name="fine"></param>
|
||||
/// <param name="rigaPrec"></param>
|
||||
/// <param name="codV"></param>
|
||||
/// <param name="codG"></param>
|
||||
/// <param name="codR"></param>
|
||||
/// <param name="codB"></param>
|
||||
/// <param name="codS"></param>
|
||||
private void accodaDati(ref int tipo, ref DateTime inizio, ref DateTime fine, DataLayer_generic.serieDatiRow rigaPrec, string codV, string codG, string codR, string codB, string codS)
|
||||
{
|
||||
switch (rigaPrec.colore)
|
||||
{
|
||||
case "sVe":
|
||||
tipo = 1;
|
||||
Chart1.Series["SeqV"].Points.AddXY(tipo, inizio, fine);
|
||||
// aggiungo tooltip
|
||||
Chart1.Series["SeqV"].Points[Chart1.Series["SeqV"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codV);
|
||||
Chart1.Series["SeqV"].Points[Chart1.Series["SeqV"].Points.Count - 1].PostBackValue = inizio.ToString();
|
||||
break;
|
||||
case "sGi":
|
||||
tipo = 1;
|
||||
Chart1.Series["SeqG"].Points.AddXY(tipo, inizio, fine);
|
||||
// aggiungo tooltip
|
||||
Chart1.Series["SeqG"].Points[Chart1.Series["SeqG"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codG);
|
||||
Chart1.Series["SeqG"].Points[Chart1.Series["SeqG"].Points.Count - 1].PostBackValue = inizio.ToString();
|
||||
break;
|
||||
case "sRo":
|
||||
tipo = 1;
|
||||
Chart1.Series["SeqR"].Points.AddXY(tipo, inizio, fine);
|
||||
// aggiungo tooltip
|
||||
Chart1.Series["SeqR"].Points[Chart1.Series["SeqR"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codR);
|
||||
Chart1.Series["SeqR"].Points[Chart1.Series["SeqR"].Points.Count - 1].PostBackValue = inizio.ToString();
|
||||
break;
|
||||
case "sBl":
|
||||
tipo = 1;
|
||||
Chart1.Series["SeqB"].Points.AddXY(tipo, inizio, fine);
|
||||
// aggiungo tooltip
|
||||
Chart1.Series["SeqB"].Points[Chart1.Series["SeqB"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codR);
|
||||
Chart1.Series["SeqB"].Points[Chart1.Series["SeqB"].Points.Count - 1].PostBackValue = inizio.ToString();
|
||||
break;
|
||||
case "sGr":
|
||||
tipo = 1;
|
||||
Chart1.Series["SeqS"].Points.AddXY(tipo, inizio, fine);
|
||||
// aggiungo tooltip
|
||||
Chart1.Series["SeqS"].Points[Chart1.Series["SeqS"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codS);
|
||||
Chart1.Series["SeqS"].Points[Chart1.Series["SeqS"].Points.Count - 1].PostBackValue = inizio.ToString();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// intercetta richiesta di zoom e zoomma sul giorno in esame...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void lnkb_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lnk = (LinkButton)sender;
|
||||
// calcolo il giorno...
|
||||
memLayer.ML.setSessionVal("dataZoom", lnk.CommandArgument.ToString());
|
||||
if (eh_richiestaZoom != null)
|
||||
{
|
||||
eh_richiestaZoom(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// popola il sequencer degli stati raggruppando perché troppi valori
|
||||
/// </summary>
|
||||
/// <param name="dati"></param>
|
||||
/// <returns></returns>
|
||||
private void plottaGruppi(DataLayer_generic.serieDatiDataTable dati)
|
||||
{
|
||||
DataLayer_generic.serieDatiDataTable datiGrouped = new DataLayer_generic.serieDatiDataTable();
|
||||
// verifico se ho i dati in cache REDIS...
|
||||
double numGG = _grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio).TotalDays;
|
||||
logger.lg.scriviLog(string.Format("Richiesta dati legacySeq GROUPED per {0} {1} gg", _grafico.idxMacchina, numGG));
|
||||
string rKey = DataLayer.mHash(string.Format("legacySeq:spl_{0}:mac_{1}_{2}_{3}", numSplit, _grafico.idxMacchina, _grafico.intervallo.inizio.ToString("yyyyMMdd_HHmmss"), _grafico.intervallo.fine.ToString("yyyyMMdd_HHmmss")).Replace(" ", "_"));
|
||||
bool needRecalc = true;
|
||||
string redJson = memLayer.ML.getRSV(rKey);
|
||||
// controllo se ho già in sessione un oggetto seq...
|
||||
if (redJson != null && redJson != "")
|
||||
{
|
||||
try
|
||||
{
|
||||
needRecalc = false;
|
||||
// deserializzo
|
||||
datiGrouped = JsonConvert.DeserializeObject<DataLayer_generic.serieDatiDataTable>(redJson);
|
||||
logger.lg.scriviLog("Recuperato " + rKey);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
if (needRecalc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("INIZIO calcolo dati per {0} {1}", _grafico.idxMacchina, rKey));
|
||||
TableRow r = new TableRow();
|
||||
double valMin = totale / numSplit;
|
||||
double valRigaCum = 0.0;
|
||||
double valR = 0.0;
|
||||
double valG = 0.0;
|
||||
double valV = 0.0;
|
||||
double valB = 0.0;
|
||||
double valS = 0.0;
|
||||
DateTime _t_0 = new DateTime(9999, 1, 1);
|
||||
string _mostCodArticolo = "";
|
||||
int _maxVal = 0;
|
||||
string colore;
|
||||
foreach (DataLayer_generic.serieDatiRow riga in dati)
|
||||
{
|
||||
// salvo prima data...
|
||||
if (riga.timeData < _t_0)
|
||||
{
|
||||
_t_0 = riga.timeData;
|
||||
}
|
||||
if (riga.valore > _maxVal)
|
||||
{
|
||||
_maxVal = Convert.ToInt32(riga.valore);
|
||||
_mostCodArticolo = riga.label;
|
||||
}
|
||||
valRigaCum = valRigaCum + riga.valore;
|
||||
// accumulo valori...
|
||||
switch (riga.colore)
|
||||
{
|
||||
case "sVe":
|
||||
valV = valV + riga.valore;
|
||||
break;
|
||||
case "sGi":
|
||||
valG = valG + riga.valore;
|
||||
break;
|
||||
case "sRo":
|
||||
valR = valR + riga.valore;
|
||||
break;
|
||||
case "sBl":
|
||||
valB = valB + riga.valore;
|
||||
break;
|
||||
case "sGr":
|
||||
valS = valS + riga.valore;
|
||||
break;
|
||||
}
|
||||
// se è maggiore plotto...
|
||||
if (valRigaCum >= valMin)
|
||||
{
|
||||
// determino il colore...
|
||||
if (valV / valRigaCum >= minVerde)
|
||||
{
|
||||
colore = "sVe";
|
||||
valV = 0.0;
|
||||
}
|
||||
else if (valR / valRigaCum >= minRosso)
|
||||
{
|
||||
colore = "sRo";
|
||||
valR = 0.0;
|
||||
}
|
||||
else if (valS / valRigaCum >= minSpento)
|
||||
{
|
||||
colore = "sGr";
|
||||
valS = 0.0;
|
||||
}
|
||||
else if (valB / valRigaCum >= minSpento)
|
||||
{
|
||||
colore = "sBl";
|
||||
valB = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
colore = "sGi";
|
||||
valG = 0.0;
|
||||
}
|
||||
// salvo riga dati
|
||||
datiGrouped.AddserieDatiRow(valRigaCum, colore, _mostCodArticolo, _t_0);
|
||||
// reset dei contatori...
|
||||
valRigaCum = 0.0;
|
||||
|
||||
_t_0 = new DateTime(9999, 1, 1);
|
||||
_mostCodArticolo = "";
|
||||
_maxVal = 0;
|
||||
}
|
||||
}
|
||||
//registro fine
|
||||
logger.lg.scriviLog(string.Format("FINE calcolo dati per {0} {1}", _grafico.idxMacchina, rKey));
|
||||
// salvo sequenza in REDIS...
|
||||
string rData = JsonConvert.SerializeObject(datiGrouped);
|
||||
// salvo in sessione l'oggetto... secondo durata impostata in web.config.. moltiplicata x numero gg...
|
||||
memLayer.ML.setRSV(rKey, rData, 60 * memLayer.ML.CRI("seqCacheDurMin") * (int)numGG);
|
||||
logger.lg.scriviLog(string.Format("Salvataggio in sessione {0} {1}", _grafico.idxMacchina, rKey));
|
||||
}
|
||||
plottaDettaglio(datiGrouped);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// restituisce true se ci sono dati...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected bool datiPresenti()
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
int numCelle = datiSequencer.serieDati.Rows.Count;
|
||||
answ = (numCelle > 0);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// valore minimo da plottare
|
||||
/// </summary>
|
||||
public double min2plot
|
||||
{
|
||||
get
|
||||
{
|
||||
return _min2plot;
|
||||
}
|
||||
set
|
||||
{
|
||||
_min2plot = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// titolo del grafico
|
||||
/// </summary>
|
||||
public string titolo
|
||||
{
|
||||
get
|
||||
{
|
||||
return _titolo;
|
||||
}
|
||||
set
|
||||
{
|
||||
_titolo = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// larghezza totale del grafico (forzo a zero come minimo...)
|
||||
/// </summary>
|
||||
public int larghezza
|
||||
{
|
||||
get
|
||||
{
|
||||
return _larghezza;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value > 0)
|
||||
{
|
||||
_larghezza = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
_larghezza = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// % minuma nel periodo per dire che sia verde
|
||||
/// </summary>
|
||||
public double minVerde
|
||||
{
|
||||
get
|
||||
{
|
||||
return _minVerde;
|
||||
}
|
||||
set
|
||||
{
|
||||
_minVerde = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// % minuma nel periodo per dire che sia rosso
|
||||
/// </summary>
|
||||
public double minRosso
|
||||
{
|
||||
get
|
||||
{
|
||||
return _minRosso;
|
||||
}
|
||||
set
|
||||
{
|
||||
_minRosso = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// % minuma nel periodo per dire che sia spento
|
||||
/// </summary>
|
||||
public double minSpento
|
||||
{
|
||||
get
|
||||
{
|
||||
return _minSpento;
|
||||
}
|
||||
set
|
||||
{
|
||||
_minSpento = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna il controllo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
if (datiPresenti())
|
||||
{
|
||||
plottaGrafico();
|
||||
}
|
||||
else
|
||||
{
|
||||
// non plotto
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// evento di richeista zoom sui dati
|
||||
/// </summary>
|
||||
public event EventHandler eh_richiestaZoom;
|
||||
/// <summary>
|
||||
/// evento click su sequencer: zoom 2X
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Chart1_Click(object sender, ImageMapEventArgs e)
|
||||
{
|
||||
// alzo evento
|
||||
if (eh_richiestaZoom != null)
|
||||
{
|
||||
ImageMapEventArgs evIM = e;
|
||||
// salvo in sessione
|
||||
memLayer.ML.setSessionVal("zoomCenter", e.PostBackValue);
|
||||
eh_richiestaZoom(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_sequencerStati {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo Chart1.
|
||||
/// </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.DataVisualization.Charting.Chart Chart1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_sequencerStatiJS.ascx.cs" Inherits="MoonPro.WebUserControls.mod_sequencerStatiJS" %>
|
||||
|
||||
<div id='tlArea_<%=UniqueID.Replace("$","_") %>'></div>
|
||||
<div id='tlGruppi_<%=UniqueID.Replace("$","_") %>'></div>
|
||||
<asp:HiddenField runat="server" ID="hfNumSplit" />
|
||||
<asp:HiddenField runat="server" ID="hfIdxMacc" />
|
||||
<asp:HiddenField runat="server" ID="hfDataFrom" />
|
||||
<asp:HiddenField runat="server" ID="hfDataTo" />
|
||||
|
||||
<div id="spinner" class="text-center">
|
||||
<h2>Caricamento Dati</h2>
|
||||
<i class="fa fa-refresh fa-pulse fa-3x fa-fw"></i>
|
||||
<p><i>Ricalcolo periodo</i></p>
|
||||
<%--<div class="row justify-content-md-center">
|
||||
<div class="col-6">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// vedere: http://visjs.org/docs/timeline/
|
||||
|
||||
//$('<%=hfDataFrom.ClientID %>').change(reloadData());
|
||||
//$('#<%=hfDataFrom.ClientID %>').change(reloadData());
|
||||
//$('<%=hfDataFrom.ClientID %>').change(reloadData_<%=UniqueID.Replace("$","_") %>());
|
||||
//$("#<%=hfDataFrom.ClientID %>").change(reloadData_<%=UniqueID.Replace("$","_") %>());
|
||||
//$('<%=hfIdxMacc.ClientID %>').change(reloadData_<%=UniqueID.Replace("$","_") %>());
|
||||
//$('<%=hfDataTo.ClientID %>').change(reloadData_<%=UniqueID.Replace("$","_") %>());
|
||||
|
||||
//$(document).ready(reloadData_<%=UniqueID.Replace("$","_") %>());
|
||||
//$('<%=hfIdxMacc.ClientID %>').change(reloadData_<%=UniqueID.Replace("$","_") %>());
|
||||
//$('<%=hfDataFrom.ClientID %>').change(reloadData_<%=UniqueID.Replace("$","_") %>());
|
||||
|
||||
//Sys.WebForms.PageRequestManager.getInstance().add_endRequest( reloadData_<%=UniqueID.Replace("$","_") %>() );
|
||||
|
||||
function pageLoad() {
|
||||
$(function () {
|
||||
$('#<%=hfDataFrom.ClientID %>').change(reloadData_<%=UniqueID.Replace("$","_") %>());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// (ri)caricamento dati
|
||||
function reloadData_<%=UniqueID.Replace("$","_") %>() {
|
||||
// recupero valori hidden...
|
||||
var numSplit = document.getElementById('<%=hfNumSplit.UniqueID.Replace("ctl00$","").Replace("$","_") %>').value;
|
||||
var idxMacc = document.getElementById('<%=hfIdxMacc.UniqueID.Replace("ctl00$","").Replace("$","_") %>').value;
|
||||
var dataFrom = document.getElementById('<%=hfDataFrom.UniqueID.Replace("ctl00$","").Replace("$","_") %>').value;
|
||||
var dataTo = document.getElementById('<%=hfDataTo.UniqueID.Replace("ctl00$","").Replace("$","_") %>').value;
|
||||
if (idxMacc != null && dataFrom != null && dataTo != null && dataFrom != '' && dataTo != '') {
|
||||
// load e draw timeline
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "WS/MPData.asmx/seqStati?idxMacch=" + idxMacc + "&dataFrom='" + dataFrom + "'&dataTo='" + dataTo + "'&numSplit=" + numSplit,
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
beforeSend: showSpinner_<%=UniqueID.Replace("$","_") %>,
|
||||
complete: hideSpinner_<%=UniqueID.Replace("$","_") %>,
|
||||
success: plotSeqStati_<%=UniqueID.Replace("$","_") %>,
|
||||
error: plotSeqStati_<%=UniqueID.Replace("$","_") %>
|
||||
});
|
||||
}
|
||||
}
|
||||
function showSpinner_<%=UniqueID.Replace("$","_") %>(response) {
|
||||
$('#spinner').css("display", "block");
|
||||
}
|
||||
function hideSpinner_<%=UniqueID.Replace("$","_") %>(response) {
|
||||
$('#spinner').css("display", "none");
|
||||
}
|
||||
|
||||
function plotSeqStati_<%=UniqueID.Replace("$","_") %>(response) {
|
||||
// recupero il container grafici
|
||||
var container = document.getElementById('tlArea_<%=UniqueID.Replace("$","_") %>');
|
||||
|
||||
//console.log(response);
|
||||
var output = response.responseText.replace("{\"d\":null}", "");
|
||||
//console.log(output);
|
||||
var tlData = JSON.parse(output);
|
||||
//console.log(tlData);
|
||||
|
||||
// Crea la Timeline
|
||||
var timeline = new vis.Timeline(container, tlData.Items, tlData.Groups, tlData.Options);
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,145 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_sequencerStatiJS : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Idx macchina da plottare
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfIdxMacc.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfIdxMacc.Value = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Idx macchina da plottare
|
||||
/// </summary>
|
||||
public intervalloDate periodo
|
||||
{
|
||||
get
|
||||
{
|
||||
intervalloDate answ = new intervalloDate
|
||||
{
|
||||
inizio = Convert.ToDateTime(DataFrom),
|
||||
fine = Convert.ToDateTime(DataTo)
|
||||
};
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
DataFrom = value.inizio.ToString("yyyy-MM-dd HH:00:00");
|
||||
DataTo = value.fine.ToString("yyyy-MM-dd HH:00:00");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Num gg x cui tornare indietro (e a seconda di quanti sono arrotonda al data...)
|
||||
/// </summary>
|
||||
public int numGG
|
||||
{
|
||||
set
|
||||
{
|
||||
// parto da oggi (a mezzanotte) + ora attuale (arrotondata difetto)
|
||||
DateTime oggi = DateTime.Today;
|
||||
int ora = DateTime.Now.Hour;
|
||||
/* -----------------------------------------------
|
||||
* Definizioni x arrotondamento:
|
||||
* 01gg --> 1h
|
||||
* 02-03gg --> 2h
|
||||
* 04-07gg --> 4h
|
||||
* 08-15gg --> 8h
|
||||
* 16-31gg --> 16h
|
||||
* >=32gg --> 24h (giornata a mezzanotte)
|
||||
* -----------------------------------------------*/
|
||||
// calcolo arrotondamento
|
||||
int tRound = 1;
|
||||
if (value >= 2 && value < 4)
|
||||
{
|
||||
tRound = 2;
|
||||
}
|
||||
else if (value >= 4 && value < 8)
|
||||
{
|
||||
tRound = 4;
|
||||
}
|
||||
else if (value >= 8 && value < 16)
|
||||
{
|
||||
tRound = 8;
|
||||
}
|
||||
else if (value >= 16 && value < 32)
|
||||
{
|
||||
tRound = 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
tRound = 24;
|
||||
}
|
||||
// imposto data fine ARROTONDATA...
|
||||
DataTo = oggi.AddHours((ora / tRound) * tRound).ToString("yyyy-MM-dd HH:00:00");
|
||||
// imposto inizio...
|
||||
DataFrom = oggi.AddHours((ora / tRound) * tRound).AddDays(-value).ToString("yyyy-MM-dd HH:00:00");
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Num split massimo di segmenti da plottare
|
||||
/// </summary>
|
||||
public string numSplit
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfNumSplit.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfNumSplit.Value = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Inizio periodo, formato yyyyMMdd
|
||||
/// </summary>
|
||||
public string DataFrom
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfDataFrom.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfDataFrom.Value = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Fine periodo, formato yyyyMMdd
|
||||
/// </summary>
|
||||
public string DataTo
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfDataTo.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfDataTo.Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_sequencerStatiJS {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfNumSplit.
|
||||
/// </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.HiddenField hfNumSplit;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfIdxMacc.
|
||||
/// </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.HiddenField hfIdxMacc;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfDataFrom.
|
||||
/// </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.HiddenField hfDataFrom;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfDataTo.
|
||||
/// </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.HiddenField hfDataTo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_sequencerTempiCiclo.ascx.cs"
|
||||
Inherits="MoonPro.WebUserControls.mod_sequencerTempiCiclo" %>
|
||||
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
|
||||
Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
|
||||
<asp:Chart ID="Chart1" runat="server"
|
||||
ImageLocation="~/WebCharts/TC_#SEQ(300,3)"
|
||||
ImageStorageMode="UseImageLocation" SuppressExceptions="True"
|
||||
onclick="Chart1_Click" Height="1px" Width="1px" >
|
||||
<Series>
|
||||
</Series>
|
||||
<ChartAreas>
|
||||
<asp:ChartArea Name="TempiCiclo">
|
||||
<AxisX LineWidth="0" IsMarginVisible="False">
|
||||
</AxisX>
|
||||
<Position Height="100" Width="100" X="0" Y="0" />
|
||||
</asp:ChartArea>
|
||||
</ChartAreas>
|
||||
<Legends>
|
||||
<asp:Legend Name="Legenda" TitleAlignment="Far" Alignment="Center" Docking="Bottom"
|
||||
LegendStyle="Row">
|
||||
</asp:Legend>
|
||||
</Legends>
|
||||
</asp:Chart>
|
||||
@@ -0,0 +1,360 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_sequencerTempiCiclo : System.Web.UI.UserControl
|
||||
{
|
||||
#region proprietà
|
||||
|
||||
protected int _timeSplits = 10;
|
||||
protected double _minVal = 0.5;
|
||||
/// <summary>
|
||||
/// totale in minuti da plottare
|
||||
/// </summary>
|
||||
protected double totale = 1;
|
||||
/// <summary>
|
||||
/// valore minimo da plottare
|
||||
/// </summary>
|
||||
public double min2plot { get; set; }
|
||||
/// <summary>
|
||||
/// titolo del grafico
|
||||
/// </summary>
|
||||
public string titolo { get; set; }
|
||||
/// <summary>
|
||||
/// larghezza totale del grafico
|
||||
/// </summary>
|
||||
public int larghezza { get; set; }
|
||||
/// <summary>
|
||||
/// numero dei segmenti del grafico
|
||||
/// </summary>
|
||||
public int numSplit { get; set; }
|
||||
/// <summary>
|
||||
/// % minuma nel periodo per dire che sia verde
|
||||
/// </summary>
|
||||
public double minVal { get; set; }
|
||||
/// <summary>
|
||||
/// definisce se plottare "reversed" (ovvero i valori "minimi" sono con barre + alte dei massimi, come se vosse apssare da tempo a velocità...)
|
||||
/// </summary>
|
||||
public bool plotReversed { get; set; }
|
||||
/// <summary>
|
||||
/// altezza max grafico
|
||||
/// </summary>
|
||||
public int graphHeight { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// setup valori
|
||||
min2plot = 0.0;
|
||||
titolo = "TempiCiclo";
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// disegna la tabella
|
||||
/// </summary>
|
||||
protected void plottaGrafico()
|
||||
{
|
||||
// a seconda del numero di eventi da plottare decido la procedura...
|
||||
DataLayer_generic.serieTimeValDataTable dati = _grafico.serieDati;
|
||||
try
|
||||
{
|
||||
// è la somma dei minuti totali dall'inizio alla fine...
|
||||
totale = _grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio).TotalMinutes;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
plottaDettaglio(dati);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// popola il sequencer degli stati riportando tutti i singoli valori
|
||||
/// </summary>
|
||||
/// <param name="dati"></param>
|
||||
/// <returns></returns>
|
||||
private void plottaDettaglio(DataLayer_generic.serieTimeValDataTable dati)
|
||||
{
|
||||
// definizioni x chart
|
||||
Chart1.Width = larghezza;
|
||||
Chart1.AntiAliasing = System.Web.UI.DataVisualization.Charting.AntiAliasingStyles.All;
|
||||
Chart1.Height = graphHeight;
|
||||
// definizione intervallo asse Y (che qui è anche asse X...
|
||||
Chart1.ChartAreas["TempiCiclo"].AxisX.Minimum = _grafico.intervallo.inizio.ToOADate();
|
||||
Chart1.ChartAreas["TempiCiclo"].AxisX.Maximum = _grafico.intervallo.fine.ToOADate();
|
||||
LabelStyle lbst = new LabelStyle();
|
||||
lbst.Format = "HH:mm";
|
||||
Chart1.ChartAreas["TempiCiclo"].AxisX.LabelStyle = lbst;
|
||||
|
||||
// definizioni x chart area tempi ciclo
|
||||
Chart1.ChartAreas["TempiCiclo"].AxisY.Enabled = System.Web.UI.DataVisualization.Charting.AxisEnabled.False;
|
||||
Chart1.ChartAreas["TempiCiclo"].AxisY.IsLogarithmic = false;
|
||||
Chart1.ChartAreas["TempiCiclo"].AxisY.IsReversed = true;
|
||||
|
||||
|
||||
string tipo_A = "";
|
||||
string tipo_B = "";
|
||||
decimal ratioTC;
|
||||
decimal deltaValori = grafico.maxVal - grafico.minVal;
|
||||
foreach (DataLayer_generic.serieTimeValRow riga in _grafico.serieDati)
|
||||
{
|
||||
|
||||
ratioTC = riga.valore;
|
||||
|
||||
// a seconda del tipo aggiungo all'una o all'altra serie...
|
||||
if (grafico.palletChange)
|
||||
{
|
||||
// controllo per inizializzare i 2 tipi...
|
||||
if (tipo_A == "")
|
||||
{
|
||||
tipo_A = riga.tipo;
|
||||
if (Chart1.Series.Count < 1)
|
||||
{
|
||||
Chart1.Series.Add(tipo_A);
|
||||
}
|
||||
}
|
||||
else if (tipo_B == "" && riga.tipo != tipo_A)
|
||||
{
|
||||
tipo_B = riga.tipo;
|
||||
if (Chart1.Series.Count < 2)
|
||||
{
|
||||
// provo ad aggiungere nuova...
|
||||
try
|
||||
{
|
||||
Chart1.Series.Add(tipo_B);
|
||||
}
|
||||
// ... sennò aggiungo vecchia serie
|
||||
catch
|
||||
{
|
||||
Chart1.Series.Add(tipo_A);
|
||||
}
|
||||
}
|
||||
}
|
||||
// definisco colori
|
||||
if (riga.tipo == tipo_A)
|
||||
{
|
||||
try
|
||||
{
|
||||
Chart1.Series[tipo_A].Points.AddXY(riga.DataEnd, ratioTC);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Chart1.Series[0].Points.AddXY(riga.DataEnd, ratioTC);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
Chart1.Series[tipo_B].Points.AddXY(riga.DataEnd, ratioTC);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Chart1.Series[1].Points.AddXY(riga.DataEnd, ratioTC);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // unica serie
|
||||
{
|
||||
if (tipo_A == "")
|
||||
{
|
||||
tipo_A = riga.tipo;
|
||||
if (Chart1.Series.Count < 1)
|
||||
{
|
||||
Chart1.Series.Add(tipo_A);
|
||||
}
|
||||
}
|
||||
Chart1.Series[tipo_A].Points.AddXY(riga.DataEnd, ratioTC);
|
||||
}
|
||||
}
|
||||
|
||||
if (Chart1.Series.Count > 0)
|
||||
{
|
||||
// disegno plot nuovo...
|
||||
try
|
||||
{
|
||||
Chart1.Series[tipo_A].XValueType = ChartValueType.DateTime;
|
||||
Chart1.Series[tipo_A].ChartType = SeriesChartType.FastPoint;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Chart1.Series[0].XValueType = ChartValueType.DateTime;
|
||||
Chart1.Series[0].ChartType = SeriesChartType.FastPoint;
|
||||
}
|
||||
if (Chart1.Series.Count > 1)
|
||||
{
|
||||
try
|
||||
{
|
||||
Chart1.Series[tipo_B].XValueType = ChartValueType.DateTime;
|
||||
Chart1.Series[tipo_B].ChartType = SeriesChartType.FastPoint;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Chart1.Series[1].XValueType = ChartValueType.DateTime;
|
||||
Chart1.Series[1].ChartType = SeriesChartType.FastPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// calcola il rapporto tr ail valore e le grandezze reali dato masismo, intervallo, apdding, plot regolare o reversed...
|
||||
/// </summary>
|
||||
/// <param name="valore"></param>
|
||||
/// <param name="maxVal"></param>
|
||||
/// <param name="deltaValori"></param>
|
||||
/// <param name="plotReversed"></param>
|
||||
/// <returns></returns>
|
||||
protected decimal calcolaRatio(decimal valore, decimal maxVal, decimal deltaValori, bool plotReversed, decimal padding)
|
||||
{
|
||||
decimal answ = 0;
|
||||
if (plotReversed)
|
||||
{
|
||||
answ = (padding + ((1 - 2 * padding) * ((maxVal - valore) / (deltaValori))));
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = (padding + ((1 - 2 * padding) * ((valore - maxVal) / (deltaValori))));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// intercetta richiesta di zoom e zoomma sul giorno in esame...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void lnkb_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lnk = (LinkButton)sender;
|
||||
// calcolo il giorno...
|
||||
memLayer.ML.setSessionVal("dataZoom", lnk.CommandArgument.ToString());
|
||||
if (eh_richiestaZoom != null)
|
||||
{
|
||||
eh_richiestaZoom(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// popola il sequencer degli stati raggruppando perché troppi valori secondo MEDIA ARMONICA
|
||||
/// </summary>
|
||||
/// <param name="dati"></param>
|
||||
/// <returns></returns>
|
||||
private void plottaGruppiMediaArmonica(DataLayer_generic.serieTimeValDataTable dati)
|
||||
{
|
||||
// creo oggetto x contenere i dati "mediati"
|
||||
DataLayer_generic.serieTimeValDataTable datiGrouped = new DataLayer_generic.serieTimeValDataTable();
|
||||
// calcolo il val minimo da plottare (come ampiezza)
|
||||
decimal ampiezzaMin = (decimal)totale / numSplit;
|
||||
// setup valori iniziali
|
||||
decimal valoreCurr = (decimal)0.0;
|
||||
decimal valoreMedio = (decimal)1.0;
|
||||
DateTime timeRaggiunto = _grafico.intervallo.inizio;
|
||||
decimal ampiezzaCurr = (decimal)0.0;
|
||||
decimal ampiezzaMedia = (decimal)0.0;
|
||||
string label = "";
|
||||
// ciclo x tutti i record
|
||||
foreach (DataLayer_generic.serieTimeValRow riga in dati)
|
||||
{
|
||||
// calcolo nuova ampiezza
|
||||
ampiezzaCurr = (decimal)riga.DataEnd.Subtract(riga.DataStart).TotalMinutes;
|
||||
//...e calcolo nuovo valore medio...
|
||||
valoreCurr = riga.valore;
|
||||
// calcolo media armonica
|
||||
valoreMedio = ((ampiezzaCurr + ampiezzaMedia) / (ampiezzaMedia / valoreMedio + ampiezzaCurr / valoreCurr));
|
||||
ampiezzaMedia = ampiezzaCurr + ampiezzaMedia;
|
||||
// se supero il limite aggiungo in tabella, sennò proseguo...
|
||||
if (ampiezzaMedia > ampiezzaMin)
|
||||
{
|
||||
label = string.Format("TC: {0} min/pz", valoreMedio);
|
||||
datiGrouped.AddserieTimeValRow(timeRaggiunto, riga.DataEnd, valoreMedio, label, "TC");
|
||||
// resetto
|
||||
timeRaggiunto = riga.DataEnd;
|
||||
ampiezzaMedia = (decimal)0.0;
|
||||
valoreMedio = (decimal)1.0;
|
||||
}
|
||||
}
|
||||
_grafico.palletChange = false;
|
||||
plottaDettaglio(datiGrouped);
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce true se ci sono dati...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected bool datiPresenti()
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
int numCelle = grafico.serieDati.Rows.Count;
|
||||
answ = (numCelle > 0);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// oggetto protected
|
||||
/// </summary>
|
||||
protected objTempiCiclo _grafico;
|
||||
/// <summary>
|
||||
/// elemento grafico da plottare
|
||||
/// </summary>
|
||||
public objTempiCiclo grafico
|
||||
{
|
||||
get
|
||||
{
|
||||
return _grafico;
|
||||
}
|
||||
set
|
||||
{
|
||||
_grafico = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna il controllo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
if (datiPresenti())
|
||||
{
|
||||
plottaGrafico();
|
||||
}
|
||||
else
|
||||
{
|
||||
// non plotto
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// evento di richeista zoom sui dati
|
||||
/// </summary>
|
||||
public event EventHandler eh_richiestaZoom;
|
||||
/// <summary>
|
||||
/// evento di click x zoom
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Chart1_Click(object sender, ImageMapEventArgs e)
|
||||
{
|
||||
// alzo evento
|
||||
if (eh_richiestaZoom != null)
|
||||
{
|
||||
eh_richiestaZoom(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_sequencerTempiCiclo {
|
||||
|
||||
/// <summary>
|
||||
/// Chart1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.DataVisualization.Charting.Chart Chart1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="MoonPro.WebUserControls.mod_statoMacchina"
|
||||
CodeBehind="mod_statoMacchina.ascx.cs" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Panel ID="pnlMacchina" runat="server" CssClass="statoMacchine">
|
||||
<div runat="server" id="divData" class="valoriResoconto">
|
||||
<div class="clearDiv floCent gradGray text-center" style="font-size: 1em;">
|
||||
<asp:LinkButton ID="valMacchina" runat="server" OnClick="lnkMacchina_Click" ForeColor="White" Font-Bold="true" />
|
||||
</div>
|
||||
<div class="row small p-1">
|
||||
<div class="col-12">
|
||||
<asp:LinkButton ID="lnkMacchina" runat="server" OnClick="lnkMacchina_Click">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<asp:Label ID="lblCodArticolo" runat="server" />
|
||||
</div>
|
||||
<div class="col-9 text-right">
|
||||
<asp:Label ID="valCodArticolo" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<asp:Label ID="lblProd" runat="server" />
|
||||
</div>
|
||||
<div class="col-9 text-right">
|
||||
<asp:Label ID="valProd" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-center">
|
||||
<asp:Image runat="server" CssClass="img-fluid" ID="imgThumb" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="p-0">
|
||||
<asp:Label ID="lblStato" runat="server" />
|
||||
</div>
|
||||
<div class="p-0 flex-grow-1 text-right">
|
||||
<asp:Label ID="valStato" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="p-0">
|
||||
<asp:Label ID="lblDurata" runat="server" />
|
||||
</div>
|
||||
<div class="p-0 flex-grow-1 text-right">
|
||||
<asp:Label ID="valDurata" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="p-0">
|
||||
<asp:Label ID="lblCausale" runat="server" />
|
||||
</div>
|
||||
<div class="p-0 flex-grow-1 text-right">
|
||||
<asp:Label ID="valCausale" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" id="divWarn" class="clearDiv floCent warning">
|
||||
<asp:HyperLink ID="hlComWarning" runat="server" Target="_blank" NavigateUrl="~/erroreComunicazione.aspx"
|
||||
Text="errore com (101)" />
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<div runat="server" id="divSegnaposto" class="row" style="min-width: 12em; min-height: 12em; width: 100%;">
|
||||
<div class="col-xs-12">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,383 @@
|
||||
using MapoDb;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_statoMacchina : System.Web.UI.UserControl
|
||||
{
|
||||
#region area protected / private
|
||||
|
||||
/// <summary>
|
||||
/// seriale associato alla macchina da controllare
|
||||
/// </summary>
|
||||
protected string _IdxMacchina;
|
||||
/// <summary>
|
||||
/// posizione macchina nella tabella
|
||||
/// </summary>
|
||||
protected string _locazione;
|
||||
protected bool _linkActive = true;
|
||||
|
||||
protected DS_ProdTempi.MappaStatoExplDataTable tabMSE;
|
||||
protected DS_applicazione.AnagraficaStatiDataTable tabAnagStati;
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
updateMe();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna controllo
|
||||
/// </summary>
|
||||
public void updateMe()
|
||||
{
|
||||
//SE E SOLO SE ho una macchina e/o locazione...
|
||||
if (IdxMacchina != "")
|
||||
{
|
||||
// effettua update visualizzazione
|
||||
retrieveData();
|
||||
updateLayout();
|
||||
updateText();
|
||||
updateImg();
|
||||
updateHL();
|
||||
// controllo se link attivo...
|
||||
if (!_linkActive)
|
||||
{
|
||||
valMacchina.Enabled = false;
|
||||
}
|
||||
//logger.lg.scriviLog(string.Format("Retrieve: {0}", DateTime.Now.Subtract(tick).Milliseconds), tipoLog.INFO);
|
||||
divSegnaposto.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
pnlMacchina.Visible = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// recupera i dati
|
||||
/// </summary>
|
||||
private void retrieveData()
|
||||
{
|
||||
// cerco se ho i dati in REDIS x non richiederli...
|
||||
string hashKeyMSE = memLayer.ML.redHash("Tab:MSE:" + IdxMacchina);
|
||||
string hashKeyAS = memLayer.ML.redHash("Tab:AnagStati");
|
||||
string serVal = "";
|
||||
if (memLayer.ML.redHashPresent(hashKeyMSE))
|
||||
{
|
||||
serVal = memLayer.ML.getRSV(hashKeyMSE);
|
||||
tabMSE = (DS_ProdTempi.MappaStatoExplDataTable)memLayer.ML.deserializeVal(serVal);
|
||||
|
||||
serVal = memLayer.ML.getRSV(hashKeyAS);
|
||||
tabAnagStati = (DS_applicazione.AnagraficaStatiDataTable)memLayer.ML.deserializeVal(serVal);
|
||||
}
|
||||
else
|
||||
{
|
||||
// altrimenti prendo da DB...
|
||||
try
|
||||
{
|
||||
// popolazione tabelle
|
||||
tabMSE = DataLayer.obj.taMSE.getByIdxMacchina(IdxMacchina);
|
||||
tabAnagStati = DataLayer.obj.taAnagStati.GetData();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// salvo su DB! dati principali x 30 secondi...
|
||||
serVal = memLayer.ML.serializeVal(tabMSE);
|
||||
memLayer.ML.setRSV(hashKeyMSE, serVal, 30);
|
||||
// anche il resto...
|
||||
serVal = memLayer.ML.serializeVal(tabAnagStati);
|
||||
memLayer.ML.setRSV(hashKeyAS, serVal);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// sistema il testo
|
||||
/// </summary>
|
||||
private void updateText()
|
||||
{
|
||||
if (_IdxMacchina != "nd" && _IdxMacchina != "")
|
||||
{
|
||||
// labels
|
||||
lblCodArticolo.Text = "Art.";
|
||||
lblStato.Text = "Stato";
|
||||
lblProd.Text = "T.Ciclo"; // era OEE
|
||||
lblDurata.Text = "Durata";
|
||||
// 2018.02.05 cambio x fix nuovi impianti
|
||||
// valMacchina.Text = tabMacchine.FindByIdxMacchina(IdxMacchina).Nome;
|
||||
// valCodArticolo.Text = tabStatoMacchine.FindByIdxMacchina(IdxMacchina).CodArticolo;
|
||||
|
||||
// leggo valori da MSE...
|
||||
valMacchina.Text = tabMSE[0].Nome;
|
||||
valCodArticolo.Text = tabMSE[0].CodArticolo;
|
||||
// carico ultimo stato che sia durato almeno 6 sec (0.1 min)
|
||||
int idxStato = 0;
|
||||
int oreTot = 0;
|
||||
float minuti = 0;
|
||||
try
|
||||
{
|
||||
DS_ProdTempi.stp_repDonati_getLastStatoDurataMacchinaRow rigaStato = DataLayer.obj.taDatiStatoMacch.GetData(IdxMacchina, 0.1)[0];
|
||||
idxStato = rigaStato.idxStato;
|
||||
oreTot = Convert.ToInt32(Math.Floor(rigaStato.Minuti / 60));
|
||||
minuti = (float)rigaStato.Minuti - 60 * oreTot;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 2018.02.05 cambio x fix nuovi impianti
|
||||
//idxStato = tabStatoMacchine.FindByIdxMacchina(IdxMacchina).IdxStato;
|
||||
//DateTime inizioStato = tabStatoMacchine.FindByIdxMacchina(IdxMacchina).InizioStato;
|
||||
//DateTime ora = DateTime.Now;
|
||||
//TimeSpan durata = ora.Subtract(inizioStato);
|
||||
//oreTot = durata.Days * 24 + durata.Hours;
|
||||
//minuti = durata.Minutes;
|
||||
idxStato = tabMSE[0].idxStato;
|
||||
oreTot = (int)tabMSE[0].durata / 60;
|
||||
minuti = (int)tabMSE[0].durata - 60 * oreTot;
|
||||
}
|
||||
// 2018.02.05 cambio x fix nuovi impianti
|
||||
//valStato.Text = tabAnagStati.FindByIdxStato(idxStato).Descrizione;
|
||||
valStato.Text = tabMSE[0].DescrizioneStato;
|
||||
valDurata.Text = string.Format("{0}h {1}min", oreTot, minuti);
|
||||
// solo se in stato NON di run...
|
||||
if (idxStato != 13)
|
||||
{
|
||||
lblCausale.Text = "Causale fermo";
|
||||
string cauFermo = "nd";
|
||||
try
|
||||
{
|
||||
cauFermo = tabAnagStati.FindByIdxStato(tabMSE[0].idxStato).Descrizione;
|
||||
//cauFermo = tabAnagStati.FindByIdxStato(Convert.ToInt32(tabStatoMacchine.FindByIdxMacchina(IdxMacchina).IdxStato)).Descrizione;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 2018.02.05 cambio x fix nuovi impianti
|
||||
//cauFermo = string.Format("IN: {0}", tabStatoMacchine.FindByIdxMacchina(IdxMacchina).Value);
|
||||
cauFermo = string.Format("IN: {0}", tabMSE[0].idxStato);
|
||||
}
|
||||
valCausale.Text = cauFermo;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblCausale.Text = "";
|
||||
valCausale.Text = "";
|
||||
}
|
||||
|
||||
// ATTENZIONE! dati generati casualmente, da cambiare in produzione!!!
|
||||
bool demoRandom = false;
|
||||
if (demoRandom)
|
||||
{
|
||||
// indico a caso % pz prodotti...
|
||||
Random RandomClass = new Random(DateTime.Now.Millisecond);
|
||||
if (idxStato == 13)
|
||||
{
|
||||
valProd.Text = string.Format("{0:P}", RandomClass.NextDouble() / 4 + 0.75);
|
||||
}
|
||||
else if (oreTot > 8)
|
||||
{
|
||||
valProd.Text = string.Format("{0:P}", 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
valProd.Text = string.Format("{0:P}", RandomClass.NextDouble() / 2 + 0.25);
|
||||
}
|
||||
}
|
||||
else // mostra lo stesso valore per tutti e due
|
||||
{
|
||||
// prova...se non ha dati relativa mostra n/a - not available
|
||||
|
||||
DateTime Ora = DateTime.Now;
|
||||
|
||||
valProd.Text = "1H: ";
|
||||
string emptyVal = "n/a <br />";
|
||||
int numPezzi = 0;
|
||||
// prova l'ultima ora
|
||||
try
|
||||
{
|
||||
// conto num pezzi e divido 1h/pezzi
|
||||
numPezzi = DataLayer.obj.taTempiCicloRilevati.getByMacchinaPeriodo(IdxMacchina, Ora.AddHours(-1), Ora).Rows.Count;
|
||||
if (numPezzi > 0)
|
||||
{
|
||||
valProd.Text += String.Format("{0:#.00}m <br />", Math.Round((double)60 / numPezzi, 3));
|
||||
}
|
||||
else
|
||||
{
|
||||
valProd.Text += emptyVal;
|
||||
}
|
||||
}
|
||||
|
||||
catch
|
||||
{
|
||||
valProd.Text += emptyVal;
|
||||
}
|
||||
|
||||
// prova le ultime 8 ore
|
||||
|
||||
valProd.Text += "8H: ";
|
||||
numPezzi = 0;
|
||||
try
|
||||
{
|
||||
// conto num pezzi e divido 1h/pezzi
|
||||
numPezzi = DataLayer.obj.taTempiCicloRilevati.getByMacchinaPeriodo(IdxMacchina, Ora.AddHours(-8), Ora).Rows.Count;
|
||||
if (numPezzi > 0)
|
||||
{
|
||||
valProd.Text += String.Format("{0:#.00}m ", Math.Round((double)480 / numPezzi, 3));
|
||||
}
|
||||
else
|
||||
{
|
||||
valProd.Text += emptyVal;
|
||||
}
|
||||
}
|
||||
|
||||
catch
|
||||
{
|
||||
valProd.Text += emptyVal;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// rimanda alla pagina di dettaglio della macchina scelta
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkMacchina_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (linkActive)
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", IdxMacchina);
|
||||
Response.Redirect(string.Format("~/DettaglioMacchina?IdxMacchina={0}", IdxMacchina));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna il layout grafico
|
||||
/// </summary>
|
||||
private void updateLayout()
|
||||
{
|
||||
if (_IdxMacchina != "nd")
|
||||
{
|
||||
try
|
||||
{
|
||||
// in base allo stato recupero il colore...
|
||||
string codColore = resoconti.mngr.semaforoDaIdxStato(resoconti.mngr.statoMacchina(_IdxMacchina));
|
||||
pnlMacchina.CssClass = codColore;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// sistema hyperLink
|
||||
/// </summary>
|
||||
private void updateHL()
|
||||
{
|
||||
bool answ = true;
|
||||
int minuti = memLayer.ML.CRI("keepAliveMin");
|
||||
// controllo se il keep alive è oltre il termine...
|
||||
DateTime lastKA = DateTime.Now.AddMinutes(-minuti);
|
||||
if (_IdxMacchina != "nd")
|
||||
{
|
||||
string nomeVar = string.Format("KeepAlive:{0}", _IdxMacchina);
|
||||
var _lastKA = memLayer.ML.objCacheObj(nomeVar);
|
||||
if (_lastKA != null)
|
||||
{
|
||||
DateTime.TryParse(_lastKA.ToString(), out lastKA);
|
||||
}
|
||||
answ = (lastKA.AddMinutes(minuti) < DateTime.Now) || _lastKA == null;
|
||||
}
|
||||
hlComWarning.Visible = answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// metto a posto l'immagine
|
||||
/// </summary>
|
||||
protected void updateImg()
|
||||
{
|
||||
string urlMacchina;
|
||||
if (_IdxMacchina != "nd")
|
||||
{
|
||||
urlMacchina = string.Format("~/images/macchine/{0}", resoconti.mngr.urlMacchina(IdxMacchina));
|
||||
if (urlMacchina == "thumb_")
|
||||
{
|
||||
urlMacchina = "~/images/empty.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
imgThumb.ToolTip = resoconti.mngr.nomeMacchina(IdxMacchina);
|
||||
}
|
||||
imgThumb.ImageUrl = urlMacchina;
|
||||
}
|
||||
else
|
||||
{
|
||||
urlMacchina = "~/images/empty.png";
|
||||
imgThumb.ImageUrl = urlMacchina;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// Idx della macchina controllata
|
||||
/// </summary>
|
||||
public string IdxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return _IdxMacchina;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (resoconti.mngr == null)
|
||||
{
|
||||
resoconti.mngr = new resoconti();
|
||||
}
|
||||
_IdxMacchina = value;
|
||||
_locazione = resoconti.mngr.locazioneDaIdx(_IdxMacchina);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// stringa locazione macchina in tabella
|
||||
/// </summary>
|
||||
public string locazione
|
||||
{
|
||||
get
|
||||
{
|
||||
return _locazione;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (resoconti.mngr == null)
|
||||
{
|
||||
resoconti.mngr = new resoconti();
|
||||
}
|
||||
_locazione = value;
|
||||
try
|
||||
{
|
||||
_IdxMacchina = resoconti.mngr.idxDaLocazione(_locazione);
|
||||
}
|
||||
catch
|
||||
{
|
||||
_IdxMacchina = "nd";
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// definisce se sia attivo il link della pagina
|
||||
/// </summary>
|
||||
public bool linkActive
|
||||
{
|
||||
get
|
||||
{
|
||||
return _linkActive;
|
||||
}
|
||||
set
|
||||
{
|
||||
_linkActive = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_statoMacchina {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo pnlMacchina.
|
||||
/// </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.Panel pnlMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divData.
|
||||
/// </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 divData;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo valMacchina.
|
||||
/// </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.LinkButton valMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lnkMacchina.
|
||||
/// </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.LinkButton lnkMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblCodArticolo.
|
||||
/// </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.Label lblCodArticolo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo valCodArticolo.
|
||||
/// </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.Label valCodArticolo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblProd.
|
||||
/// </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.Label lblProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo valProd.
|
||||
/// </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.Label valProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo imgThumb.
|
||||
/// </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.Image imgThumb;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblStato.
|
||||
/// </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.Label lblStato;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo valStato.
|
||||
/// </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.Label valStato;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblDurata.
|
||||
/// </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.Label lblDurata;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo valDurata.
|
||||
/// </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.Label valDurata;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblCausale.
|
||||
/// </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.Label lblCausale;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo valCausale.
|
||||
/// </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.Label valCausale;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divWarn.
|
||||
/// </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 divWarn;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlComWarning.
|
||||
/// </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.HyperLink hlComWarning;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divSegnaposto.
|
||||
/// </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 divSegnaposto;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="MoonPro.WebUserControls.mod_statoMacchine" Codebehind="mod_statoMacchine.ascx.cs" %>
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
public partial class mod_statoMacchine : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_statoMacchine {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user