Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        oMaster        = (master_GenericModerna)this.Master;
        oMaster.ProgId = 546;
        Version Versao = new Version("1.0");

        if (!Page.IsPostBack)
        {
            TemTreinamento();
            VerificaNivelUsuario();
            PegaValorDoFormConsulta();
        }
        else
        {
            MensagemErroTreinamento.Texto = "Formulario não encontrado";
            MensagemErroTreinamento.Exibir();
            pnlFormulario.Visible = false;
        }
    }
Пример #2
0
    private void PegaValorDoFormConsulta()
    {
        string sTreinamentoId = Funcoes.Funcoes.VB.Trim(Request.QueryString["fid"]);

        Formulario.Formulario form = new Formulario.Formulario();
        FormularioDB          db   = new FormularioDB();

        if (string.IsNullOrEmpty(sTreinamentoId) || !Funcoes.Funcoes.VB.IsNumeric(sTreinamentoId))
        {
            MensagemErroTreinamento.Texto = "Formulario não encontrado";
            MensagemErroTreinamento.Exibir();
            pnlFormulario.Visible = false;
        }
        else
        {
            form.FormularioID = int.Parse(sTreinamentoId);
            if (db.Carrega(null, ref form))
            {
                PreencheCamposFormManutencao(form);
            }
        }
    }