This commit is contained in:
zaccaria.majid
2023-11-08 08:56:09 +01:00
3 changed files with 27 additions and 20 deletions
+11 -6
View File
@@ -164,12 +164,17 @@
</div>
<div class="col-12 col-sm-6">
<SelTempoMSMC TempoMC="@tcRichAttr" modoControllo="SelTempoMSMC.timeControlMode.selettori" E_TCRich="SaveTCRich"></SelTempoMSMC>
<select class="form-select" @bind="PzPallet">
@for (int i = 1; i <= 20; i++)
{
<option value="@i">@i</option>
}
</select>
<div class="input-group">
<div class="input-group-text">
Pz Pallet
</div>
<select class="form-select" @bind="PzPallet">
@for (int i = 1; i <= 20; i++)
{
<option value="@i">@i</option>
}
</select>
</div>
</div>
}
+4 -4
View File
@@ -147,7 +147,7 @@ namespace MP_TAB_SERV.Components
await ReloadData(false);
}
protected void SaveTCRich(double newTCRich)
protected void SaveTCRich(decimal newTCRich)
{
tcRichAttr = newTCRich;
}
@@ -243,7 +243,7 @@ namespace MP_TAB_SERV.Components
// se vedesse TCRich a zero lo reimposta a quello assegnato...
if (tcRichAttr == 0)
{
tcRichAttr = (double)currPodl.Tcassegnato;
tcRichAttr = currPodl.Tcassegnato;
}
if (enableSplitODL)
{
@@ -450,7 +450,7 @@ namespace MP_TAB_SERV.Components
private bool showAll = false;
private bool showOdlDetail = false;
private double tcRichAttr = 1;
private decimal tcRichAttr = 1;
#endregion Private Fields
@@ -590,7 +590,7 @@ namespace MP_TAB_SERV.Components
if (IdxPOdlSel != lastIdxPOdl)
{
lastIdxPOdl = IdxPOdlSel;
tcRichAttr = (double)currPodl.Tcassegnato;
tcRichAttr = currPodl.Tcassegnato;
}
}
}
+12 -10
View File
@@ -47,7 +47,7 @@ namespace MP_TAB_SERV.Components
[Parameter]
public EventCallback<double> E_TCRich { get; set; }
public EventCallback<decimal> E_TCRich { get; set; }
/// <summary>
/// modalità rendering controllo
@@ -67,7 +67,7 @@ namespace MP_TAB_SERV.Components
/// Valore tempo (centesimale)
/// </summary>
[Parameter]
public double TempoMC
public decimal TempoMC
{
get => _tempoMC;
set
@@ -84,7 +84,7 @@ namespace MP_TAB_SERV.Components
/// <summary>
/// tempo min.cent
/// </summary>
protected double _tempoMC { get; set; } = 0;
protected decimal _tempoMC { get; set; } = 0;
//protected timeMode modoTempo
//{
@@ -109,7 +109,7 @@ namespace MP_TAB_SERV.Components
[Inject]
protected SharedMemService SMServ { get; set; } = null!;
[Inject]
protected MessageService MsgServ { get; set; } = null!;
protected MessageService MsgServ { get; set; } = null!;
protected string tcMode
{
@@ -141,9 +141,9 @@ namespace MP_TAB_SERV.Components
/// </summary>
/// <param name="valore"></param>
/// <returns></returns>
protected TimeSpan minCent2Sec(double valore)
protected TimeSpan minCent2Sec(decimal valore)
{
TimeSpan answ = TimeSpan.FromMinutes(valore);
TimeSpan answ = TimeSpan.FromSeconds((double)valore * 60);
return answ;
}
@@ -152,9 +152,11 @@ namespace MP_TAB_SERV.Components
/// </summary>
/// <param name="valore"></param>
/// <returns></returns>
protected double minSec2Cent(TimeSpan valore)
protected decimal minSec2Cent(TimeSpan valore)
{
double answ = Math.Round(valore.TotalMinutes, 3);
decimal answ = 0;
decimal.TryParse($"{Math.Floor(valore.TotalMinutes) + (double)valore.Seconds / 60}", out answ);
return answ;
}
@@ -241,8 +243,8 @@ namespace MP_TAB_SERV.Components
{
if (tcMode == "mc")
{
double tMC = 1;
double.TryParse(value, out tMC);
decimal tMC = 1;
decimal.TryParse(value, out tMC);
TempoMC = tMC;
}
else