Exemple #1
0
        public static Floor convertToFloor(FloorDTO f)
        {
            Floor floor = new Floor();

            floor.FloorID     = f.id;
            floor.Descrizione = f.descrizione;
            floor.Nome        = f.nomeFloor;
            floor.Building    = BuildingConverter.convertToBuilding(f.building);
            return(floor);
        }
Exemple #2
0
        public static FloorDTO convertToDto(Floor f)
        {
            FloorDTO floor = new FloorDTO();

            floor.id          = f.FloorID;
            floor.descrizione = f.Descrizione;
            floor.nomeFloor   = f.Nome;
            floor.building    = BuildingConverter.convertToDto(f.Building);
            return(floor);
        }
Exemple #3
0
        public static Thing convertToThing(ThingDTO tDTO)
        {
            Thing thing = new Thing();

            thing.ThingID    = tDTO.id;
            thing.Num_Uscite = tDTO.numUscite;
            thing.Prezzo     = tDTO.prezzo;
            if (tDTO.customer != null)
            {
                thing.Customer = CustomerConverter.convertToCustomer(tDTO.customer);
            }
            else
            {
                thing.Customer = null;
            }
            thing.Building = BuildingConverter.convertToBuilding(tDTO.building);
            return(thing);
        }
Exemple #4
0
        public static ThingDTO convertToDto(Thing t)
        {
            ThingDTO thingDTO = new ThingDTO();

            thingDTO.id        = t.ThingID;
            thingDTO.numUscite = t.Num_Uscite;
            thingDTO.prezzo    = t.Prezzo;
            if (t.Customer != null)
            {
                thingDTO.customer = CustomerConverter.convertToDto(t.Customer);
            }
            else
            {
                thingDTO.customer = null;
            }
            thingDTO.building = BuildingConverter.convertToDto(t.Building);
            return(thingDTO);
        }