Exemple #1
0
    public override void Modificar(int pId)
    {
        Session["GestionNoticia_Not_codNoticia"] = pId;
        SitioBase.capaDatos.cNoticia noticia = WebService.RecuperarNoticiaPorId(pId);

        if (noticia != null)
        {
            txtTitulo.Text = noticia.not_titulo;
            if (noticia.not_fechaDesde != null)
            {
                //txt_fechaDesde.Text = noticia.not_fechaDesde.ToString();
                CalendarExtenderFechaDesde.SelectedDate = noticia.not_fechaDesde;
            }
            if (noticia.not_fechaHasta != null)
            {
                //txt_fechaHasta.Text = noticia.not_fechaHasta.ToString();
                CalendarExtenderFechaHasta.SelectedDate = noticia.not_fechaHasta;
            }
            txt_bajada.Text        = noticia.not_bajada;
            txt_descripcion.Text   = noticia.not_descripcion;
            txt_destacado.Text     = noticia.not_destacado;
            tab2.Visible           = true;
            lbl_iframe.Text        = "<iframe name='files' class='form_datos' src='../../pages/filemanager.aspx?grupo=" + Constantes.cTABLA_NOTICIA + "&codrel=" + Session["GestionNoticia_Not_codNoticia"].ToString() + "&ancho=900px&alto=&pag=6' frameborder='0' width='100%' scrolling='no' height='490' style='margin:0px; padding:5px;'>&nbsp</iframe>";
            pnl_grilla.Visible     = false;
            pnl_formulario.Visible = true;
        }
    }
 public override void Publicar(int pId)
 {
     if (Session["BaseAdmin_Usuario"] != null)
     {
         int codigoUsuarioEnSession           = ((SitioBase.capaDatos.Usuario)Session["BaseAdmin_Usuario"]).id;
         SitioBase.capaDatos.cNoticia noticia = WebService.RecuperarNoticiaPorId(pId);
         WebService.PublicarNoticiaPorId(noticia.not_codNoticia, !(bool)noticia.not_isPublicar, codigoUsuarioEnSession);
         gv_datos.DataBind();
     }
 }
 public override void Eliminar(int pId)
 {
     if (Session["BaseAdmin_Usuario"] != null)
     {
         int codigoUsuarioEnSession           = ((SitioBase.capaDatos.Usuario)Session["BaseAdmin_Usuario"]).id;
         SitioBase.capaDatos.cNoticia noticia = WebService.RecuperarLinksPorId(pId);
         WebService.EliminarLinksPorId(noticia.lnk_codLinks, codigoUsuarioEnSession);
         gv_datos.DataBind();
     }
 }
 public override void CambiarEstado(int pId)
 {
     if (Session["BaseAdmin_Usuario"] != null)
     {
         int codigoUsuarioEnSession           = ((SitioBase.capaDatos.Usuario)Session["BaseAdmin_Usuario"]).id;
         SitioBase.capaDatos.cNoticia noticia = WebService.RecuperarNoticiaPorId(pId);
         int estadoNoticia = noticia.not_estado == Constantes.cESTADO_ACTIVO ? Constantes.cESTADO_INACTIVO : Constantes.cESTADO_ACTIVO;
         WebService.CambiarEstadoNoticiaPorId(noticia.not_codNoticia, estadoNoticia, codigoUsuarioEnSession);
         gv_datos.DataBind();
     }
 }
    public override void Modificar(int pId)
    {
        Session["GestionSitioInteres_lnk_codLinks"] = pId;
        SitioBase.capaDatos.cNoticia noticia = WebService.RecuperarLinksPorId(pId);

        if (noticia != null)
        {
            txtTitulo.Text = noticia.lnk_titulo;


            txt_descripcion.Content = noticia.lnk_descripcion;
            pnl_grilla.Visible      = false;
            pnl_formulario.Visible  = true;
        }
    }
Exemple #6
0
    public override void Modificar(int pId)
    {
        Session["GestionLink_Lnk_codLinks"] = pId;
        SitioBase.capaDatos.cNoticia noticia = WebService.RecuperarLinksPorId(pId);

        if (noticia != null)
        {
            txtTitulo.Text         = noticia.lnk_titulo;
            cmb_origen.Text        = noticia.lnk_origen;
            txt_bajada.Text        = noticia.lnk_bajada;
            txt_web.Text           = noticia.lnk_web;
            pnl_grilla.Visible     = false;
            pnl_formulario.Visible = true;
        }
    }