diff --git a/EveryThing/Pages/CodeTableItems/Index.cshtml.cs b/EveryThing/Pages/CodeTableItems/Index.cshtml.cs index 5633958..c2fa72b 100644 --- a/EveryThing/Pages/CodeTableItems/Index.cshtml.cs +++ b/EveryThing/Pages/CodeTableItems/Index.cshtml.cs @@ -60,21 +60,8 @@ namespace EveryThing.Pages.CodeTableItems .Where(x => x.IdCompanyFk == user.IdCompanyFk && EF.Functions.Like(x.Title, $"%{searchString}%") || EF.Functions.Like(x.Description, $"%{searchString}%")) - .Include(j => j.Company).Take(100).ToListAsync(); - - //Item = await _context.CodeTableItems - // .Where(x => x.IdCompanyFk == user.IdCompanyFk - // && (!search - // || EF.Functions.Like(x.Title, $"%{searchString}%") - // || (x.Description != null - // && EF.Functions.Like(x.Description, $"%{searchString}%")))) - // .Include(j => j.Company).Take(100).ToListAsync(); - - //if () - //{ - // Item = Item.Where(s => s.Title.Contains(searchString, StringComparison.InvariantCultureIgnoreCase) - // || (s.Description != null && s.Description.Contains(searchString, StringComparison.InvariantCultureIgnoreCase))).ToList(); - //} + .Include(j => j.Company) + .OrderByDescending(x => x.IdItem).Take(100).ToListAsync(); } diff --git a/EveryThing/Pages/Invoices/Edit.cshtml b/EveryThing/Pages/Invoices/Edit.cshtml index 4d52f9b..fcf9d23 100644 --- a/EveryThing/Pages/Invoices/Edit.cshtml +++ b/EveryThing/Pages/Invoices/Edit.cshtml @@ -78,6 +78,7 @@ +