Exemplo n.º 1
0
        public static String[] GetAllMarkersByDateRange(String StartDate, String EndDate)
        {
            DataObjects.Toolset Tools      = new DataObjects.Toolset();
            NodaTime.LocalDate  ZStartDate = Tools.StringToNodaDate(StartDate);
            NodaTime.LocalDate  ZEndDate   = Tools.StringToNodaDate(EndDate);
            using (DataAccessClass.DataAccessClass TheDatabase = new DataAccessClass.DataAccessClass())
            {
                MasterZombieList = TheDatabase.GetAllZombiesByDateRange(ZStartDate, ZEndDate);
            }
            String[] ZombieArray = Tools.ConvertZombieListToStringArray(MasterZombieList);

            return(ZombieArray);
        }
Exemplo n.º 2
0
        public static int CreateMarker(String Name, Double Elevation, String Date, int Serial, String ContactType, Double Lat, Double Long)
        {
            //We are going to have to some syntax acrobatics to get the Zombie in the database.
            //Lets try to figure the date out

            DataObjects.Toolset Tools = new DataObjects.Toolset();

            NodaTime.LocalDate           D   = Tools.StringToNodaDate(Date);
            GeoEngine_Workspace.Location Loc = new GeoEngine_Workspace.Location(Lat, Long, Elevation);
            Loc.SetDate(D.Year, D.Month, D.Day);

            DataObjects.Zombie Z = new DataObjects.Zombie(Loc, Name, DataObjects.Zombie.ZType.Slow);
            Z.SetZType(ContactType);
            DataObjects.Zombie ReturnZombie = new DataObjects.Zombie();
            using (DataAccessClass.DataAccessClass TheDatabase = new DataAccessClass.DataAccessClass())
            {
                ReturnZombie = TheDatabase.InsertZombie(Z);
            }
            return(ReturnZombie.ZombieSerialNumber);
        }