public List<Accident> GetListByDay(DateTime Date, int DeviceNr)
 {
     //List<Accident> L1 = new List<Accident>();
     //return L1;
     Statistics stat1 = new Statistics();
     return stat1.getListByDateFromDB(Date, DeviceNr);
 }
 public void ShowGraph(List<Day> Days)
 {
     Statistics stats = new Statistics();
     stats.GraphStat(Days);
 }
 public List<Day> GetDayAccidents(DateTime selectStart, DateTime selectEnd, int DeviceNr)
 {
     stat = new Statistics();
     return stat.getAccidentDaysFromDB(selectStart, selectEnd, DeviceNr);
 }
        public List<AccidentDTO> GetSatisticBasedOnUser(int ID, DateTime startdate, DateTime enddate)
        {
            Statistics ST = new Statistics();
            DateTime D1 = new DateTime();
            D1 = startdate;

            DateTime D2 = new DateTime();
            D2 = enddate;

                List<Accident> listofAccidents = ST.getFromDB(ID, D1, D2);
                return GetAccidents(listofAccidents);
        }