コード例 #1
0
        public HttpResponseMessage PostNewBombaTicaOrder([FromBody] Order value)
        {
            OrderRegister.GetInstance().AddOrder(OrderRegister.orderListB, value);
            var response = Request.CreateResponse(HttpStatusCode.Created);

            return(response);
        }
コード例 #2
0
        public IHttpActionResult GetBombaTicaOrderById(int id)
        {
            var val = OrderRegister.GetInstance().GetOrder(OrderRegister.orderListB, id);

            if (val == null)
            {
                return(NotFound());
            }
            return(Ok(val));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 public List <Order> GetAllBombaTicaOrders()
 {
     return(OrderRegister.GetInstance().GetAllOrders(OrderRegister.orderListB));
 }
コード例 #6
0
 public List <Order> GetAllPhischelOrders()
 {
     return(OrderRegister.GetInstance().GetAllOrders(OrderRegister.orderListP));
 }