Ok fixed anche elenco scarti oltre a controlli...

This commit is contained in:
Samuele E. Locatelli
2019-01-08 17:42:26 +01:00
parent 4c0919439f
commit 1621e00268
7 changed files with 91 additions and 50 deletions
@@ -1,6 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_logControlli.ascx.cs" Inherits="MP_SITE.WebUserControls.mod_logControlli" %>
<asp:GridView ID="grView" runat="server" CssClass="table table-striped table-dark table-sm" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="IdxControllo" AllowSorting="True" AllowPaging="True" PageSize="5">
<asp:GridView ID="grView" runat="server" CssClass="table table-striped table-dark table-sm" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="IdxControllo" AllowSorting="True" AllowPaging="True" PageSize="10">
<HeaderStyle CssClass="default" />
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
+40 -31
View File
@@ -1,41 +1,50 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_logScarti.ascx.cs" Inherits="MP_SITE.WebUserControls.mod_logScarti" %>
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato" OnSorted="reportUpdt" OnPageIndexChanged="reportUpdt" DataSourceID="ods" CssClass="table table-striped table-sm">
<HeaderStyle CssClass="table-danger" />
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
<SelectedRowStyle CssClass="info" />
<asp:GridView ID="grView" runat="server" CssClass="table table-striped table-dark table-sm" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,DataOra,Causale" AllowSorting="True" AllowPaging="True" PageSize="10">
<Columns>
<asp:TemplateField HeaderText="Invio messaggio" SortExpression="InizioStato">
<asp:TemplateField HeaderText="Registro Scarti <i class='fa fa-sort'></i>" SortExpression="DataOra" HeaderStyle-CssClass="btn btn-sm btn-block btn-secondary text-info" HeaderStyle-ForeColor="White">
<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='<%# resoconti.mngr.tipoDaIdx(Convert.ToInt32(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='<%# resoconti.mngr.oprDaMatr(Convert.ToInt32(Eval("MatrOpr"))) %>' />
<div class="row">
<div class="col-5 small">
<div>
Art: <b>
<asp:Label ID="Label5" runat="server" Text='<%# Eval("CodArticolo") %>' /></b>
</div>
<div>
<asp:Label ID="Label4" runat="server" CssClass='<%# "text-" + Eval("cssClass")%>'><i class='<%# Eval("icona") %>'></i> <%# Eval("Descrizione") %>'</asp:Label>
</div>
</div>
<div class="col-2 px-0 text-center">
<span class="lead font-weight-bold">
<%# Eval("Qta") %>
</span>pz
</div>
<div class="col-5 text-right small">
<div class="text-truncate">
<asp:Label ID="Label1" runat="server" Text='<%# Eval("DataOra","{0:ddd dd.MM.yy HH:mm:ss}") %>' />
<i class="fa fa-clock-o" aria-hidden="true"></i>
</div>
<div class="text-truncate">
<b>
<asp:Label ID="Label3" runat="server" Text='<%# Eval("Operatore") %>' /></b>
<i class="fa fa-user" aria-hidden="true"></i>
</div>
</div>
<div class="col-12 small">
<i runat="server" id="iNote" visible='<%# Eval("Note").ToString()!="" %>'>Nota:
<b>
<asp:Label ID="Label6" runat="server" Text='<%# Eval("Note") %>' /></b></i>
</div>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetDataFiltered" TypeName="MapoDb.DS_applicazioneTableAdapters.EventListTableAdapter">
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getFilt" TypeName="MapoDb.DS_ProdTempiTableAdapters.RegistroScartiTableAdapter">
<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 Type="String" DefaultValue="0" SessionField="IdxMacchinaScarti" Name="IdxMacchina" />
<asp:SessionParameter Type="DateTime" DefaultValue="" SessionField="_inizio" Name="DataFrom" />
<asp:SessionParameter Type="DateTime" DefaultValue="" SessionField="_fine" Name="DataTo" />
<asp:Parameter DefaultValue="true" Name="showMulti" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
@@ -17,10 +17,29 @@ namespace MP_SITE.WebUserControls
{
logger.lg.scriviLog("fine caricamento dati LogScarti", tipoLog.INFO);
}
if (!Page.IsPostBack)
{
fixMacchina();
}
}
public void reportUpdt(object sender, EventArgs e)
{
reportUpdate();
}
private void fixMacchina()
{
string IdxMacc = memLayer.ML.StringSessionObj("IdxMacchina");
int idx = 0;
if (isMulti(IdxMacc))
{
idx = IdxMacc.IndexOf("#");
if (idx > 0)
{
IdxMacc = IdxMacc.Substring(0, IdxMacc.IndexOf("#"));
}
}
memLayer.ML.setSessionVal("IdxMacchinaScarti", IdxMacc);
}
}
}
+6 -1
View File
@@ -5,6 +5,9 @@
<div class="col-12">
<uc1:mod_selPeriodo runat="server" ID="mod_selPeriodo" />
<asp:GridView ID="grView" runat="server" CssClass="table table-striped table-dark table-sm" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,DataOra,Causale" AllowSorting="True" AllowPaging="True" PageSize="5">
<EmptyDataTemplate>
Nessun record trovato
</EmptyDataTemplate>
<Columns>
<asp:TemplateField HeaderText="Registro Scarti <i class='fa fa-sort'></i>" SortExpression="DataOra" HeaderStyle-CssClass="btn btn-sm btn-block btn-secondary text-info" HeaderStyle-ForeColor="White">
<ItemTemplate>
@@ -36,7 +39,8 @@
</div>
<div class="col-12 small">
<i runat="server" id="iNote" visible='<%# Eval("Note").ToString()!="" %>'>Nota:
<b><asp:Label ID="Label6" runat="server" Text='<%# Eval("Note") %>' /></b></i>
<b>
<asp:Label ID="Label6" runat="server" Text='<%# Eval("Note") %>' /></b></i>
</div>
</div>
</ItemTemplate>
@@ -48,6 +52,7 @@
<asp:SessionParameter Type="String" DefaultValue="0" SessionField="IdxMacchinaScarti" Name="IdxMacchina" />
<asp:SessionParameter Type="DateTime" DefaultValue="" SessionField="_inizio" Name="DataFrom" />
<asp:SessionParameter Type="DateTime" DefaultValue="" SessionField="_fine" Name="DataTo" />
<asp:Parameter DefaultValue="false" Name="showMulti" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
+8 -1
View File
@@ -26622,6 +26622,7 @@ FROM MappaStatoExpl";
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataFrom", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataTo", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showMulti", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[2].Connection = this.Connection;
this._commandCollection[2].CommandText = "dbo.stp_RS_pending";
@@ -26684,7 +26685,7 @@ FROM MappaStatoExpl";
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_ProdTempi.RegistroScartiDataTable getFilt(string IdxMacchina, global::System.Nullable<global::System.DateTime> DataFrom, global::System.Nullable<global::System.DateTime> DataTo) {
public virtual DS_ProdTempi.RegistroScartiDataTable getFilt(string IdxMacchina, global::System.Nullable<global::System.DateTime> DataFrom, global::System.Nullable<global::System.DateTime> DataTo, global::System.Nullable<bool> showMulti) {
this.Adapter.SelectCommand = this.CommandCollection[1];
if ((IdxMacchina == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
@@ -26704,6 +26705,12 @@ FROM MappaStatoExpl";
else {
this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
}
if ((showMulti.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[4].Value = ((bool)(showMulti.Value));
}
else {
this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value;
}
DS_ProdTempi.RegistroScartiDataTable dataTable = new DS_ProdTempi.RegistroScartiDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
+1
View File
@@ -2029,6 +2029,7 @@ FROM dbo.v_RegistroScarti</CommandText>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@IdxMacchina" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@DataFrom" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@DataTo" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@showMulti" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
+16 -16
View File
@@ -4,31 +4,31 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="762" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:TempiCicloRilevati" ZOrder="8" X="20" Y="81" Height="296" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="145" />
<Shape ID="DesignTable:ODL" ZOrder="2" X="590" Y="407" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:AnagArticoli" ZOrder="7" X="261" Y="516" Height="342" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="191" />
<Shape ID="DesignTable:TempiCicloRilevati" ZOrder="9" X="20" Y="81" Height="296" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="145" />
<Shape ID="DesignTable:ODL" ZOrder="3" X="590" Y="407" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:AnagArticoli" ZOrder="8" X="261" Y="516" Height="342" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="191" />
<Shape ID="DesignTable:DatiMacchine" ZOrder="17" X="985" Y="402" Height="319" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="214" />
<Shape ID="DesignTable:PostazioniMapo" ZOrder="23" X="950" Y="39" Height="296" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
<Shape ID="DesignTable:stp_PzProd_getByMacchina" ZOrder="18" X="181" Y="769" Height="250" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="122" />
<Shape ID="DesignTable:DatiConfermati" ZOrder="22" X="585" Y="50" Height="411" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:CalendFesteFerie" ZOrder="10" X="346" Y="364" Height="135" Width="287" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="76" />
<Shape ID="DesignTable:stp_TempoByIdxMaccPeriodClass" ZOrder="6" X="86" Y="985" Height="113" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="54" />
<Shape ID="DesignTable:CalendFesteFerie" ZOrder="11" X="346" Y="364" Height="135" Width="287" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="76" />
<Shape ID="DesignTable:stp_TempoByIdxMaccPeriodClass" ZOrder="7" X="86" Y="985" Height="113" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="54" />
<Shape ID="DesignTable:DatiProduzione" ZOrder="16" X="554" Y="922" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:stp_repDonati_getDatiProdMacchina" ZOrder="21" X="1005" Y="771" Height="365" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:stp_repDonati_getLastStatoDurataMacchina" ZOrder="20" X="1003" Y="1118" Height="135" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="76" />
<Shape ID="DesignTable:stp_repDonati_getDatiProdMacchinaPeriodo" ZOrder="19" X="166" Y="1132" Height="204" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="145" />
<Shape ID="DesignTable:TurniMacchina" ZOrder="9" X="363" Y="94" Height="227" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="122" />
<Shape ID="DesignTable:MappaStatoExpl" ZOrder="4" X="907" Y="1262" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:ResProdDett_splitODL" ZOrder="12" X="928" Y="2187" Height="227" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
<Shape ID="DesignTable:ResProdDett_splitGG" ZOrder="11" X="924" Y="2426" Height="250" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="191" />
<Shape ID="DesignTable:ResProdTot" ZOrder="13" X="544" Y="2122" Height="273" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="214" />
<Shape ID="DesignTable:RegistroControlli" ZOrder="1" X="536" Y="1403" Height="365" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="237" />
<Shape ID="DesignTable:RegistroScarti" ZOrder="15" X="172" Y="1581" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:PromesseODL" ZOrder="3" X="927" Y="1708" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:ElencoConfermeProd" ZOrder="14" X="166" Y="2050" Height="365" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="283" />
<Shape ID="DesignTable:StatoProd" ZOrder="5" X="541" Y="1777" Height="319" Width="295" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="260" />
<Shape ID="DesignTable:TurniMacchina" ZOrder="10" X="363" Y="94" Height="227" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="122" />
<Shape ID="DesignTable:MappaStatoExpl" ZOrder="5" X="907" Y="1262" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:ResProdDett_splitODL" ZOrder="13" X="928" Y="2187" Height="227" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
<Shape ID="DesignTable:ResProdDett_splitGG" ZOrder="12" X="924" Y="2426" Height="250" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="191" />
<Shape ID="DesignTable:ResProdTot" ZOrder="14" X="544" Y="2122" Height="273" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="214" />
<Shape ID="DesignTable:RegistroControlli" ZOrder="2" X="536" Y="1403" Height="365" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="237" />
<Shape ID="DesignTable:RegistroScarti" ZOrder="1" X="172" Y="1581" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:PromesseODL" ZOrder="4" X="927" Y="1708" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:ElencoConfermeProd" ZOrder="15" X="166" Y="2050" Height="365" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="283" />
<Shape ID="DesignTable:StatoProd" ZOrder="6" X="541" Y="1777" Height="319" Width="295" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="260" />
</Shapes>
<Connectors />
</DiagramLayout>