Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ LEFT JOIN UserCentreDetails ucd
public IEnumerable<SupervisorForEnrolDelegate> GetSupervisorForEnrolDelegate(int CustomisationID, int CentreID)
{
return connection.Query<SupervisorForEnrolDelegate>(
$@"SELECT AdminID, Forename + ' ' + Surname + ' (' + Email +'),' + ' ' + CentreName AS Name, Email FROM AdminUsers AS au
$@"SELECT AdminID, Forename + ' ' + Surname + ' (' + Email +')' AS Name, Email FROM AdminUsers AS au
WHERE (Supervisor = 1) AND (CentreID = @CentreID) AND (CategoryID = 0 OR
CategoryID = (SELECT au.CategoryID FROM Applications AS a INNER JOIN
Customisations AS c ON a.ApplicationID = c.ApplicationID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ public List<AdminUser> GetAdminUsersByCentreId(int centreId)
{
var users = connection.Query<AdminUser>(
@$"{BaseSelectAdminQuery}
WHERE au.Active = 1 AND au.Approved = 1 AND au.CentreId = @centreId",
WHERE au.Active = 1 AND au.Approved = 1 AND au.CentreId = @centreId
ORDER BY au.Forename, au.Surname",
new { centreId }
).ToList();

Expand All @@ -227,10 +228,10 @@ public List<AdminUser> GetAdminUsersByCentreId(int centreId)

public int GetNumberOfAdminsAtCentre(int centreId)
{
var count = connection.ExecuteScalar(
@"SELECT COUNT(*) FROM AdminUsers WHERE CentreID = @centreId",
new { centreId }
);
var count = connection.ExecuteScalar(
@"SELECT COUNT(*) FROM AdminUsers WHERE CentreID = @centreId",
new { centreId }
);
return Convert.ToInt32(count);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private static IEnumerable<SelectListItem> PopulateSupervisors(
IEnumerable<AdminUser> supervisors
)
{
var supervisorIdNames = supervisors.Select(s => (s.Id, s.FullName));
var supervisorIdNames = supervisors.Select(s => (s.Id, s.FullName + " (" + s.EmailAddress + ")"));
return SelectListHelper.MapOptionsToSelectListItems(
supervisorIdNames,
supervisorId
Expand Down