Пример #1
0
 private void RemoverComentario(DirectEventArgs e)
 {
     try
     {
         if (FotoSelecionada != null)
         {
             ComentarioFoto = new ComentarioFotoBO().SelectById(e.ExtraParams["id"].ToInt32()); ;
             ComentarioFoto.Removido = true;
             new ComentarioFotoBO(ComentarioFoto).DeleteUpdate();
         }
         else
         {
             ComentarioVideo = new ComentarioVideoBO().SelectById(e.ExtraParams["id"].ToInt32());
             ComentarioVideo.Removido = true;
             new ComentarioVideoBO(ComentarioVideo).DeleteUpdate();
         }
         LoadComentarios();
     }
     catch (Exception ex)
     {
         base.MostrarMensagem("Erro", "Erro ao remover comentário.", String.Empty);
     }
 }
Пример #2
0
 private void PreencherComentario(DirectEventArgs e)
 {
     if (FotoSelecionada != null)
     {
         ComentarioFoto = new ComentarioFotoBO().SelectById(e.ExtraParams["id"].ToInt32());
         txtComentario.Text = ComentarioFoto.Comentario;
     }
     else
     {
         ComentarioVideo = new ComentarioVideoBO().SelectById(e.ExtraParams["id"].ToInt32());
         txtComentario.Text = ComentarioVideo.Comentario;
     }
 }