public IEnumerable <ProgrammationDocumentPgeDto> GetAllDocumentPgeByProgrammation(int idProgrammation) { IEnumerable <ProgrammationDocumentPgeDto> listePGE = this.CalculService.GetAllDocumentPgeByProgrammation(idProgrammation); //Gestion Excel GestionExcel excel = new GestionExcel(idProgrammation, listePGE); if (excel.OpenExcel()) { if (excel.CreerOuOuvrirFichier()) { try { excel.EditerDonneePge(); } catch (Exception e) { //logger this.Logger.Error("Impossible d'ajouter les données au fichier Excel."); } finally { excel.FermerExcel(); } } else { this.Logger.Error("Impossible d'ouvrir ou de créer le fichier Excel pour la programmation " + idProgrammation + " à l'emplacement : " + ConfigurationManager.AppSettings["CheminDossierExcel"]); } } return(listePGE); }
public void ExecuteInstanceExcel(int idProgrammation) { GestionExcel Excel = new GestionExcel(idProgrammation); Excel.AfficherExcel(); }