Aggancio filtro x keyrichiesta
This commit is contained in:
@@ -1,33 +1,30 @@
|
||||
@using MP.Stats.Components
|
||||
@using MP.Stats.Data
|
||||
|
||||
<EditForm Model="@SelFilter">
|
||||
<EditForm Model="@SelFilter">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="dtInizio" class="small">inizio:</label>
|
||||
<InputDateTime id="dtInizio" class="form-control form-control-sm" @bind-Value="@DateStart"></InputDateTime>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="dtFine" class="small">fine:</label>
|
||||
<InputDateTime id="dtFine" class="form-control form-control-sm" @bind-Value="@DateEnd"></InputDateTime>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="idxMacc" class="small">macchina:</label>
|
||||
<input id="idxMacc" class="form-control form-control-sm" @bind="@IdxMacchina" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="idxODL" class="small">ODL:</label>
|
||||
<InputNumber id="idxODL" class="form-control form-control-sm" @bind-Value="@IdxODL"></InputNumber>
|
||||
<label for="keyRich" class="small">commessa:</label>
|
||||
<input id="keyRich" class="form-control form-control-sm" @bind="@KeyRichiesta" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="col">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="CodArt" class="small">articolo:</label>
|
||||
@@ -35,101 +32,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
|
||||
@code {
|
||||
|
||||
protected DateTime DateStart
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.DateStart;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool doReport = (!SelFilter.DateStart.Equals(value));
|
||||
SelFilter.DateStart = value;
|
||||
if (doReport)
|
||||
{
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
protected DateTime DateEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.DateEnd;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool doReport = (!SelFilter.DateEnd.Equals(value));
|
||||
SelFilter.DateEnd = value;
|
||||
if (doReport)
|
||||
{
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string IdxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.IdxMacchina;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool doReport = (!SelFilter.IdxMacchina.Equals(value));
|
||||
SelFilter.IdxMacchina = value;
|
||||
if (doReport)
|
||||
{
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
protected int IdxODL
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.IdxOdl;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool doReport = (!SelFilter.IdxOdl.Equals(value));
|
||||
SelFilter.IdxOdl = value;
|
||||
if (doReport)
|
||||
{
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string CodArticolo
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.CodArticolo;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool doReport = (!SelFilter.CodArticolo.Equals(value));
|
||||
SelFilter.CodArticolo = value;
|
||||
if (doReport)
|
||||
{
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public SelectData SelFilter { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<SelectData> filterChanged { get; set; }
|
||||
|
||||
private void reportChange()
|
||||
{
|
||||
filterChanged.InvokeAsync(SelFilter);
|
||||
}
|
||||
}
|
||||
</EditForm>
|
||||
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Stats.Components;
|
||||
using MP.Stats.Data;
|
||||
|
||||
namespace MP.Stats.Components
|
||||
{
|
||||
public partial class SelectionFilter
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected string CodArticolo
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.CodArticolo;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool doReport = (!SelFilter.CodArticolo.Equals(value));
|
||||
SelFilter.CodArticolo = value;
|
||||
if (doReport)
|
||||
{
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected DateTime DateEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.DateEnd;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool doReport = (!SelFilter.DateEnd.Equals(value));
|
||||
SelFilter.DateEnd = value;
|
||||
if (doReport)
|
||||
{
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected DateTime DateStart
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.DateStart;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool doReport = (!SelFilter.DateStart.Equals(value));
|
||||
SelFilter.DateStart = value;
|
||||
if (doReport)
|
||||
{
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string IdxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.IdxMacchina;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool doReport = (!SelFilter.IdxMacchina.Equals(value));
|
||||
SelFilter.IdxMacchina = value;
|
||||
if (doReport)
|
||||
{
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string KeyRichiesta
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelFilter.KeyRichiesta;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool doReport = (!SelFilter.KeyRichiesta.Equals(value));
|
||||
SelFilter.KeyRichiesta = value;
|
||||
if (doReport)
|
||||
{
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<SelectData> filterChanged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public SelectData SelFilter { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void reportChange()
|
||||
{
|
||||
filterChanged.InvokeAsync(SelFilter);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user