protected Boolean Gravar() { Boolean isCompleto = true; ListaGrid = new BllQuestionarioEmpresaResposta().ObterRespostasEmpresaPorEmpresaParaAvaliacao(int.Parse(this.HddnFldIdEmpresaCadastro.Value), int.Parse(this.HddnFldIdEtapa.Value)); foreach (EntQuestionarioEmpresaResposta resposta in (List <EntQuestionarioEmpresaResposta>)ListaGrid) { if (resposta.UsuarioAvaliador.IdUsuario == 0) { isCompleto = false; } } if (isCompleto) { new BllQuestionarioEmpresaCalculoPontuacao().CalculaPontuacoesByEtapa(int.Parse(this.HddnFldIdTurma.Value), int.Parse(this.HddnFldIdEtapa.Value), int.Parse(this.HddnFldIdEmpresaCadastro.Value), true, this.TxtJustificativa.Text); new BllQuestionarioEmpresaCalculoPontuacao().RemoveAvaliador(int.Parse(this.HddnFldIdTurma.Value), int.Parse(this.HddnFldIdEtapa.Value), int.Parse(this.HddnFldIdEmpresaCadastro.Value), this.TxtJustificativa.Text); MessageBox(this.Page, "Avaliação concluida com sucesso!"); return(true); } else { MessageBox(this.Page, "Avaliação não finalizada!"); return(false); } }
public void Editar(Int32 IdQuestionarioEmpresa, Int32 IdPergunta) { EntQuestionarioEmpresaResposta objQuestionarioEmpresaResposta = new BllQuestionarioEmpresaResposta().ObterRespostaEmpresaPorQuestionarioEmpresaPergunta(IdQuestionarioEmpresa, IdPergunta); objQuestionarioEmpresaResposta.Pergunta = new BllPergunta().ObterPerguntaPorQuestionarioEmpresaPergunta(IdQuestionarioEmpresa, objQuestionarioEmpresaResposta.Pergunta.IdPergunta, true); objQuestionarioEmpresaResposta.UsuarioAvaliador.IdUsuario = UsuarioLogado.IdUsuario; this.ObjectToPage(objQuestionarioEmpresaResposta); this.Show(); }
private void AtualizaGridPerguntas() { ListaGrid = new BllQuestionarioEmpresaResposta().ObterRespostasEmpresaPorEmpresaParaAvaliacao(int.Parse(this.HddnFldIdEmpresaCadastro.Value), int.Parse(this.HddnFldIdEtapa.Value)); this.grdPerguntas.DataSource = ListaGrid; this.grdPerguntas.DataBind(); this.grdPerguntas.SelectedIndex = -1; try { List <EntQuestionarioEmpresaAvaliador> listQuestionarioEmpresaAvaliador = new BllQuestionarioEmpresaAvaliador().ObterPorIdQuestionarioEmpresa(((List <EntQuestionarioEmpresaResposta>)ListaGrid)[0].QuestionarioEmpresa.IdQuestionarioEmpresa); this.TxtJustificativa.Text = listQuestionarioEmpresaAvaliador[0].Banca; } catch { } }