Exemple #1
0
        public static List <TimespamView> Get_ArrayOfTimes(DateTime currentDate, TimeSpan start, TimeSpan end, Double duration, string name)
        {
            List <TimespamView> times = new List <TimespamView>();

            currentDate = Fwk.HelperFunctions.DateFunctions.GetStartDateTime(currentDate);
            TimeSpan     t = start;
            TimespamView wTimespamView;

            while (true)
            {
                wTimespamView             = new TimespamView();
                wTimespamView.Time        = t;
                wTimespamView.Description = name;
                times.Add(wTimespamView);
                if ((end - t).TotalMinutes >= 0)
                {
                    t = t.Add(TimeSpan.FromMinutes(duration));
                }
                else
                {
                    break;
                }
            }
            return(times);
        }
 public static List<TimespamView> Get_ArrayOfTimes(DateTime currentDate,TimeSpan start ,TimeSpan end,Double duration,string name)
 {
     List<TimespamView> times = new List<TimespamView>();
     currentDate = Fwk.HelperFunctions.DateFunctions.GetStartDateTime(currentDate);
     TimeSpan t = start;
     TimespamView wTimespamView;
     while (true)
     {
         wTimespamView = new TimespamView();
         wTimespamView.Time = t;
         wTimespamView.Description = name;
         times.Add(wTimespamView);
         if ((end - t).TotalMinutes >= 0)
             t = t.Add(TimeSpan.FromMinutes(duration));
         else
             break;
     }
     return times;
 }