Beispiel #1
0
    protected void btnExcluirClick(object sender, EventArgs e)
    {
        Noticia noticia = new Noticia();
        string  retorno = noticia.excluir(int.Parse(campoID.Value));

        if (string.IsNullOrEmpty(retorno))
        {
            atualizarCampos(0);
            ObjectDataSource1.DataBind();
            GridView1.DataBind();
        }
        else
        {
            mostrarMensagem(retorno);
        }
    }
Beispiel #2
0
    protected void btnExcluir_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(edtNotId.Text))
        {
            return;
        }
        Noticia not     = new Noticia();
        string  retorno = not.excluir(int.Parse(edtNotId.Text));

        if (!string.IsNullOrEmpty(retorno))
        {
            Funcoes.showMessage(this, retorno);
            return;
        }
        else
        {
            Funcoes.showMessage(this, "Registro excluido com sucesso!");
        }
        atualizarCampos(0);
        atualizarDados();
    }