예제 #1
0
        /// <summary>
        /// Metodo para eliminar logicamente una Comentario
        /// </summary>
        /// <param name="id"></param>

        public static void Eliminar(int id)
        {
            try
            {
                ComentarioDal.Eliminar(id);
            }
            catch (SqlException ex)
            {
                Methods.GenerateLogsRelease("ComentarioDal", "Eliminar", string.Format("{0} {1} Error: {2}", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), ex.Message));
                throw ex;
            }
            catch (Exception ex)
            {
                Methods.GenerateLogsRelease("ComentarioDal", "Eliminar", string.Format("{0} {1} Error: {2}", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), ex.Message));
                throw ex;
            }
        }
예제 #2
0
        /// <summary>
        /// Metodo para Obtener una Comentario
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static Comentario Get(int id)
        {
            Comentario comentario = null;

            try
            {
                comentario = ComentarioDal.Get(id);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(comentario);
        }