change sort

This commit is contained in:
MahanCh
2025-05-26 17:32:02 +03:30
parent eaaab56421
commit d7eb8517f7
2 changed files with 3 additions and 1 deletions

View File

@@ -67,6 +67,7 @@ public class AdminMonthlyOverviewListViewModel
public long WorkshopId { get; set; }
public string WorkshopName { get; set; }
public string WorkshopArchiveCode { get; set; }
public int WorkshopArchiveCodeInt { get; set; }
public string Province { get; set; }
public string City { get; set; }
public string Address { get; set; }

View File

@@ -161,6 +161,7 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
Id = x.id,
WorkshopName = workshop?.WorkshopFullName ?? "",
WorkshopArchiveCode = workshop?.ArchiveCode ?? "",
WorkshopArchiveCodeInt = Convert.ToInt32(workshop?.ArchiveCode ?? "0"),
Address = workshop?.Address ?? "",
City = workshop?.City ?? "",
Province = workshop?.State ?? "",
@@ -172,7 +173,7 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
AgentPhoneNumber = "",
IsBlock = contractingParty?.IsBlock == "true"
};
}).OrderBy(x => x.IsBlock).ToList();
}).OrderBy(x => x.IsBlock).ThenBy(x=>x.WorkshopArchiveCodeInt).ToList();
return adminMonthlyOverviewList;