fix: change current culture to russian for import
This commit is contained in:
parent
5bc729eb66
commit
3279ef594b
@ -79,6 +79,8 @@ public class ImportController(IMediator mediator, IOptionsSnapshot<GeneralConfig
|
||||
|
||||
var pairsDictionary = config.Value.ScheduleSettings!.PairPeriod;
|
||||
|
||||
var ruCulture = new CultureInfo("ru-RU");
|
||||
|
||||
foreach (var dto in result.GroupBy(s => new
|
||||
{
|
||||
s.DayOfWeek,
|
||||
@ -109,7 +111,7 @@ public class ImportController(IMediator mediator, IOptionsSnapshot<GeneralConfig
|
||||
{
|
||||
// День
|
||||
worksheet.Cells[row, col++].Value =
|
||||
$"{(int)dto.DayOfWeek} [{CultureInfo.CurrentCulture.DateTimeFormat.GetAbbreviatedDayName(dto.DayOfWeek).ToUpper()}]";
|
||||
$"{(int)dto.DayOfWeek} [{ruCulture.DateTimeFormat.GetAbbreviatedDayName(dto.DayOfWeek).ToUpper()}]";
|
||||
|
||||
// Пара
|
||||
worksheet.Cells[row, col++].Value = dto.PairNumber + " п";
|
||||
@ -118,7 +120,7 @@ public class ImportController(IMediator mediator, IOptionsSnapshot<GeneralConfig
|
||||
worksheet.Cells[row, col++].Value = $"[{(dto.IsEven ? 2 : 1)}] {(dto.IsEven ? "Четная" : "Нечетная")}";
|
||||
|
||||
// Время
|
||||
worksheet.Cells[row, col++].Value = pairsDictionary[dto.PairNumber].Start.ToString(CultureInfo.CurrentCulture);
|
||||
worksheet.Cells[row, col++].Value = pairsDictionary[dto.PairNumber].Start.ToString(ruCulture);
|
||||
|
||||
// Группа
|
||||
worksheet.Cells[row, col].Style.WrapText = true;
|
||||
|
Loading…
Reference in New Issue
Block a user