еще раз
This commit is contained in:
parent
a8fa6c5082
commit
c414e5f00c
20
Program.cs
20
Program.cs
@ -580,10 +580,11 @@ class Program
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Сортируем заявки по приоритету
|
// Сортируем заявки по приоритету
|
||||||
var sortedReports = reports.OrderByDescending(r => r.Priority == "высокий")
|
var highPriorityReports = reports.Where(r => r.Priority.ToLower() == "высокий").ToList();
|
||||||
.ThenByDescending(r => r.Priority == "средний")
|
var mediumPriorityReports = reports.Where(r => r.Priority.ToLower() == "средний").ToList();
|
||||||
.ThenByDescending(r => r.Priority == "низкий")
|
var lowPriorityReports = reports.Where(r => r.Priority.ToLower() == "низкий").ToList();
|
||||||
.ToList();
|
|
||||||
|
var sortedReports = highPriorityReports.Concat(mediumPriorityReports).Concat(lowPriorityReports).ToList();
|
||||||
|
|
||||||
var buttons = new List<InlineKeyboardButton[]>();
|
var buttons = new List<InlineKeyboardButton[]>();
|
||||||
|
|
||||||
@ -627,6 +628,7 @@ class Program
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static async Task ViewArchivedReports(ITelegramBotClient botClient, long chatId)
|
private static async Task ViewArchivedReports(ITelegramBotClient botClient, long chatId)
|
||||||
{
|
{
|
||||||
string connectionString = "Data Source=bot.db";
|
string connectionString = "Data Source=bot.db";
|
||||||
@ -655,10 +657,11 @@ class Program
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Сортируем заявки по приоритету
|
// Сортируем заявки по приоритету
|
||||||
var sortedReports = reports.OrderByDescending(r => r.Priority == "высокий")
|
var highPriorityReports = reports.Where(r => r.Priority.ToLower() == "высокий").ToList();
|
||||||
.ThenByDescending(r => r.Priority == "средний")
|
var mediumPriorityReports = reports.Where(r => r.Priority.ToLower() == "средний").ToList();
|
||||||
.ThenByDescending(r => r.Priority == "низкий")
|
var lowPriorityReports = reports.Where(r => r.Priority.ToLower() == "низкий").ToList();
|
||||||
.ToList();
|
|
||||||
|
var sortedReports = highPriorityReports.Concat(mediumPriorityReports).Concat(lowPriorityReports).ToList();
|
||||||
|
|
||||||
var buttons = new List<InlineKeyboardButton[]>();
|
var buttons = new List<InlineKeyboardButton[]>();
|
||||||
|
|
||||||
@ -701,6 +704,7 @@ class Program
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static async Task ShowReportDetails(ITelegramBotClient botClient, long chatId, long reportId, int messageId)
|
private static async Task ShowReportDetails(ITelegramBotClient botClient, long chatId, long reportId, int messageId)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
Loading…
x
Reference in New Issue
Block a user