public QuestionarioOpcoesType getOptions(QuestionarioType questionario) { QuestionarioOpcaoBLL bll = new QuestionarioOpcaoBLL(); QuestionarioOpcoesType opcoes = bll.select(questionario); return(opcoes); }
protected void Page_Load(object sender, EventArgs e) { this.url_list = "~/Painel/Questionario.aspx"; this.questionarioBLL = new QuestionarioBLL(); this.OpcoesQuestionario = new QuestionarioOpcoesType(); int id = Convert.ToInt32(Request.QueryString["id"]); if (id != null && id > 0) { this.questionario = this.questionarioBLL.selectRecord(id); if (questionario.idQuestionario != null && questionario.idQuestionario > 0) { if (!IsPostBack) { txtPergunta.Text = questionario.Descricao; cmb_tipo.SelectedValue = questionario.Tipo; } string[] exploded = questionario.Tipo.Split('_'); if (exploded[1] == "S") { QuestionarioOpcaoBLL bllOpcoes = new QuestionarioOpcaoBLL(); this.OpcoesQuestionario = bllOpcoes.select(questionario); } } else { Session["FlashMsg"] = "Id invalido"; Session["FlashMsgType"] = "danger"; Response.Redirect(this.url_list); } } else { this.questionario = new QuestionarioType(); } this.DataBind(); }