def contarCodirector(self, idProyecto): integrante = IntegranteProyecto() band = False for integrante in self.__listaIntegrantes: if integrante.obtenerID() == idProyecto: if integrante.obtenerRol() == "codirector": band = True return band
def cargarIntegrantes(self): archivo= open ("integrantesProyecto.csv") leer= csv.reader(archivo,delimiter=';') band = True for fila in leer: if band: " Saltear Cabecera" band = False else: idProyecto= fila[0] apellidoNombre=fila[1] dni=fila[2] categoriaInvestigacion=fila[3] rol=fila[4] integrante= IntegranteProyecto(idProyecto,apellidoNombre, dni, categoriaInvestigacion,rol) self.addIntegrantes(integrante) archivo.close()
def obtenerCoDirector(self, idProyecto): integrante = IntegranteProyecto() for integrante in self.__listaIntegrantes: if integrante.obtenerID() == idProyecto: if integrante.obtenerRol() == "codirector": return integrante.obtenerCategoria()
def addIntegrantes(self, proyect): aux = IntegranteProyecto() if type(aux) == type(proyect): self.__listaIntegrantes.append(proyect)