private List <ArquivoNoticia> CarregarArquivos(Noticia pModNoticia) { try { return(DOArquivoNoticia.ListaArquivosNoticia(pModNoticia)); } catch (Exception ex) { throw ex; } }
private void CarregaArquivosNoticia(Noticia noticia) { List <ArquivoNoticia> arquivos = DOArquivoNoticia.ListaArquivosNoticia(noticia); foreach (var arquivo in arquivos) { var tipoArquivo = string.Empty; if (arquivo.Capa) { tipoArquivo = "Capa"; } if (arquivo.Detalhe) { tipoArquivo = "Detalhe"; } if (arquivo.Lista) { tipoArquivo = "Lista"; } System.Text.StringBuilder sbArquivo = new System.Text.StringBuilder(); sbArquivo.Append("<table>"); sbArquivo.Append(" <tr>"); sbArquivo.Append(" <td>"); sbArquivo.Append(tipoArquivo); sbArquivo.Append(" </td>"); sbArquivo.Append(" <td>"); sbArquivo.Append(" <div>"); sbArquivo.Append(" <img src='" + arquivo.PathArquivo + "'>"); sbArquivo.Append(" </div><br>"); sbArquivo.Append(" </td>"); sbArquivo.Append(" </tr>"); sbArquivo.Append("<table>"); litArquivos.Text += sbArquivo.ToString(); } }