protected void Page_Load(object sender, EventArgs e) { Pagina objPagina = DOPagina.Obter(Convert.ToInt32(Utilitarios.EnCryptDecrypt.CryptorEngine.Decrypt(Request.QueryString["paginaId"]))); if (!string.IsNullOrEmpty(objPagina.ConfiguracaoAbas)) { controle1.InnerText = objPagina.ConfiguracaoAbas.Split('|')[0]; controle2.InnerText = objPagina.ConfiguracaoAbas.Split('|')[1]; } }
private void CarregarPagina() { try { string nomeAba; btnSalvar.Text = Resources.Textos.Botao_Salvar; Pagina objPagina = DOPagina.Obter(paginaId); for (int i = 1; i <= objPagina.QuantidadeAbas; i++) { nomeAba = string.Empty; if (!String.IsNullOrEmpty(objPagina.ConfiguracaoAbas) && !String.IsNullOrEmpty(objPagina.ConfiguracaoAbas.Split('|')[i - 1])) { nomeAba = objPagina.ConfiguracaoAbas.Split('|')[i - 1]; } Label lblTexto = new Label { ID = "lblAba" + i.ToString(), Text = "Aba" + i.ToString() }; TextBox txtAba = new TextBox { ID = "txtAba" + i.ToString(), Text = nomeAba }; RequiredFieldValidator rfvTextoAba = new RequiredFieldValidator { ID = "rfvTextoAba" + i.ToString(), Text = "*", ControlToValidate = "txtAba" + i.ToString(), ForeColor = System.Drawing.Color.Red }; plhControles.Controls.Add(lblTexto); plhControles.Controls.Add(txtAba); plhControles.Controls.Add(rfvTextoAba); plhControles.Controls.Add(new LiteralControl("<br />")); } } catch (Exception) { throw; } }
protected void Page_Load(object sender, EventArgs e) { try { var usuario = UsuarioLogado(); if (usuario == null) { Response.Redirect("~/Default.aspx", true); } ObterSecoes(usuario.IdPerfil); VerificaAcessoPagina(); if (!Page.IsPostBack) { this.IniciaTela(); if (paginaId == 0) { if (Request.QueryString["paginaId"] != null) { paginaId = Convert.ToInt32(Utilitarios.EnCryptDecrypt.CryptorEngine.Decrypt(Request.QueryString["paginaId"])); } } if (paginaId != 0) { gobjPagina = DOPagina.Obter(paginaId); CarregarObjetos(Utilitarios.TipoTransacao.Carregar); hidPaginaId.Value = paginaId.ToString(); } } } catch (Exception ex) { ExibirAlerta(ex); } }