Beispiel #1
0
        public HttpResponseMessage Delete(string id)
        {
            RespostaErro erro = new RespostaErro();

            try
            {
                erro = Comercial.DelClient(id);

                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));
            }
        }