//=========================================================== //=========================================================== #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); }
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); }
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); }
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)); }
public IActionResult DeleteOrderDetails(OrderDetailsReq req) { var res = _svc.DeleteOrderDetails(req.OrderId); return(Ok(res)); }