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; } } }
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(); }
public List <TimeTable> GetTimeForAMonth(int year, int month) { return(TimeTables.Where(t => t.Date.Year == year && t.Date.Month == month).ToList()); }
public double Read_TimeByDate(DateTime dt) { var planTime = TimeTables.Where(t => t.Date == dt).Select(t => t.PlanningTime).FirstOrDefault(); return(planTime); }