public override void Execute(Update update, TelegramBotClient client, Exception e = null)
        {
            var Message = update.Message ?? update.CallbackQuery.Message;

            DataBaseHelper db = new DataBaseHelper();

            var eventList = db.GetAllEvents();
            var events    = InlineKeyBoardHelper.CreateInlineKeyboardButtonForMyEvents(eventList, eventList.Count / 10);

            client.SendTextMessageAsync(Message.Chat.Id, "События:", parseMode: default, false, false, 0, events);
Beispiel #2
0
        public override void Execute(Update update, TelegramBotClient client, Exception e = null)
        {
            var Message = update.Message ?? update.CallbackQuery.Message;

            DataBaseHelper db        = new DataBaseHelper();
            var            eventList = db.GetUserEvents(Message.Chat.Id, 0);

            if (eventList.Count != 0)
            {
                var events = InlineKeyBoardHelper.CreateInlineKeyboardButtonForFutureEvents(eventList, eventList.Count / 10);

                client.SendTextMessageAsync(Message.Chat.Id, "Список событий, на которые вы записаны:", parseMode: default, false, false, 0, events);