Beispiel #1
0
        public static String GetAppropriateMessage(DyanaWorkHour wh)
        {
            if (Math.Abs(wh.TotalHours) == Math.Abs(wh.ResponsibilityHours))
            {
                return("It's time to go home :)");
            }
            if (wh.TotalHours < wh.ResponsibilityHours)
            {
                return($"Oy! Work more! should be at {wh.EndOfResponsibility.ToString("HH:mm")}");
            }
            if (wh.TotalHours > wh.ResponsibilityHours && wh.TotalHours > wh.ResponsibilityHours + 1)
            {
                return($"Overtimeeee by {wh.TotalHours-wh.ResponsibilityHours}h {wh.TotalMins}m Waaaaaaattttt...");
            }

            return("Just go home already!");
        }
Beispiel #2
0
        public static String GetAppropriateMessage(String arriveTime, String departTime, String workHour, String breakHour)
        {
            DyanaWorkHour wh = CalculateWorkHours(arriveTime, departTime, workHour, breakHour);

            return(GetAppropriateMessage(wh));
        }