Nuovi obj validazione
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_validationSummary.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_validationSummary" %>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<h3>Validation Summary</h3>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<asp:LinkButton runat="server" ID="lbtRevalidate" CssClass="btn btn-sm btn-danger btn-block" OnClick="lbtRevalidate_Click"><i class="fa fa-bell-o" aria-hidden="true"></i> Re-Validate PARTS (KO)</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<asp:LinkButton runat="server" ID="lbtValidateMissing" CssClass="btn btn-sm btn-secondary btn-block" OnClick="lbtValidateMissing_Click"><i class="fa fa-bell-o" aria-hidden="true"></i> Validate NEW PARTS</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:FormView ID="frmView" runat="server" DataSourceID="ods" Width="100%">
|
||||
<ItemTemplate>
|
||||
<div class="row">
|
||||
<div class="col-3 text-info">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
# Parts
|
||||
</div>
|
||||
<div class="col text-right font-weight-bold">
|
||||
<asp:Label ID="TotPartsLabel" runat="server" Text='<%# Eval("TotParts") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 text-success">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
# Validated
|
||||
</div>
|
||||
<div class="col text-right font-weight-bold">
|
||||
<asp:Label ID="QtyOkLabel" runat="server" Text='<%# Eval("QtyOk") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 text-danger">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
# NOT Valid
|
||||
</div>
|
||||
<div class="col text-right font-weight-bold">
|
||||
<asp:Label ID="QtyKoLabel" runat="server" Text='<%# Eval("QtyKo") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 text-secondary">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
# Unknown
|
||||
</div>
|
||||
<div class="col text-right font-weight-bold">
|
||||
<asp:Label ID="QtyUnknLabel" runat="server" Text='<%# Eval("QtyUnkn") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:FormView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="AppData.DS_AppTableAdapters.PartValidParetoTableAdapter"></asp:ObjectDataSource>
|
||||
@@ -0,0 +1,65 @@
|
||||
using AppData;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
public partial class cmp_validationSummary : BaseUserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
fixVisibility();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// fix visibilità buttons
|
||||
/// </summary>
|
||||
private void fixVisibility()
|
||||
{
|
||||
// controllo SE HO nuove PARTS da validare...
|
||||
var tabItems2Valid = DataLayer.man.taIL.getNeedValid();
|
||||
var tabItemsUnValid = DataLayer.man.taIL.getUnValid();
|
||||
lbtValidateMissing.Visible = tabItems2Valid.Count > 0;
|
||||
lbtRevalidate.Visible = tabItemsUnValid.Count > 0;
|
||||
}
|
||||
|
||||
protected void lbtValidateMissing_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiamo stored x creazione NUOVI BATCH...
|
||||
try
|
||||
{
|
||||
DataLayer.man.taBL.createPartValBatch(memLayer.ML.CRS("cadBaseBath"));
|
||||
// eventualmente mando primo batch da validare...
|
||||
bool newValidSent = ComLib.sendFirstValidationBatch();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// update!
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
protected void lbtRevalidate_Click(object sender, EventArgs e)
|
||||
{
|
||||
// rimetto da validare tramite stored
|
||||
try
|
||||
{
|
||||
DataLayer.man.taBL.resetPartUnValid(memLayer.ML.CRS("cadBaseBath"));
|
||||
// eventualmente mando primo batch da validare...
|
||||
bool newValidSent = ComLib.sendFirstValidationBatch();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// update!
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
private void doUpdate()
|
||||
{
|
||||
frmView.DataBind();
|
||||
raiseEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 NKC_WF.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_validationSummary
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtRevalidate.
|
||||
/// </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 lbtRevalidate;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtValidateMissing.
|
||||
/// </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 lbtValidateMissing;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo frmView.
|
||||
/// </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.FormView frmView;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user