* Further improvements of Warehouse view
* Fixed issue with not saving Products updates
This commit is contained in:
@@ -5,6 +5,7 @@ namespace SytelineSaAppEfDataModel.Services;
|
||||
public interface IWzHeaderService
|
||||
{
|
||||
Task<IEnumerable<WzHeaderDto>> GetAll();
|
||||
Task<IEnumerable<WzHeaderDto>> GetByCustomerNumber(string customerNumber, int customerSequence);
|
||||
Task CreateHeader(WzHeaderDto wzHeader);
|
||||
Task<WzHeaderDto> GetById(Guid id);
|
||||
}
|
||||
@@ -12,6 +12,13 @@ public class WzHeaderService(SytelineSaAppDbContext context, IMapper mapper) : I
|
||||
return await context.WzHeaders.Select(x => mapper.Map<WzHeaderDto>(x)).ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<WzHeaderDto>> GetByCustomerNumber(string customerNumber, int customerSequence)
|
||||
{
|
||||
return await context.WzHeaders.Include(x => x.Client)
|
||||
.Where(x => x.Client.CustomerNumber == customerNumber && x.Client.CustomerSequence == customerSequence)
|
||||
.Select(x => mapper.Map<WzHeaderDto>(x)).ToListAsync();
|
||||
}
|
||||
|
||||
public async Task CreateHeader(WzHeaderDto wzHeader)
|
||||
{
|
||||
var entity = mapper.Map<WzHeader>(wzHeader);
|
||||
|
||||
@@ -899,7 +899,7 @@ namespace SytelineSaAppEfDataModel
|
||||
|
||||
entity.Property(e => e.CreatedDate)
|
||||
.HasColumnName("CreatedDate")
|
||||
.HasColumnType("timestamp")
|
||||
.HasColumnType("DateTime")
|
||||
.IsRowVersion();
|
||||
|
||||
// Relationship
|
||||
@@ -931,7 +931,7 @@ namespace SytelineSaAppEfDataModel
|
||||
|
||||
entity.Property(e => e.CreatedDate)
|
||||
.HasColumnName("CreatedDate")
|
||||
.HasColumnType("timestamp")
|
||||
.HasColumnType("DateTime")
|
||||
.IsRowVersion();
|
||||
|
||||
entity.Property(e => e.Name)
|
||||
|
||||
Reference in New Issue
Block a user