Update modalità recupero variety
This commit is contained in:
@@ -26,12 +26,21 @@ namespace EgwProxy.Icoel.Test
|
||||
|
||||
try
|
||||
{
|
||||
var varList = IcoelSizer.GetVarietyList();
|
||||
Console.WriteLine("---- TUTTE variety ----");
|
||||
var varList = IcoelSizer.GetVarietyList(false);
|
||||
var varietyData = IcoelSizer.GetLayoutForVarietyList(varList);
|
||||
if (varietyData != null)
|
||||
{
|
||||
DisplayVarietyLayout(varietyData);
|
||||
}
|
||||
// solo attive
|
||||
Console.WriteLine("---- solo attive ----");
|
||||
varList = IcoelSizer.GetVarietyList();
|
||||
varietyData = IcoelSizer.GetLayoutForVarietyList(varList);
|
||||
if (varietyData != null)
|
||||
{
|
||||
DisplayVarietyLayout(varietyData);
|
||||
}
|
||||
|
||||
var currBatch=IcoelSizer.GetCurrentBatch();
|
||||
foreach (var item in currBatch)
|
||||
|
||||
@@ -96,6 +96,14 @@ namespace EgwProxy.Icoel.Compac
|
||||
{
|
||||
return SSClient.GetActiveVarieties();
|
||||
}
|
||||
/// <summary>
|
||||
/// Elenco varietà (tutte)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
internal Variety[] GetAllVarieties()
|
||||
{
|
||||
return SSClient.GetAllVarieties();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera il batch corrente (se monolinea)
|
||||
|
||||
@@ -76,10 +76,11 @@ namespace EgwProxy.Icoel
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce elenco delel Variety
|
||||
/// Restituisce elenco delle Variety
|
||||
/// </summary>
|
||||
/// <param name="onlyActive">Solo attive (true) o tutte (false)</param>
|
||||
/// <returns></returns>
|
||||
public Variety[] GetVarietyList()
|
||||
public Variety[] GetVarietyList(bool onlyActive = true)
|
||||
{
|
||||
#if false
|
||||
//Client = new CompacClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
@@ -91,7 +92,14 @@ namespace EgwProxy.Icoel
|
||||
Variety[] varietiesList;
|
||||
using (var cClient = new ComClient(ipAddress, tcpPort))
|
||||
{
|
||||
varietiesList = Client.GetActiveVarieties();
|
||||
if (onlyActive)
|
||||
{
|
||||
varietiesList = cClient.GetActiveVarieties();
|
||||
}
|
||||
else
|
||||
{
|
||||
varietiesList = cClient.GetAllVarieties();
|
||||
}
|
||||
}
|
||||
#if false
|
||||
Client.Close();
|
||||
@@ -107,7 +115,7 @@ namespace EgwProxy.Icoel
|
||||
Client.VerificaEsistenzaGrower(Details.GrowerCode, Details.GrowerName);
|
||||
|
||||
// recupero varietà x selezione
|
||||
var varList = GetVarietyList();
|
||||
var varList = GetVarietyList(true);
|
||||
|
||||
int idxVar = -1;
|
||||
int idxLay = -1;
|
||||
|
||||
Reference in New Issue
Block a user