iniziata gestione controlli ingresso x postazione: errori e controlla ci siano UDC in cella da verificare con Dtx
This commit is contained in:
@@ -195,7 +195,7 @@
|
||||
</site>
|
||||
<site name="GMW(1)" id="6">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.steamw\Documents\Visual Studio 2017\Projects\GMW\GMW\GMW" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.steamw\Documents\VisualStudioProject\GMW\GMW\GMW" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:57804:localhost" />
|
||||
@@ -203,7 +203,7 @@
|
||||
</site>
|
||||
<site name="GMW(2)" id="7">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.steamw\Documents\Visual Studio 2017\Projects\GMW\GMW\GMW" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\samuele.steamw\Documents\VisualStudioProject\GMW\GMW\GMW" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:57805:localhost" />
|
||||
|
||||
+1
-1
@@ -2697,7 +2697,7 @@
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>57804</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:57805</IISUrl>
|
||||
<IISUrl>http://localhost:57804</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_PostFin_DT.ascx.cs" Inherits="GMW.WebUserControls.mod_PostFin_DT" %>
|
||||
<%if (false)
|
||||
{ %>
|
||||
{ %>
|
||||
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
|
||||
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/themes/base/css" />
|
||||
<%} %>
|
||||
@@ -9,13 +9,55 @@
|
||||
<div class="col-sm-4">
|
||||
<div id="divAL" runat="server" class="panel panel-warning panel-sm">
|
||||
<div class="panel-heading">
|
||||
<b><%: traduci("ContenutoAL") %></b>
|
||||
<b><%: traduci("UDC") %></b>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="bg-primary">
|
||||
<asp:Label runat="server" ID="lblAL" />
|
||||
</div>
|
||||
<asp:GridView ID="grViewSource" runat="server" AutoGenerateColumns="False"
|
||||
<asp:GridView ID="grViewSource" runat="server" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False" OnDataBound="grViewSource_DataBound" DataKeyNames="UDC" DataSourceID="ods" OnPageIndexChanged="grViewSource_PageIndexChanged" OnSorted="grView_Sorted" Width="100%" OnSelectedIndexChanged="grViewSource_SelectedIndexChanged">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle" />
|
||||
<FooterStyle CssClass="ctrFooter" />
|
||||
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="UDC" SortExpression="UDC">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblUDC" runat="server" Text='<%# Eval("UDC") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Particolare" SortExpression="Particolare">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Qta" SortExpression="Qta" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblQta" runat="server" Text='<%# Eval("Qta","{0:#}") %>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtDelete" runat="server" CausesValidation="False" CommandName="Select" OnClientClick="return confirm('Confermi consumo completato?')" CssClass="text-danger"><i class="glyphicon glyphicon-trash"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getUdcDetailByIdxCella" TypeName="GMW_data.DS_magazzinoTableAdapters.v_UdcDetailTableAdapter" OnDataBinding="ods_DataBinding">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter Name="IdxCella" Type="Int32" SessionField="IdxCellaLineaFinitiDtx" DefaultValue="0" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
|
||||
<%--<asp:GridView ID="grViewSource" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="UDC" DataSourceID="odsAL" Width="100%">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
@@ -54,7 +96,7 @@
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="lblAL" DefaultValue="AL0000" Name="AL" PropertyName="Text" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</asp:ObjectDataSource>--%>
|
||||
<asp:LinkButton runat="server" ID="lbtPrendeCaricoAL" Width="100%" CssClass="btn btn-warning btn-sm" OnClick="lbtPrendeCaricoAL_Click"><i aria-hidden='true' class='fa fa-arrow-circle-down fa-2x'></i> <%: traduci("lbtPrendeCaricoAL") %></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtChiudiAL" Width="100%" CssClass="btn btn-danger btn-sm" OnClick="lbtChiudiAL_Click"><i aria-hidden='true' class='fa fa-arrow-circle-up fa-2x'></i> <%: traduci("lbtChiudeAL") %></asp:LinkButton>
|
||||
</div>
|
||||
@@ -182,4 +224,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
@@ -27,13 +28,13 @@ namespace GMW.WebUserControls
|
||||
codLineaKo = "W8200";
|
||||
QtaImballoStd = memLayer.ML.cdvi("QtaImballoFiniti");
|
||||
CodImballoStd = memLayer.ML.cdv("CodImballoFiniti");
|
||||
sVarIdxCella = "IdxCellaLineaFinitiDtx";
|
||||
|
||||
|
||||
tipoUdcLinea = "Finito";
|
||||
IdxPosizioneIn = memLayer.ML.cdvi("IdxPosizioneTrattati");
|
||||
IdxPosizioneOut = memLayer.ML.cdvi("IdxPosizioneFiniti");
|
||||
IdxPosizioneOutTempName = "IdxPosizioneFinTemp";
|
||||
sVarIdxCella = "IdxCellaLineaFiniti";
|
||||
IdxPosizioneOutTemp = memLayer.ML.cdvi(IdxPosizioneOutTempName);
|
||||
tipoCartCurr = tipoCartellino.cartFiniti;
|
||||
enableBCodeParticolare = false;
|
||||
@@ -116,7 +117,9 @@ namespace GMW.WebUserControls
|
||||
currUDC = "";
|
||||
forceDelete = false;
|
||||
setDefaultVal();
|
||||
odsAL.DataBind();
|
||||
#if false
|
||||
odsAL.DataBind();
|
||||
#endif
|
||||
grViewSource.DataBind();
|
||||
}
|
||||
}
|
||||
@@ -245,6 +248,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
Postazione.messaggiText = string.Format("{0}: {1}", traduci("BCodeIns"), barcodeIn);
|
||||
tipoCodiceBarcode tipoBC = MagClass.tipoBCode_L5(barcodeIn);
|
||||
#if false
|
||||
// per prima cosa: SE NON HO AL SELEZIONATO e non ho sparato un AL o un imballo sollevo errore...
|
||||
if (!(tipoBC == tipoCodiceBarcode.AL || tipoBC == tipoCodiceBarcode.Imballo) && currAL == "")
|
||||
{
|
||||
@@ -252,6 +256,29 @@ namespace GMW.WebUserControls
|
||||
Postazione.warningText = traduci("ERR-ALT-001");
|
||||
Postazione.CssClass = cssErr;
|
||||
sendUpdateTablet("ND", "-", traduci("ERR-ALT-001"), "-", "-", "-", cssErr, cssErr, cssErr);
|
||||
}
|
||||
#endif
|
||||
// per prima cosa se non ho almeno un UDC trattamenti od un AL (che ne porti uno) sollevo un errore...
|
||||
int numUdcCella = 0;
|
||||
try
|
||||
{
|
||||
numUdcCella = MagClass.magazzino.taDettUDC.getUdcDetailByIdxCella(idxCella).Rows.Count;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (tipoBC == tipoCodiceBarcode.ND)
|
||||
{
|
||||
// sollevo errore, in primis va caricato qualche UDC sorgente...
|
||||
Postazione.warningText = traduci("ERR-BCD-001");
|
||||
Postazione.CssClass = cssErr;
|
||||
sendUpdateTablet("ND", "-", traduci("ERR-UDC-MIS-TT01"), "-", "-", "-", cssErr, cssErr, cssErr);
|
||||
}
|
||||
else if (numUdcCella == 0 && !(tipoBC == tipoCodiceBarcode.AL || tipoBC == tipoCodiceBarcode.UDC))
|
||||
{
|
||||
// sollevo errore, in primis va caricato qualche UDC sorgente...
|
||||
Postazione.warningText = traduci("ERR-UDC-MIS-TT01");
|
||||
Postazione.CssClass = cssErr;
|
||||
sendUpdateTablet("ND", "-", traduci("ERR-UDC-MIS-TT01"), "-", "-", "-", cssErr, cssErr, cssErr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -840,6 +867,47 @@ namespace GMW.WebUserControls
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grViewSource_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grViewSource.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grViewSource.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grViewSource.Rows.Count + grViewSource.PageSize * (grViewSource.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grViewSource.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// qui la selezione è x scaricare...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grViewSource_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
#if false
|
||||
consumaUdc(grView.SelectedValue.ToString());
|
||||
#endif
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// evento selezione grView destinazione: ricarico dati!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
|
||||
+11
-2
@@ -58,13 +58,22 @@ namespace GMW.WebUserControls {
|
||||
protected global::System.Web.UI.WebControls.GridView grViewSource;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsAL.
|
||||
/// 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 odsAL;
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblNumRec.
|
||||
/// </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 lblNumRec;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtPrendeCaricoAL.
|
||||
|
||||
@@ -16,10 +16,7 @@
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12" style="font-size: 0.8em;">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False"
|
||||
OnDataBound="grView_DataBound"
|
||||
DataKeyNames="UDC" DataSourceID="ods" OnPageIndexChanged="grView_PageIndexChanged"
|
||||
OnSorted="grView_Sorted" Width="100%" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False" OnDataBound="grView_DataBound" DataKeyNames="UDC" DataSourceID="ods" OnPageIndexChanged="grView_PageIndexChanged" OnSorted="grView_Sorted" Width="100%" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
|
||||
@@ -764,6 +764,12 @@ namespace GMW_data
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
public virtual void grViewSource_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
|
||||
public virtual void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
|
||||
Reference in New Issue
Block a user