예제 #1
0
        //===========================================================
        //===========================================================

        #region -- Update OrderDetails --

        public SingleRsp UpdateOrderDetails(int id, OrderDetailsReq od)
        {
            var          res         = new SingleRsp();
            OrderDetails orderdetail = new OrderDetails();

            orderdetail.OrderId   = od.order_id;
            orderdetail.ProductId = od.product_id;
            orderdetail.Price     = od.price;
            orderdetail.Quantity  = od.quantity;
            res = _rep.UpdateOrderDetails(orderdetail);
            return(res);
        }
예제 #2
0
        public SingleRsp UpdateOrderDetails(OrderDetailsReq od)
        {
            var          res         = new SingleRsp();
            OrderDetails orderdetail = new OrderDetails();

            orderdetail                  = _rep.Read1(od.OrderId);
            orderdetail                  = _rep.Read2(od.ProductId);
            orderdetail.Quantity         = od.Quantity;
            orderdetail.Discount         = od.Discount;
            orderdetail.OrderDetailsName = od.OrderDetailsName;
            res = _rep.UpdateOrderDetails(orderdetail);
            return(res);
        }
예제 #3
0
        public SingleRsp CreateOrderDetail(OrderDetailsReq orderDetail)
        {
            var          res          = new SingleRsp();
            OrderDetails orderDetails = new OrderDetails();

            orderDetails.OrderId   = orderDetail.OrderId;
            orderDetails.ProductId = orderDetail.ProductId;
            orderDetails.Size      = orderDetail.Size;
            orderDetails.UnitPrice = orderDetail.UnitPrice;
            orderDetails.Quantity  = orderDetail.Quantity;
            orderDetails.Discount  = orderDetail.Discount;

            res = _rep.CreateOrderDetails(orderDetails);
            return(res);
        }
예제 #4
0
        public IActionResult CreateOrderDetails([FromBody] OrderDetailsReq req)
        {
            var res = _svc.CreateOrderDetails(req);

            return(Ok(res));
        }
        public IActionResult UpdateOrderDetails(int Id, [FromBody] OrderDetailsReq req)
        {
            var res = _svc.UpdateOrderDetails(Id, req);

            return(Ok(res));
        }
예제 #6
0
        public IActionResult DeleteOrderDetails(OrderDetailsReq req)
        {
            var res = _svc.DeleteOrderDetails(req.OrderId);

            return(Ok(res));
        }