order in front
This commit is contained in:
@@ -34,7 +34,7 @@ namespace Back.Controllers
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult<List<PricingDto>>> GetAllPricing() => Ok(await _servPricing.GetPricing());
|
||||
[HttpPost("GetAllOrder")]
|
||||
public async Task<ActionResult<List<OrderDto>>> GetAllOrder(ItemSerachOrder itemSerach)
|
||||
public async Task<ActionResult<PagingDto< OrderDto>>> GetAllOrder(ItemSerachOrder itemSerach)
|
||||
{
|
||||
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||
var UserID = claim.Value;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Back.Data.Contracts;
|
||||
using Back.Common;
|
||||
using Back.Data.Contracts;
|
||||
using Back.Data.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Shared.DTOs;
|
||||
@@ -18,7 +19,7 @@ namespace Back.Services
|
||||
_repoOrderItem = repoOrderItem;
|
||||
|
||||
}
|
||||
public async Task<List<OrderDto>> GetOrdersByCompanyID(int CompanyID, ItemSerachOrder itemSerach)
|
||||
public async Task<PagingDto<OrderDto>> GetOrdersByCompanyID(int CompanyID, ItemSerachOrder itemSerach)
|
||||
{
|
||||
var request = _repoOrder.Get(w => w.CompanyID == CompanyID);
|
||||
|
||||
@@ -41,7 +42,7 @@ namespace Back.Services
|
||||
TPrice = w.TPrice,
|
||||
TTax = w.TPrice,
|
||||
lstDiscount = w.lstDiscount,
|
||||
}).ToListAsync();
|
||||
}).Paging(itemSerach.PageIndex,itemSerach.PageSize);
|
||||
}
|
||||
public async Task<List<OrderItemDto>> GetOrderItems(int OrderID,int CompanyID)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user