Ejemplo n.º 1
0
        public new void GetTimeTables(IGetTimeTablesHandler handler)
        {
            var timeTables = handler.GetUrlData($"{BaseUri}/{Abbreviation}/{GroupListUri}", Node, Attribute);

            foreach (var timeTable in timeTables)
            {
                var key = ExtractingPdfFromAttributeValue(timeTable.Key);
                foreach (var timeTableStoreEntry in TimeTables.Where(timeTableStoreEntry => key.Contains(timeTableStoreEntry.GroupUri)))
                {
                    timeTableStoreEntry.TimeTables.Add(key, timeTable.Value);
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        public void Update(DateTime dt, double tm)
        {
            var timeTable = TimeTables.Where(t => t.Date == dt).FirstOrDefault();

            if (timeTable == null)
            {
                timeTable      = new TimeTable();
                timeTable.Date = dt;
                //throw new ArgumentNullException("timeTable");
            }
            timeTable.PlanningTime = tm;
            ChangeTracker.DetectChanges();
            TimeTables.AddOrUpdate(timeTable);
            SaveChanges();
        }
Ejemplo n.º 3
0
 public List <TimeTable> GetTimeForAMonth(int year, int month)
 {
     return(TimeTables.Where(t => t.Date.Year == year && t.Date.Month == month).ToList());
 }
Ejemplo n.º 4
0
        public double Read_TimeByDate(DateTime dt)
        {
            var planTime = TimeTables.Where(t => t.Date == dt).Select(t => t.PlanningTime).FirstOrDefault();

            return(planTime);
        }