{Environment.NewLine}";
htmlText += $"| {(i + 1).ToPersianNumbers()} | {Environment.NewLine}";
- string rhythm = rhythmsCoupletCounts[i].GanjoorMetreId == null ? "وزنیابی نشده" :
- $" r.Id == rhythmsCoupletCounts[i].GanjoorMetreId).Single().Rhythm)}\">{rhythms.Where(r => r.Id == rhythmsCoupletCounts[i].GanjoorMetreId).Single().Rhythm}";
- htmlText += $"{rhythm} | {Environment.NewLine}";
+ var rhythm = rhythms.Where(r => r.Id == rhythmsCoupletCounts[i].GanjoorMetreId).Single();
+ rhythm.VerseCount = rhythmsCoupletCounts.Count;
+ context.Update(rhythm);
+
+ string rhythmName = rhythmsCoupletCounts[i].GanjoorMetreId == null ? "وزنیابی نشده" :
+ $"{rhythms.Where(r => r.Id == rhythmsCoupletCounts[i].GanjoorMetreId).Single().Rhythm}";
+ htmlText += $"{rhythmName} | {Environment.NewLine}";
htmlText += $"{LanguageUtils.FormatMoney(rhythmsCoupletCounts[i].Count)} | {Environment.NewLine}";
htmlText += $"{(rhythmsCoupletCounts[i].Count * 100.0 / sumRhythmsCouplets).ToString("N2", new CultureInfo("fa-IR")).ToPersianNumbers()} | {Environment.NewLine}";
@@ -222,6 +226,8 @@ namespace RMuseum.Services.Implementation
}
htmlText += $"{Environment.NewLine}";
+ await context.SaveChangesAsync();//store rhythm[s].VerseCount
+
await _UpdatePageHtmlText(context, editingUserId, dbPage, "به روزرسانی خودکار صفحهٔ آمار وزنها", htmlText);
foreach (var poetInfo in poetsCoupletCounts)