Exemplo n.º 1
0
        public static TimeSpan GetFinishTime(TimeSpan startTime, LessonDuration lessonsDuration)
        {
            switch (lessonsDuration)
            {
            case LessonDuration.OneHour:
                return(startTime.Add(new TimeSpan(1, 0, 0)));

            case LessonDuration.OneAndHalf:
                return(startTime.Add(new TimeSpan(1, 30, 0)));

            case LessonDuration.TwoHour:
                return(startTime.Add(new TimeSpan(2, 0, 0)));

            default:
                throw new ArgumentException();
            }
        }
Exemplo n.º 2
0
 public static DateTime GetFinishDateTime(DateTime startTime, LessonDuration lessonsDuration)
 {
     return(startTime.Date + GetFinishTime(startTime.TimeOfDay, lessonsDuration));
 }
 public void Update(LessonDuration lessonDuration)
 {
     throw new NotImplementedException();
 }
 public bool isExist(LessonDuration lessonDuration)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 private Decimal?_GetLessonPrice(Dictionary <LessonDuration, Decimal> priceList, LessonDuration lessonsDuration)
 {
     if (priceList.TryGetValue(lessonsDuration, out Decimal value))
     {
         return(value);
     }
     return(null);
 }