Ejemplo n.º 1
0
    protected void btnSalvar_Click(object sender, EventArgs e)
    {
        Noticia noticia = new Noticia();

        noticia.Ds_Manchete = txtnm_Manchete.Text;
        noticia.Ds_Chamada  = txtnm_Chamada.Text;
        noticia.Ds_Conteudo = Editor1.Content;
        noticia.Dt_Criacao  = DateTime.Now;

        NoticiaOad.OperacaoNoticia(noticia, "I");
        Response.Redirect("~/Administrador/ListarNoticias.aspx");
    }
    protected void btnExcluir_Click(object sender, EventArgs e)
    {
        int     id_noticia = Convert.ToInt16(Request["Noticia"]);
        Noticia noticia    = new Noticia();

        noticia = NoticiaOad.Get_Noticia(id_noticia);
        NoticiaOad.OperacaoNoticia(noticia, "E");

        btnCancelar.Visible    = false;
        btnExcluir.Visible     = false;
        lblConfirmacao.Visible = false;

        lblSucesso.Visible = true;
        btnVoltar.Visible  = true;
    }