Exemplo n.º 1
0
        /// <summary>
        /// Save this MapPoint to the db. Must still add it to OOP lists
        /// </summary>
        public void Save()
        {
            DataLayer dl = new DataLayer();
            dl.AddValue("Door", "" + door.Id);
            dl.AddValue("x", "" + x);
            dl.AddValue("y", "" + y);
            dl.AddValue("Map", "" + floor);

            if (Id == -1)
            {
                Id = dl.AddRecord("mappoint");
            }
            else
            {
                dl.AlterRecord("mappoint", Id);
            }
        }
Exemplo n.º 2
0
 public CSV()
 {
     dl = new DataLayer();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Delete the mappoint from the db. Must still update the OOP lists
 /// </summary>
 /// <returns>true if successful</returns>
 public bool Delete()
 {
     DataLayer dl = new DataLayer();
     dl.DeleteRecord("mappoint", Id);
     return true;
 }