Esempio n. 1
0
        public HttpResponseMessage Put(Client client)
        {
            RespostaErro erro = new RespostaErro();

            try
            {
                erro = Comercial.UpdClient(client);
                if (erro.Erro == 0)
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, erro.Descricao));
                }
                else
                {
                    return(Request.CreateResponse(HttpStatusCode.NotFound, erro.Descricao));
                }
            }

            catch (Exception exc)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, erro.Descricao));
            }
        }