private void EnviarEmail(String Email) { Int32 RowIndex = ObjectUtils.ToInt(hddRowIndex.Value); String protocolo = ((Label)grdRelatorioRAA.Rows[RowIndex].Cells[15].Controls[1]).Text; Int32 programa = StringUtils.ToInt(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[16].Controls[1]).Text); Boolean avaliador = StringUtils.ToBoolean(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[17].Controls[1]).Text); String caminho = ""; if (protocolo != "") { String estado = null; String categoria = null; List <EntQuestionarioEmpresa> listQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorProtocolo(protocolo); if (listQuestionarioEmpresa != null) { List <EntEmpresaCadastro> listEmpresaCadastro = new BllEmpresaCadastro().ObterPorIdPrograma(listQuestionarioEmpresa[0].EmpresaCadastro.IdEmpresaCadastro, programa); if (listEmpresaCadastro != null) { caminho = gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, false, programa, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), 0, true, this.Page); } } if (caminho != "") { WebUtils.EnviaEmailRaa(Email, "", caminho); } } UCStatus1.UpdateControls(); }
protected void grdRelatorioRAA_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Email") { hddRowIndex.Value = ObjectUtils.ToString(e.CommandArgument); this.UCConfirmaEmail1.Show(); } else if (e.CommandName == "Download") { hddRowIndex.Value = ObjectUtils.ToString(e.CommandArgument); Boolean comentarios = false; Int32 intro = 0; Int32 RowIndex = ObjectUtils.ToInt(hddRowIndex.Value); String estado = null; String categoria = null; String protocolo = ((Label)grdRelatorioRAA.Rows[RowIndex].Cells[15].Controls[1]).Text; Int32 programaId = StringUtils.ToInt(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[16].Controls[1]).Text); Boolean avaliador = StringUtils.ToBoolean(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[17].Controls[1]).Text); String caminho = ""; List <EntQuestionarioEmpresa> listQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorProtocolo(protocolo); if (listQuestionarioEmpresa != null) { List <EntEmpresaCadastro> listEmpresaCadastro = new BllEmpresaCadastro().ObterPorIdPrograma(listQuestionarioEmpresa[0].EmpresaCadastro.IdEmpresaCadastro, programaId); if (listEmpresaCadastro != null) { caminho = new PaginaBase().gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, comentarios, programaId, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), intro, false, this.Page); if (caminho != "") { NovaJanela(this.Page, caminho); } } } UCStatus1.UpdateControls(); // Response.Redirect("~/FGA/Paginas/RelatorioRAA.aspx"); } }