fix: fallback to Categoria when natixis=true but Nome is empty
This commit is contained in:
@@ -92,7 +92,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
|
||||
const float bidW = 70f;
|
||||
const float askW = 70f;
|
||||
|
||||
string tipologia = showNatixis ? info.Nome : info.Categoria;
|
||||
string tipologia = showNatixis && !string.IsNullOrEmpty(info.Nome) ? info.Nome : info.Categoria;
|
||||
bool showTip = !string.IsNullOrEmpty(tipologia);
|
||||
bool showData = !string.IsNullOrEmpty(info.LastPriceDate);
|
||||
bool showBidAsk = !string.IsNullOrEmpty(info.Bid) && !string.IsNullOrEmpty(info.Ask);
|
||||
|
||||
@@ -83,7 +83,7 @@ public class ExpiredAnagraficaSectionRenderer : IPdfSectionRenderer
|
||||
|
||||
// Solo box Tipologia, niente Data/Bid/Ask
|
||||
const float boxH = 28f;
|
||||
string tipologia = showNatixis ? info.Nome : info.Categoria;
|
||||
string tipologia = showNatixis && !string.IsNullOrEmpty(info.Nome) ? info.Nome : info.Categoria;
|
||||
if (!string.IsNullOrEmpty(tipologia))
|
||||
{
|
||||
DrawInfoBox(g, 0, y, w, boxH,
|
||||
|
||||
Reference in New Issue
Block a user