Beispiel #1
0
        public List <Coordinate> FallingByDate(DateTime dt)
        {
            List <Coordinate> myL = new List <Coordinate>();

            foreach (var v in FactoryBl.GetBL().GetAllFalling().ToArray())
            {
                if (v.DateFalling.ToShortDateString() == dt.ToShortDateString())
                {
                    myL.Add(new Coordinate(v.CoordinateF.Latitude, v.CoordinateF.Longitude));
                }
            }
            return(myL);
        }
Beispiel #2
0
        public List <Coordinate> GetFallingsByDateOrCity(String date)
        {
            List <Coordinate> reportL = new List <Coordinate>();

            if (date[3] == 0 || date[3] == 1)
            {
                foreach (var v in FactoryBl.GetBL().GetAllFalling())
                {
                    if (v.DateFalling.Year == 2000 + int.Parse(date[6].ToString()) * 10 + int.Parse(date[7].ToString()))
                    {
                        if (v.DateFalling.Month == int.Parse(date[3].ToString()) * 10 + int.Parse(date[4].ToString()))
                        {
                            if (v.DateFalling.Day == int.Parse(date[0].ToString()) * 10 + int.Parse(date[1].ToString()))
                            {
                                reportL.Add(new Coordinate(v.CoordinateF.Latitude, v.CoordinateF.Longitude));
                            }
                        }
                    }
                }
            }
            else
            {
                DateTime my = FactoryBl.GetBL().ChangeDateToNumber(date);
                foreach (var v in FactoryBl.GetBL().GetAllFalling())
                {
                    if (v.DateFalling.Year == my.Year)
                    {
                        if (v.DateFalling.Month == my.Month)
                        {
                            if (v.DateFalling.Day == my.Day)
                            {
                                reportL.Add(new Coordinate(v.CoordinateF.Latitude, v.CoordinateF.Longitude));
                            }
                        }
                    }
                }
            }
            return(reportL);   // = reportL;
        }