Ejemplo n.º 1
0
 public HttpResponseMessage SetStatus(int shipmentId, string status)
 {
     try {
         BOShipments shipment = new BOShipments();
         shipments   ship     = shipment.getOneShipment(shipmentId);
         ship.status = status;
         ship        = shipment.updateShipments(ship);
         return(Request.CreateResponse(HttpStatusCode.OK, 1));
     } catch (Exception e) {
         ErrorMessage mensaje = new ErrorMessage("2.1", "Exception to update shipments - " + e.GetBaseException().Message, e.ToString());
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, mensaje));
     }
 }
Ejemplo n.º 2
0
        public HttpResponseMessage Put(shipments model)
        {
            try {
                BOShipments shipment = new BOShipments();
                shipments   ship;

                ship = shipment.updateShipments(model);
                return(Request.CreateResponse(HttpStatusCode.OK, ship));
            } catch (Exception e) {
                ErrorMessage mensaje = new ErrorMessage("2.1", "Exception to update shipments - " + e.GetBaseException().Message, e.ToString());
                return(Request.CreateResponse(HttpStatusCode.InternalServerError, mensaje));
            }
        }