Example #1
0
class CargoServicios:

    def __init__(self):
        self.cargoCrud= CargoCrud()

# region Servicios Basicos
    def get(self, id):
        return self.cargoCrud.readId(id)

    def getAll(self):
        return self.cargoCrud.readAll()

    def getDTO(self, cargo):
        cargoDTO= DepartamentoDTO(cargo)
        return cargoDTO.toJSON()

    def insert(self, cargo):
        return self.cargoCrud.create(cargo)

    def update(self, cargo):
        return self.cargoCrud.update(cargo)

    def delete(self, cargo):
        return self.cargoCrud.delete(cargo)
Example #2
0
 def __init__(self):
     self.cargoCrud= CargoCrud()