public CSDirectionCollection CollectCSDirectionsForThisDirectionalDisplay(string directionaldisplayid) { try { Console.WriteLine(DateTime.Now.ToShortTimeString() + " " + "Collect Directions"); InitDB(); CSDirectionCollection scrc = new CSDirectionCollection(); CSDirectionCollection tmpscrc = new CSDirectionCollection(); tmpscrc.LoadAll(); foreach (CSDirection item in tmpscrc) { if (item.Directionalscreenname.ToLower() == directionaldisplayid.ToLower()) { scrc.Add(item); } } //Console.WriteLine(DateTime.Now.ToShortTimeString()+" "+"LOAD_ALL"); return scrc; } catch (Exception ex) { Console.WriteLine(DateTime.Now.ToShortTimeString() + " " + ex.Message); return null; } }
public CSDirectionCollection CollectCSDirections() { try { Console.WriteLine(DateTime.Now.ToShortTimeString()+" "+"Collect Directions"); InitDB(); CSDirectionCollection scrc = new CSDirectionCollection(); scrc.LoadAll(); //Console.WriteLine(DateTime.Now.ToShortTimeString()+" "+"LOAD_ALL"); return scrc; } catch (Exception ex) { Console.WriteLine(DateTime.Now.ToShortTimeString()+" "+ex.Message); return null; } }