Пример #1
0
 public void PU_AgregarNotificacion()
 {
     comando = FabricaComando.CrearComandoAgregarNotificacion(1);
     comando.Ejecutar();
     notificacion = (Notificacion)comando.Retornar();
     Assert.True(notificacion.Push);
 }
Пример #2
0
        public bool AgregarNotificacionConfiguracion(int id_usuario)
        {
            try
            { //int dato = JsonConvert.DeserializeObject<int>(id_usuario);
                comando = FabricaComando.CrearComandoAgregarNotificacion(id_usuario);
                comando.Ejecutar();
                return(true);
            }
            catch (NpgsqlException e)
            {
                return(false);

                throw new HttpResponseException(HttpStatusCode.InternalServerError);
            }
            catch (InvalidCastException)
            {
                throw new HttpResponseException(HttpStatusCode.BadRequest);
            }
            catch (NullReferenceException)
            {
                throw new HttpResponseException(HttpStatusCode.BadRequest);
            }
            catch (Exception)
            {
                throw new HttpResponseException(HttpStatusCode.Ambiguous);
            }
        }