コード例 #1
0
        public IActionResult CreateOrderDetail([FromBody] OrderDetailReq req)
        {
            var res = new SingleRsp();

            res = _svc.CreateOrderDetail(req);
            return(Ok(res));
        }
コード例 #2
0
ファイル: OrderDetailSvc.cs プロジェクト: thanhchuong99/doan
        public SingleRsp UpdateOrderDetail(OrderDetailReq ts)
        {
            var          res         = new SingleRsp();
            OrderDetails orderdetail = new OrderDetails();

            orderdetail.OrderId   = ts.OrderId;
            orderdetail.ProductId = ts.ProductId;
            orderdetail.Quantity  = ts.Quantity;
            res      = _rep.UpdateOrderDetail(orderdetail);
            res.Data = orderdetail;
            return(res);
        }
コード例 #3
0
ファイル: OrderDetailSvc.cs プロジェクト: phuoc1999qn1/doan
        public SingleRsp CreateOrderDetail(OrderDetailReq ordDetail)
        {
            var         res = new SingleRsp();
            OrderDetail ord = new OrderDetail();

            ord.UnitPrice    = ordDetail.UnitPrice;
            ord.Quantity     = ordDetail.Quantity;
            ord.Discount     = ordDetail.Discount;
            ord.Status       = ordDetail.Status;
            ord.OrderId      = ordDetail.OrderId;
            ord.ProDetailsId = ordDetail.ProDetailsId;
            res = _rep.CreateOrderDetail(ord);
            return(res);
        }
コード例 #4
0
        public SingleRsp UpdateOrderDetail(OrderDetailReq ordt)
        {
            var         res          = new SingleRsp();
            OrderDetail orderdetails = new OrderDetail();

            orderdetails.OrderDetailId = ordt.OrderDetailId;
            orderdetails.OrderId       = ordt.OrderId;
            orderdetails.ProductId     = ordt.ProductId;
            orderdetails.Price         = ordt.Price;
            orderdetails.SaleQuantity  = ordt.SaleQuantity;

            res = _rep.UpdateOrderDetail(orderdetails);

            return(res);
        }
コード例 #5
0
        public IActionResult DeleteOrderDetail([FromBody] OrderDetailReq req)
        {
            var res = _svc.DeleteOrderDetail(req.OrderId, req.ProductId);

            return(Ok(res));
        }
コード例 #6
0
        public IActionResult UpdateOrderDetail([FromBody] OrderDetailReq req)
        {
            var res = _svc.UpdateOrderDetail(req);

            return(Ok(res));
        }