Exemplo n.º 1
0
 public void TranslateBuildingToBuildingBDO(Building b, BuildingBDO bbdo)
 {
     bbdo.BuildingCode = b.BuildingCode;
     bbdo.BuildingName = b.BuildingName;
     bbdo.Deactivated = b.Deactivated;
     bbdo.Description = b.Description;
     bbdo.Rooms = ToRoomBDOList(b.Rooms);
 }
Exemplo n.º 2
0
 public List<Building> GetAllBuildings()
 {
     List<Building> blist = new List<Building>();
     foreach (BuildingBDO bbdo in blogic.GetAllBuildings()) {
         Building b = new Building();
         TranslateBuildingBDOToBuilding(bbdo, b);
         blist.Add(b);
     }
     return blist;
 }
Exemplo n.º 3
0
        public Building GetBuilding(string buildingCode, ref string message)
        {
            Building bldg = new Building();
            BuildingBDO bbdo = blogic.GetBuilding(buildingCode);
            if (bbdo != null)
            {
                TranslateBuildingBDOToBuildingDTO(bbdo, bldg);
            }
            else message = "Building Does Not Exists";

            return bldg;
        }
Exemplo n.º 4
0
 public bool CreateBuilding(ref Building building, ref string message)
 {
     BuildingBDO bbdo = new BuildingBDO();
     TranslateBuildingToBuildingBDO(building, bbdo);
     return blogic.CreateBuilding(ref bbdo, ref message);
 }
Exemplo n.º 5
0
 public void TranslateBuildingBDOToBuildingDTO(BuildingBDO bBDO, Building bldg)
 {
     bldg.BuildingCode = bBDO.BuildingCode;
     bldg.BuildingName = bBDO.BuildingName;
     bldg.Deactivated = bBDO.Deactivated;
     bldg.Description = bBDO.Description;
     bldg.Rooms = ToRoomDTO(bBDO.Rooms);
 }