Beispiel #1
0
        public HttpResponseMessage ListarTodosLeilaoDisponivel(int idUsuario)
        {
            LeilaoFachada leilaoFachada = new LeilaoFachada();
            List <Lote>   listaLote     = leilaoFachada.ListarTodosLotesDisponivel(idUsuario);

            return(Request.CreateResponse(HttpStatusCode.OK, listaLote));
        }
Beispiel #2
0
        public HttpResponseMessage ListarTodosLanceByLeilao(int idLeilao)
        {
            LeilaoFachada leilaoFachada = new LeilaoFachada();
            List <Lance>  listaLance    = leilaoFachada.ListarTodosLanceByLeilao(idLeilao);

            return(Request.CreateResponse(HttpStatusCode.OK, listaLance));
        }
Beispiel #3
0
        public HttpResponseMessage CriarLote(Lote lote)
        {
            LeilaoFachada leilaoFachada = new LeilaoFachada();
            bool          criou         = leilaoFachada.CriarLote(lote);

            return(Request.CreateResponse(HttpStatusCode.OK, criou));
        }
        public HttpResponseMessage ListarBemByIdLote(int idLote)
        {
            LeilaoFachada  leilaoFachada = new LeilaoFachada();
            List <LoteBem> listLoteBem   = leilaoFachada.ListarLoteBemByIdLote(idLote);

            return(Request.CreateResponse(HttpStatusCode.OK, listLoteBem));
        }
        public HttpResponseMessage ListarTodosLeilao()
        {
            LeilaoFachada leilaoFachada = new LeilaoFachada();
            List <Leilao> listaLeilao   = leilaoFachada.ListarTodosLeilao();

            return(Request.CreateResponse(HttpStatusCode.OK, listaLeilao));
        }
        public HttpResponseMessage CriarLeilao(Leilao leilao, string natureza, string formaLances)
        {
            LeilaoFachada leilaoFachada = new LeilaoFachada();
            bool          criou         = leilaoFachada.CriarLeilao(leilao, natureza, formaLances);

            return(Request.CreateResponse(HttpStatusCode.OK, criou));
        }
 public HttpResponseMessage Registrar(Usuario usuario)
 {
     try
     {
         LeilaoFachada leilaoFachada = new LeilaoFachada();
         bool          registrou     = leilaoFachada.RegistrarUsuario(usuario);
         return(Request.CreateResponse(HttpStatusCode.OK, registrou));
     }
     catch (Exception ex)
     {
         Loggin log = new Loggin();
         log.criarMensagem(ex);
         return(Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }
 public HttpResponseMessage Autenticar(string email)
 {
     try
     {
         LeilaoFachada leilaoFachada = new LeilaoFachada();
         Usuario       usuario       = leilaoFachada.AutenticarUsuario(email);
         return(Request.CreateResponse(HttpStatusCode.OK, usuario));
     }
     catch (Exception ex)
     {
         //Loggin log = new Loggin();
         //log.criarMensagem(ex);
         return(Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }