how do go to last page in paginator and display new record after a Create and Save process
No , I only use paginator from prime ng after searching i found this solution
this.paginator.first = this.paginator.paginatorState.rows * (this.paginator.paginatorState.pageCount-1);
You have existing fields like Creation , Deletion , Last Modification which is automatically updated I want to add Cancelled Date / Time , Cancelled by
{"The column 'RowNumber' was specified multiple times for 't2'.\r\nThe multi-part identifier "t1.RowNumber" could not be bound.\r\nThe multi-part identifier "t1.RowNumber" could not be bound.\r\nThe column 'RowNumber' was specified multiple times for 't'."}
019-10-24 ASP.NET CORE & Angular .NET Core 2.2 v7.2.3
try { var result = new PagedResultDto<GetProductProfileForViewDto>( totalCount, await productProfiles.ToListAsync() ); return result; } catch (Exception err) {
// error here .....
}
public async Task Delete(EntityDto input) { int parentID = _estimatecuttinglistRepository.FirstOrDefault(input.Id).parentID;
_estimatecuttinglistRepository.Delete(input.Id); -- records not deleted
await Updateitemno(parentID, true); -- executed
}
I having problem when deleting records after i insert the Updateitemno command.
No errors found. it seems updateitemno method is affecting the delete command. it works when i remove updateitemno method.
public Task Updateitemno(int parentID, bool isNew) { DNEthanRepositoryExtensions.updateitemno<Estimatecuttinglist, int>(_estimatecuttinglistRepository, parentID, isNew); return Task.CompletedTask; }
public static void updateitemno<TEntity, TPrimaryKey>(this IRepository<TEntity, TPrimaryKey> repository, int parentID , bool isNeworDelete) where TEntity : class, IEntity<TPrimaryKey>, IMayHaveItemno
{
if (!isNeworDelete)
return;
var item = from db in repository.GetAll()
where db.parentID == parentID
orderby db.itemno
select db;
int itemno = 1;
foreach (var row in item)
{
row.itemno = itemno;
repository.Update(row);
itemno++;
}
}