Exemple #1
0
    protected void btnSalvar_Click(object sender, EventArgs e)
    {
        try
        {
            CarregarObjetos(Utilitarios.TipoTransacao.Salvar);

            if (SalvarArquivo())
            {
                if (DOTimeline.Inserir(gobjTimeline) > 0)
                {
                    IniciaTela();
                    LerDados();
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "alert('" + Resources.Textos.Mensagem_Salva_Erro + "' ", true);
                }
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "alert('Erro ao fazer o uploado do arquivo' ", true);
            }
        }
        catch (Exception ex)
        {
            DOLog.Inserir(string.Concat("Erro Sistema: ", ex), Utilitarios.TipoLog.Sistema, (UserContext.Logado ? UserContext.UsuarioLogado.Id : 0));
            lblMensagem.Text = String.Format(Resources.Modulos.Mensagem_Erro_Salvar, ex.Message);
        }
    }
Exemple #2
0
    protected void btnSalvarModuloTimeline_Click(object sender, EventArgs e)
    {
        try
        {
            CarregarObjetos(Utilitarios.TipoTransacao.Salvar);

            DOTimeline.Inserir(gobjModTimeline);

            ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "refreshParent();", true);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }