Exemple #1
0
    protected void btnExcluir_Click(object sender, EventArgs e)
    {
        try
        {
            CFG_Arquivo entArquivo = PES_PessoaBO.RetornaFotoPor_Pessoa(_VS_pes_id);
            if (entArquivo.IsNew && _iptFoto.PostedFile != null)
            {
                entArquivo = CFG_ArquivoBO.CriarEntidadeArquivo(_iptFoto.PostedFile);
            }

            _VS_excluir_foto = (byte)(ACA_AlunoBO.ExcluirFotoAluno(_VS_pes_id, entArquivo.arq_id) ? 1 : 2);

            string script = String.Format("RemoveConfirmDialogButton('{0}');", String.Concat("#", btnCapturaFoto.ClientID));
            btnCapturaFoto.OnClientClick = script;
        }
        catch (Exception ex)
        {
            ApplicationWEB._GravaErro(ex);
            lblMensagem.Text = UtilBO.GetErroMessage("Erro ao tentar excluir foto.", UtilBO.TipoMensagem.Erro);
        }
    }