public void RetrieveDoors(string zone)
        {
            string sql = String.Format(SelectString, SelectArgValues);
            var results = QueryHelper.TryRunQuery(_connection, sql);

            if (results != null)
            {
                Door door;
                foreach (Dictionary<string, object> row in results)
                {
                    door = new Door(_queryConfig);
                    door.SetProperties(Queries, row);
                    door.Created();
                    Doors.Add(door);
                }
            }
        }
Exemplo n.º 2
0
 public void RemoveDoor(Door door)
 {
     //removes it from the database collections, ie what needs inserted/deleted/updated)
     RemoveObject(door);
     Doors.Remove(door);
 }
Exemplo n.º 3
0
        public Door DoorFactory()
        {
            Door door = null;
            int id = 0;
            int doorid = 0;

            if (Doors.Count > 0)
            {
                id = Doors.Max(x => x.Id) + 1;
                doorid = Doors.Max(x => x.DoorId) + 1;
            }

            door = new Door(_queryConfig);
            door.Id = id;
            door.DoorId = doorid;
            door.Zone = Zone;
            door.Created();

            return door;
        }
Exemplo n.º 4
0
 public void AddDoor(Door door)
 {
     //adds it from the database collections, ie what needs inserted/deleted/updated)
     AddObject(door);
     Doors.Add(door);
 }
Exemplo n.º 5
0
 public PolygonDoorRender(Mesh mesh, Door door)
 {
     _polys = mesh.Polygons;
     _mesh = mesh;
     _door = door;
 }