Exemplo n.º 1
0
 private static DateTime GetFirstMaxHour(LineUp lineUp)
 {
     foreach (Stage stage in Stages)
     {
         foreach (Optreden optreden in stage.Performances)
         {
             if (optreden.LineUp == lineUp)
             {
                 return(optreden.Until);
             }
         }
     }
     return(DateTime.Now);
 }
Exemplo n.º 2
0
        public static DateTime GetMaxHourByLineUp(LineUp lineUp)
        {
            if (Stages.Count <= 0)
            {
                return(DateTime.Now);
            }
            DateTime max = GetFirstMaxHour(lineUp);

            foreach (Stage stage in Stages)
            {
                foreach (Optreden optreden in stage.Performances)
                {
                    if (optreden.LineUp == lineUp && optreden.Until > max)
                    {
                        max = optreden.Until;
                    }
                }
            }
            //DateTime min = Stages[0].MinHour;
            //foreach (Stage stage in Stages)
            //    if (stage.MinHour < min) min = stage.MinHour;

            return(new DateTime(max.Year, max.Month, max.Day, max.Hour, 0, 0).AddHours(1));
        }
Exemplo n.º 3
0
        public static DateTime GetMinHourByLineUp(LineUp lineUp)
        {
            if (Stages.Count <= 0)
            {
                return(DateTime.Now);
            }
            DateTime min = GetFirstMinHour(lineUp);

            foreach (Stage stage in Stages)
            {
                foreach (Optreden optreden in stage.Performances)
                {
                    if (optreden.LineUp == lineUp && optreden.From < min)
                    {
                        min = optreden.From;
                    }
                }
            }
            //DateTime min = Stages[0].MinHour;
            //foreach (Stage stage in Stages)
            //    if (stage.MinHour < min) min = stage.MinHour;

            return(new DateTime(min.Year, min.Month, min.Day, min.Hour, 0, 0));
        }