public static string GetTitle(this RegionalTeam regionalTeam) { switch (regionalTeam) { case RegionalTeam.NorthWest: return("North West"); case RegionalTeam.YorkshireAndHumberside: return("Yorkshire and Humberside"); case RegionalTeam.EastMidlands: return("East Midlands"); case RegionalTeam.WestMidlands: return("West Midlands"); case RegionalTeam.EastAnglia: return("East Anglia"); case RegionalTeam.SouthEast: return("South East"); case RegionalTeam.SouthWest: return("South West"); default: return(regionalTeam.ToString()); } }
private static List <SelectListItem> GetRegionalTeamsSelectList(RegionalTeam regionalTeam) { var regionalTeams = Enum.GetValues(typeof(RegionalTeam)) .Cast <RegionalTeam>() .Where(rt => rt != RegionalTeam.Other) .Select(rt => new SelectListItem { Value = rt.ToString(), Text = rt.GetTitle(), Selected = rt == regionalTeam }) .ToList(); return(regionalTeams); }
public ActionResult ChangeTeam(RegionalTeam regionalTeam, VacanciesSummaryFilterTypes filterType, string searchString, ManageVacancySearchMode searchMode) { var claimsPrincipal = (ClaimsPrincipal)User; _agencyUserMediator.SaveAgencyUser(claimsPrincipal, new AgencyUserViewModel { RegionalTeam = regionalTeam }); return(RedirectToRoute(ManagementRouteNames.Dashboard, new DashboardVacancySummariesSearchViewModel { FilterType = filterType, Mode = DashboardVacancySummariesMode.Review, SearchString = searchString, SearchMode = searchMode })); }
public void GetTitleTest(RegionalTeam regionalTeam, string expectedTitle) { var title = regionalTeam.GetTitle(); title.Should().Be(expectedTitle); }
public AgencyUserBuilder WithRegionalTeam(RegionalTeam regionalTeam) { _regionalTeam = regionalTeam; return(this); }
public AgencyUserBuilder(string username) { _username = username; _role = RoleListFactory.GetRole("QA_advisor", "QA advisor", true); _regionalTeam = RegionalTeam.North; }