/// <summary> /// Date Coder Vers Notes /// 2020-01-18 Clay 1.0 Initial /// /// /// This is the biggie constructor without the Serial Number. /// Why would I need to different constructors. The answer is /// to remember who gives out the serial numbers. The database. :) /// </summary> /// <param name="Lat"></param> /// <param name="Long"></param> /// <param name="Elevate"></param> /// <param name="Year"></param> /// <param name="Month"></param> /// <param name="Day"></param> /// <param name="ZType"></param> /// <param name="Name"></param> public Zombie(double Lat, double Long, double Elevate, int Year, int Month, int Day, ZType ZType, String Name) { ContactLocation = new GeoEngine_Workspace.Location(Lat, Long, Elevate); ContactLocation.SetDate(Year, Month, Day); ContactType = ZType; ContactName = Name; ZombieSerialNumber = 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); }