public HttpResponseMessage PostNewBombaTicaOrder([FromBody] Order value) { OrderRegister.GetInstance().AddOrder(OrderRegister.orderListB, value); var response = Request.CreateResponse(HttpStatusCode.Created); return(response); }
public IHttpActionResult GetBombaTicaOrderById(int id) { var val = OrderRegister.GetInstance().GetOrder(OrderRegister.orderListB, id); if (val == null) { return(NotFound()); } return(Ok(val)); }
public HttpResponseMessage PutPhischelOrder(int id, [FromBody] Order value) { var val = OrderRegister.GetInstance().UpdateOrder(OrderRegister.orderListP, id, value); if (val == false) { var responseA = Request.CreateResponse(HttpStatusCode.NotModified); return(responseA); } var responseB = Request.CreateResponse(HttpStatusCode.Accepted); return(responseB); }
public HttpResponseMessage DeleteBombaTicaRole(int id) { var val = OrderRegister.GetInstance().RemoveOrder(OrderRegister.orderListB, id); if (val == false) { var responseA = Request.CreateResponse(HttpStatusCode.NotModified); return(responseA); } var responseB = Request.CreateResponse(HttpStatusCode.Accepted); return(responseB); }
public List <Order> GetAllBombaTicaOrders() { return(OrderRegister.GetInstance().GetAllOrders(OrderRegister.orderListB)); }
public List <Order> GetAllPhischelOrders() { return(OrderRegister.GetInstance().GetAllOrders(OrderRegister.orderListP)); }