public IActionResult CreateOrderDetail([FromBody] OrderDetailReq req) { var res = new SingleRsp(); res = _svc.CreateOrderDetail(req); return(Ok(res)); }
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); }
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); }
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); }
public IActionResult DeleteOrderDetail([FromBody] OrderDetailReq req) { var res = _svc.DeleteOrderDetail(req.OrderId, req.ProductId); return(Ok(res)); }
public IActionResult UpdateOrderDetail([FromBody] OrderDetailReq req) { var res = _svc.UpdateOrderDetail(req); return(Ok(res)); }