bug fix
This commit is contained in:
parent
2358aa4937
commit
10a25e1931
@ -997,13 +997,34 @@ namespace RMuseum.Services.Implementation
|
||||
foreach (var section in pair.Item1)
|
||||
{
|
||||
var verses = await context.GanjoorVerses.AsNoTracking().Where(v => v.PoemId == section.PoemId && v.SectionIndex1 == section.Index).OrderBy(v => v.VOrder).Take(2).ToListAsync();
|
||||
html += $"<p><a href=\"{section.Poem.FullUrl}\">{section.Poem.FullTitle}</a>:{verses[0].Text} - {verses[1].Text}</p>{Environment.NewLine}";
|
||||
if(verses.Any())
|
||||
{
|
||||
if(verses.Count > 1)
|
||||
{
|
||||
html += $"<p><a href=\"{section.Poem.FullUrl}\">{section.Poem.FullTitle}</a>:{verses[0].Text} - {verses[1].Text}</p>{Environment.NewLine}";
|
||||
}
|
||||
else
|
||||
{
|
||||
html += $"<p><a href=\"{section.Poem.FullUrl}\">{section.Poem.FullTitle}</a>:{verses[0].Text}</p>{Environment.NewLine}";
|
||||
}
|
||||
}
|
||||
}
|
||||
html += $"<br style=\"clear:both;\">{Environment.NewLine}";
|
||||
foreach (var section in pair.Item2)
|
||||
{
|
||||
var verses = await context.GanjoorVerses.AsNoTracking().Where(v => v.PoemId == section.PoemId && v.SectionIndex1 == section.Index).OrderBy(v => v.VOrder).Take(2).ToListAsync();
|
||||
html += $"<p><a href=\"{section.Poem.FullUrl}\">{section.Poem.FullTitle}</a>:{verses[0].Text} - {verses[1].Text}</p>{Environment.NewLine}";
|
||||
if(verses.Any())
|
||||
{
|
||||
if(verses.Count > 1)
|
||||
{
|
||||
html += $"<p><a href=\"{section.Poem.FullUrl}\">{section.Poem.FullTitle}</a>:{verses[0].Text} - {verses[1].Text}</p>{Environment.NewLine}";
|
||||
}
|
||||
else
|
||||
{
|
||||
html += $"<p><a href=\"{section.Poem.FullUrl}\">{section.Poem.FullTitle}</a>:{verses[0].Text}</p>{Environment.NewLine}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
html += $"<hr />{Environment.NewLine}";
|
||||
html += $"</li>{Environment.NewLine}";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user