Fix gestione conf prod che inibiva scarti e controlli
This commit is contained in:
+1
-1
@@ -11,8 +11,8 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="container">
|
||||
<uc1:mod_confProd runat="server" ID="mod_confProd" />
|
||||
<uc1:mod_regScarti runat="server" ID="mod_regScarti" />
|
||||
<uc1:mod_controlliProd runat="server" ID="mod_controlliProd" />
|
||||
<uc1:mod_confProd runat="server" ID="mod_confProd" />
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
Generated
+9
-9
@@ -12,15 +12,6 @@ namespace MoonProTablet {
|
||||
|
||||
public partial class Test {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_confProd.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_confProd mod_confProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_regScarti.
|
||||
/// </summary>
|
||||
@@ -38,5 +29,14 @@ namespace MoonProTablet {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_controlliProd mod_controlliProd;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_confProd.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_confProd mod_confProd;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,48 +1,28 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_confProd.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_confProd" %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblConfProd" CssClass="btn btn-primary btn-lg btn-block disabled">
|
||||
<i class="fa fa-check"></i> MOSTRA Conferma
|
||||
</asp:Label>
|
||||
<asp:Label runat="server" ID="lblMancaODL" Visible="false" ForeColor="Red">MANCA ODL: conferma NON permessa</asp:Label>
|
||||
<asp:LinkButton runat="server" ID="lbtShowConfProd" OnClick="lbtShowConfProd_Click" CssClass="btn btn-primary btn-lg btn-block">
|
||||
<i class="fa fa-check"></i>
|
||||
<asp:Label runat="server" ID="lblShowConfProd" />
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-12" runat="server" id="divSelMacc">
|
||||
<asp:DropDownList runat="server" ID="ddlSubMacc" DataSourceID="ods" CssClass="form-control" DataTextField="CodMaccArticolo" DataValueField="IdxMacchina" AutoPostBack="True" OnSelectedIndexChanged="ddlSubMacc_SelectedIndexChanged" OnDataBound="ddlSubMacc_DataBound"></asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getMulti" TypeName="MapoDb.DS_applicazioneTableAdapters.MSFDTableAdapter" FilterExpression="idxMacchina LIKE '%#%'">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="0" Name="IdxMacchina" SessionField="IdxMacchina" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row textCondens">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-4 py-1 text-center text-uppercase">
|
||||
<div class="col-6 py-1 text-left text-uppercase">
|
||||
<b>Dati Globali ODL</b>
|
||||
</div>
|
||||
<div class="col-4 text-right"><sub>(Inizio ODL --> <%: dtReqUpdate.ToString() %>)</sub></div>
|
||||
<div class="col-6 col-sm-3 pr-1 py-0 text-right">
|
||||
<div class="col-6 text-right"><sub>Inizio ODL --> <%: dtReqUpdate.ToString() %></sub></div>
|
||||
<div class="col-6 col-sm-3 pr-1 py-0 text-right">
|
||||
<div class="alert alert-info py-1">
|
||||
<div class="text-truncate">
|
||||
Pz Prodotti TOT [A+B+C]
|
||||
</div>
|
||||
<div style="font-size: 2em; font-weight: bold;" class="my-0">
|
||||
<%: datiProdAct.PzTotODL %>
|
||||
<asp:label runat="server" ID="lblPzTotODL">[A+B+C]</asp:label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-sm-3 pl-1 px-sm-1 py-0 text-right">
|
||||
<div class="col-6 col-sm-3 pl-1 px-sm-1 py-0 text-right">
|
||||
<div class="alert alert-warning py-1">
|
||||
<div class="text-truncate">
|
||||
[A] NUOVI Pz.Prod
|
||||
</div>
|
||||
<div style="font-size: 2em; font-weight: bold;" class="my-0">
|
||||
<%: datiProdAct.Pz2RecTot %>
|
||||
<asp:label runat="server" ID="lblPz2RecTot">[A]</asp:label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,7 +32,7 @@
|
||||
[B] Scarti VERS + PEND
|
||||
</div>
|
||||
<div style="font-size: 2em; font-weight: bold;" class="my-0">
|
||||
<%: datiProdAct.PzConfScarto %> + <%: datiProdAct.Pz2RecScarto %>
|
||||
<asp:label runat="server" ID="lblPzConfScarto">[B1]</asp:label> + <asp:label runat="server" ID="lblPz2RecScarto">[B2]</asp:label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -62,36 +42,64 @@
|
||||
[C] Pz Buoni VERS.
|
||||
</div>
|
||||
<div style="font-size: 2em; font-weight: bold;" class="my-0">
|
||||
<%: datiProdAct.PzConfBuoni %>
|
||||
<asp:label runat="server" ID="lblPzConfBuoni">[C]</asp:label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row textCondens text-right bg-secondary" runat="server" id="divInnovazioni">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-4 py-1 text-center text-uppercase">
|
||||
<b>Dati Incrementali</b>
|
||||
<div class="card bg-secondary">
|
||||
<div class="card-header p-0">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblConfProd" CssClass="btn btn-dark btn-lg btn-block disabled">
|
||||
<i class="fa fa-check"></i> MOSTRA Conferma
|
||||
</asp:Label>
|
||||
<asp:Label runat="server" ID="lblMancaODL" Visible="false" ForeColor="Red">MANCA ODL: conferma NON permessa</asp:Label>
|
||||
<asp:LinkButton runat="server" ID="lbtShowConfProd" OnClick="lbtShowConfProd_Click" CssClass="btn btn-dark btn-lg btn-block">
|
||||
<i class="fa fa-check"></i>
|
||||
<asp:Label runat="server" ID="lblShowConfProd" />
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-12" runat="server" id="divSelMacc">
|
||||
<asp:DropDownList runat="server" ID="ddlSubMacc" DataSourceID="ods" CssClass="form-control" DataTextField="CodMaccArticolo" DataValueField="IdxMacchina" AutoPostBack="True" OnSelectedIndexChanged="ddlSubMacc_SelectedIndexChanged" OnDataBound="ddlSubMacc_DataBound"></asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getMulti" TypeName="MapoDb.DS_applicazioneTableAdapters.MSFDTableAdapter" FilterExpression="idxMacchina LIKE '%#%'">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="0" Name="IdxMacchina" SessionField="IdxMacchina" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 text-right"><sub>(ultima conferma --> <%: dtReqUpdate.ToString() %>)</sub></div>
|
||||
<div class="col-3 pr-1">
|
||||
<asp:Label runat="server" ID="lblNumPezzi" AssociatedControlID="txtNumPezzi" Text="Pz Prodotti" />
|
||||
<asp:TextBox runat="server" ID="txtNumPezzi" Font-Size="XX-Large" TextMode="Number" CssClass="form-control text-right alert alert-info py-0" Enabled="false" AutoPostBack="True" OnTextChanged="txtNumPezzi_TextChanged" />
|
||||
</div>
|
||||
<div class="col-3 px-1">
|
||||
<asp:Label runat="server" ID="lblNumScarti" AssociatedControlID="txtNumScarti" Text="Pz Scarto" />
|
||||
<asp:TextBox runat="server" ID="txtNumScarti" Font-Size="XX-Large" TextMode="Number" CssClass="form-control text-right alert alert-danger py-0" Enabled="false" AutoPostBack="True" OnTextChanged="txtNumScarti_TextChanged" />
|
||||
</div>
|
||||
<div class="col-3 px-1">
|
||||
<asp:Label runat="server" ID="lblPzBuoni" AssociatedControlID="txtPzBuoni" Text="Pz Buoni" />
|
||||
<asp:TextBox runat="server" ID="txtPzBuoni" Font-Size="XX-Large" TextMode="Number" CssClass="form-control text-right alert alert-success py-0" Enabled="false" Text="---" />
|
||||
</div>
|
||||
<div class="col-3 pl-1">
|
||||
<asp:Label runat="server" ID="Label1" AssociatedControlID="txtPzBuoni" Text="-" />
|
||||
<asp:LinkButton runat="server" ID="lbtSalva" Visible="false" CssClass="btn btn-success text-light btn-lg btn-block" OnClick="lbtSalva_Click"><i class="fa fa-floppy-o"></i> CONFERMA</asp:LinkButton>
|
||||
<div class="card-body p-1">
|
||||
<div class="row textCondens text-right " runat="server" id="divInnovazioni">
|
||||
<div class="col-6 py-1 text-left text-uppercase">
|
||||
<b>Dati Incrementali</b>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<sub>ultima conferma --> <%: dtReqUpdate.ToString() %></sub>
|
||||
</div>
|
||||
<div class="col-3 pr-1">
|
||||
<asp:Label runat="server" ID="lblNumPezzi" AssociatedControlID="txtNumPezzi" Text="Pz Prodotti" />
|
||||
<asp:TextBox runat="server" ID="txtNumPezzi" Font-Size="XX-Large" TextMode="Number" CssClass="form-control text-right alert alert-info py-0" Enabled="false" AutoPostBack="True" OnTextChanged="txtNumPezzi_TextChanged" />
|
||||
</div>
|
||||
<div class="col-3 px-1">
|
||||
<asp:Label runat="server" ID="lblNumScarti" AssociatedControlID="txtNumScarti" Text="Pz Scarto" />
|
||||
<asp:TextBox runat="server" ID="txtNumScarti" Font-Size="XX-Large" TextMode="Number" CssClass="form-control text-right alert alert-danger py-0" Enabled="false" />
|
||||
</div>
|
||||
<div class="col-3 px-1">
|
||||
<asp:Label runat="server" ID="lblPzBuoni" AssociatedControlID="txtPzBuoni" Text="Pz Buoni" />
|
||||
<asp:TextBox runat="server" ID="txtPzBuoni" Font-Size="XX-Large" TextMode="Number" CssClass="form-control text-right alert alert-success py-0" Enabled="false" Text="---" />
|
||||
</div>
|
||||
<div class="col-3 pl-1">
|
||||
<asp:Label runat="server" ID="Label1" AssociatedControlID="txtPzBuoni" Text="-" />
|
||||
<asp:LinkButton runat="server" ID="lbtSalva" Visible="false" CssClass="btn btn-success text-light btn-lg btn-block" OnClick="lbtSalva_Click"><i class="fa fa-floppy-o"></i> CONFERMA</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-2">
|
||||
<div class="col-12">
|
||||
<asp:Label runat="server" ID="lblOut" ForeColor="Red" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -60,10 +60,116 @@ namespace MoonProTablet.WebUserControls
|
||||
dtReqUpdate = DateTime.Now;
|
||||
datiProdAct = DataLayer.obj.taStatoProd.GetData(idxMacchina, dtReqUpdate)[0];
|
||||
// aggiorno visualizzazione...
|
||||
numPzProdotti = datiProdAct.Pz2RecTot;
|
||||
numPzScarto = datiProdAct.Pz2RecScarto;
|
||||
numPzProdotti = datiProdAct.PzTotODL;
|
||||
numPz2Rec = datiProdAct.Pz2RecTot;
|
||||
numPzSca2Rec = datiProdAct.Pz2RecScarto;
|
||||
numPzScaConf = datiProdAct.PzConfScarto;
|
||||
numPzBuoniConf = datiProdAct.PzConfBuoni;
|
||||
numPzProdotti2Rec = datiProdAct.Pz2RecTot;
|
||||
numPzScarto2Rec = datiProdAct.Pz2RecScarto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI GLOBALI
|
||||
/// </summary>
|
||||
protected int numPzProdotti
|
||||
{
|
||||
set
|
||||
{
|
||||
lblPzTotODL.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI da ultima conferma
|
||||
/// </summary>
|
||||
protected int numPz2Rec
|
||||
{
|
||||
set
|
||||
{
|
||||
lblPz2RecTot.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi SCARTO da ultima conferma
|
||||
/// </summary>
|
||||
protected int numPzSca2Rec
|
||||
{
|
||||
set
|
||||
{
|
||||
lblPz2RecScarto.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi SCARTO già confermati
|
||||
/// </summary>
|
||||
protected int numPzScaConf
|
||||
{
|
||||
set
|
||||
{
|
||||
lblPzConfScarto.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi BUONI già confermati
|
||||
/// </summary>
|
||||
protected int numPzBuoniConf
|
||||
{
|
||||
set
|
||||
{
|
||||
lblPzConfBuoni.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI da registrare
|
||||
/// </summary> da ultima conferma
|
||||
protected int numPzProdotti2Rec
|
||||
{
|
||||
set
|
||||
{
|
||||
txtNumPezzi.Text = value.ToString();
|
||||
}
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNumPezzi.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi SCARTATI da registrare
|
||||
/// </summary>
|
||||
protected int numPzScarto2Rec
|
||||
{
|
||||
set
|
||||
{
|
||||
txtNumScarti.Text = value.ToString();
|
||||
}
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNumScarti.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi confermati (buoni - scarto)
|
||||
/// </summary>
|
||||
protected int numPzConfermati
|
||||
{
|
||||
get
|
||||
{
|
||||
return numPzProdotti2Rec - numPzScarto2Rec;
|
||||
}
|
||||
}
|
||||
|
||||
private void checkAll()
|
||||
{
|
||||
fixSelMacc();
|
||||
@@ -228,58 +334,7 @@ namespace MoonProTablet.WebUserControls
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi PRODOTTI
|
||||
/// </summary>
|
||||
protected int numPzProdotti
|
||||
{
|
||||
set
|
||||
{
|
||||
txtNumPezzi.Text = value.ToString();
|
||||
}
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNumPezzi.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi SCARTATI
|
||||
/// </summary>
|
||||
protected int numPzScarto
|
||||
{
|
||||
set
|
||||
{
|
||||
txtNumScarti.Text = value.ToString();
|
||||
}
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNumScarti.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero pezzi confermati (buoni - scarto)
|
||||
/// </summary>
|
||||
protected int numPzConfermati
|
||||
{
|
||||
get
|
||||
{
|
||||
return numPzProdotti - numPzScarto;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// salvo produzione
|
||||
/// </summary>
|
||||
@@ -298,9 +353,9 @@ namespace MoonProTablet.WebUserControls
|
||||
// refresh tabella dati tablet...
|
||||
DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.confReadInt("refrMSE_0"));
|
||||
// mostro output
|
||||
lblOut.Text = string.Format("Confermata la produzione per {0} pezzi! ({1} scarto)", numPzConfermati, numPzScarto);
|
||||
lblOut.Text = string.Format("Confermata la produzione per {0} pezzi! ({1} scarto)", numPzConfermati, numPzScarto2Rec);
|
||||
// cambio button conferma...
|
||||
switchBtnConferma(!txtNumPezzi.Enabled);
|
||||
switchBtnConferma(!txtNumPezzi.Enabled);
|
||||
// sollevo evento!
|
||||
if (eh_newVal != null)
|
||||
{
|
||||
@@ -312,14 +367,14 @@ namespace MoonProTablet.WebUserControls
|
||||
/// </summary>
|
||||
private void confermaPerGiorni()
|
||||
{
|
||||
DataLayer.obj.confermaProdMacchina(idxMacchina.ToString(), memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto);
|
||||
DataLayer.obj.confermaProdMacchina(idxMacchina.ToString(), memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto2Rec);
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua conferma per turni della produzione
|
||||
/// </summary>
|
||||
private void confermaPerTurni()
|
||||
{
|
||||
DataLayer.obj.confermaProdMacchina(idxMacchina.ToString(), memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto);
|
||||
DataLayer.obj.confermaProdMacchina(idxMacchina.ToString(), memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto2Rec);
|
||||
}
|
||||
/// <summary>
|
||||
/// update post modifica pz buoni
|
||||
@@ -337,15 +392,6 @@ namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
txtPzBuoni.Text = numPzConfermati.ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// update post modifica pz scarto
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtNumScarti_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
updatePzBuoni();
|
||||
}
|
||||
|
||||
protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -12,6 +12,51 @@ namespace MoonProTablet.WebUserControls {
|
||||
|
||||
public partial class mod_confProd {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPzTotODL.
|
||||
/// </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 lblPzTotODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPz2RecTot.
|
||||
/// </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 lblPz2RecTot;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPzConfScarto.
|
||||
/// </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 lblPzConfScarto;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPz2RecScarto.
|
||||
/// </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 lblPz2RecScarto;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblPzConfBuoni.
|
||||
/// </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 lblPzConfBuoni;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblConfProd.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user