feat: add Memoria field to Analisi and natixis support to AnagraficaSectionRenderer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
|
||||
float y = 0f;
|
||||
|
||||
// ── TITOLO ────────────────────────────────────────────────────
|
||||
y = DrawTitle(g, info, PageW, y);
|
||||
y = DrawTitle(g, info, PageW, y, data.ShowNatixis);
|
||||
|
||||
// ── SEZIONE A: CARATTERISTICHE PRODOTTO ───────────────────────
|
||||
y = DrawSectionLabel(g, "Caratteristiche Prodotto", y);
|
||||
@@ -71,7 +71,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
|
||||
// TITOLO centrato + riga box informativi (Tipologia/Data/Bid/Ask)
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
|
||||
private float DrawTitle(PdfGraphics g, CertificateInfo info, float w, float y)
|
||||
private float DrawTitle(PdfGraphics g, CertificateInfo info, float w, float y, bool showNatixis)
|
||||
{
|
||||
// ── Titolo centrato ──────────────────────────────────────────
|
||||
g.DrawString($"Scheda Prodotto {info.Isin}",
|
||||
@@ -92,7 +92,8 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
|
||||
const float bidW = 70f;
|
||||
const float askW = 70f;
|
||||
|
||||
bool showTip = !string.IsNullOrEmpty(info.Categoria);
|
||||
string tipologia = showNatixis ? 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);
|
||||
|
||||
@@ -107,7 +108,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
|
||||
if (showTip)
|
||||
{
|
||||
DrawInfoBox(g, xCursor, y, tipW, boxH,
|
||||
"TIPOLOGIA", info.Categoria,
|
||||
"TIPOLOGIA", tipologia,
|
||||
PdfTheme.BoxLightBlueBgBrush, PdfTheme.AccentBlueBrush,
|
||||
PdfTheme.AccentBlueBrush, PdfTheme.AccentBlueDarkBrush,
|
||||
PdfTheme.Bold);
|
||||
@@ -325,6 +326,7 @@ public class AnagraficaSectionRenderer : IPdfSectionRenderer
|
||||
("Tipo Barriera", info.BarrierType ?? "-"),
|
||||
("Tipo Basket", info.BasketType ?? "-"),
|
||||
("Leva", string.IsNullOrWhiteSpace(info.Leva) ? "—" : info.Leva),
|
||||
("Memoria", string.IsNullOrWhiteSpace(info.Memory) ? "—" : info.Memory),
|
||||
};
|
||||
|
||||
var rightItems = new (string Label, string Value)[]
|
||||
|
||||
Reference in New Issue
Block a user