пробуем
This commit is contained in:
parent
749e808be5
commit
123f52e912
29
Program.cs
29
Program.cs
@ -575,12 +575,12 @@ class Program
|
||||
string status = reader.GetString(2);
|
||||
string priority = reader.GetString(3);
|
||||
string statusEmoji = GetStatusEmoji(status);
|
||||
string priorityMarker = priority.ToLower() == "высокий" ? "⚠️" : "";
|
||||
string priorityMarker = priority.ToLower() == "высокий" ? "⚠️ " : "";
|
||||
|
||||
buttons.Add(new[]
|
||||
{
|
||||
InlineKeyboardButton.WithCallbackData(
|
||||
$"{priorityMarker} #{id} - {statusEmoji} {status} - {description}...",
|
||||
$"{priorityMarker}#{id} - {statusEmoji} {status} - {description}...",
|
||||
$"report_{id}")
|
||||
});
|
||||
}
|
||||
@ -594,10 +594,10 @@ class Program
|
||||
});
|
||||
|
||||
await botClient.SendMessage(
|
||||
chatId: chatId,
|
||||
text: "Список заявок:",
|
||||
replyMarkup: new InlineKeyboardMarkup(buttons)
|
||||
);
|
||||
chatId: chatId,
|
||||
text: "Список заявок:",
|
||||
replyMarkup: new InlineKeyboardMarkup(buttons)
|
||||
);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -607,6 +607,8 @@ class Program
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static async Task ViewArchivedReports(ITelegramBotClient botClient, long chatId)
|
||||
{
|
||||
string connectionString = "Data Source=bot.db";
|
||||
@ -630,12 +632,12 @@ class Program
|
||||
string status = reader.GetString(2);
|
||||
string priority = reader.GetString(3);
|
||||
string statusEmoji = GetStatusEmoji(status);
|
||||
string priorityMarker = priority.ToLower() == "высокий" ? "⚠️" : "";
|
||||
string priorityMarker = priority.ToLower() == "высокий" ? "⚠️ " : "";
|
||||
|
||||
buttons.Add(new[]
|
||||
{
|
||||
InlineKeyboardButton.WithCallbackData(
|
||||
$"{priorityMarker} #{id} - {statusEmoji} {status} - {description}...",
|
||||
$"{priorityMarker}#{id} - {statusEmoji} {status} - {description}...",
|
||||
$"report_{id}")
|
||||
});
|
||||
}
|
||||
@ -649,16 +651,17 @@ class Program
|
||||
});
|
||||
|
||||
await botClient.SendMessage(
|
||||
chatId: chatId,
|
||||
text: "Архив заявок:",
|
||||
replyMarkup: new InlineKeyboardMarkup(buttons)
|
||||
);
|
||||
chatId: chatId,
|
||||
text: "Архив заявок:",
|
||||
replyMarkup: new InlineKeyboardMarkup(buttons)
|
||||
);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error($"Ошибка: {ex.Message}");
|
||||
await botClient.SendMessage(chatId, "Ошибка при получении архива заявок");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -668,6 +671,8 @@ class Program
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private static async Task ShowReportDetails(ITelegramBotClient botClient, long chatId, long reportId, int messageId)
|
||||
{
|
||||
try
|
||||
|
Loading…
x
Reference in New Issue
Block a user