Пример #1
0
        public static Task SendEmployeeStatistics(this ITelegramBotClient bot, long chatId, string name,
                                                  CheckinDetails checkinDetails, CheckinStats checkinStats = null)
        {
            var direction = checkinDetails.Direction == CheckinDirection.In ? "entering" : "leaving";

            return(bot.SendTextMessageAsync(chatId,
                                            $"Employee *{name}* was last seen *{direction.ToUpperInvariant()}* _{checkinDetails.Area}_ at *{checkinDetails.TimeStampFormated}*" +
                                            (checkinStats == null ? "" : $"\nWorking time today *{checkinStats.WorkingTimeToday}*") +
                                            (checkinStats == null ? "" : $"\nTotal time today *{checkinStats.TimeWithTeleports}*") +
                                            (checkinStats?.FirstCheckinToday == null ? "" : $"\nFirst checkin today *{checkinStats.FirstCheckinFormated}*"),
                                            ParseMode.Markdown));
        }
Пример #2
0
 public ActionResult CheckIn(CheckinDetails checkinDetails)
 {
     return(View(checkinDetails));
 }