Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using System.Linq;
- namespace Lexily.ManagmentUsersApplication.Helpers
- {
- public static class UserRoles
- {
- public static string Administrator { get; set; } = "administrator";
- public static string HumanResourcesManager { get; set; } = "human-resources-manager";
- }
- public static class EnumHelper
- {
- /// <returns>Data format: user role enum id on user service - role display name</returns>
- public static List<KeyValuePair<string, string>> GetUserRolesDisplayNames()
- {
- var response = new List<KeyValuePair<string, string>>();
- response.Add(new KeyValuePair<string, string>("None", "None"));//remove
- response.Add(new KeyValuePair<string, string>("Customer", "Customer"));
- response.Add(new KeyValuePair<string, string>("Engineer", "Engineer"));
- response.Add(new KeyValuePair<string, string>("EngineeringGroupLead", "Engineering group lead"));
- response.Add(new KeyValuePair<string, string>("QualityAssurance", "Quality assurance"));
- response.Add(new KeyValuePair<string, string>("QualityAssuranceGroupLead", "Quality assurance group lead"));
- response.Add(new KeyValuePair<string, string>("LeadOfEngineering", "Lead of engineering"));
- response.Add(new KeyValuePair<string, string>("ProjectManager", "Project manager"));
- response.Add(new KeyValuePair<string, string>("LeadOfProjectManagement", "Lead of project management"));
- response.Add(new KeyValuePair<string, string>("HeadOfProjectManagement", "Head of project management"));
- response.Add(new KeyValuePair<string, string>("SalesManager", "Sales manager"));
- response.Add(new KeyValuePair<string, string>("SalesManagementGroupLead", "Sales management group lead"));
- response.Add(new KeyValuePair<string, string>("LeadOfSales", "Lead of sales"));
- response.Add(new KeyValuePair<string, string>("HumanResourcesManager", "Human resources manager"));
- response.Add(new KeyValuePair<string, string>("HumanResourcesManagementGroupLead", "Human resources management group lead"));
- response.Add(new KeyValuePair<string, string>("LeadOfHumanResources", "Lead of human resources"));
- response.Add(new KeyValuePair<string, string>("Student", "Student"));
- response.Add(new KeyValuePair<string, string>("LearningManager", "Learning manager"));
- response.Add(new KeyValuePair<string, string>("LearningManagementGroupLead", "Learning management group lead"));
- response.Add(new KeyValuePair<string, string>("LeadOfLearningManagement", "Lead of learning management"));
- response.Add(new KeyValuePair<string, string>("Administrator", "Administrator"));//remove
- return response.Select(x=> new KeyValuePair<string, string>(x.Key, x.Value.ToTitleCase())).OrderBy(x => x.Value).ToList();
- }
- /// <returns>Data format: department type enum id on user service - role display name</returns>
- public static List<KeyValuePair<string, string>> GetDepartmentsTypesDisplayNames()
- {
- var response = new List<KeyValuePair<string, string>>();
- response.Add(new KeyValuePair<string, string>("None", "None"));//remove
- response.Add(new KeyValuePair<string, string>("Development", "Development"));
- response.Add(new KeyValuePair<string, string>("ProjectManagement", "Project management"));
- response.Add(new KeyValuePair<string, string>("SalesManagement", "Sales management"));
- response.Add(new KeyValuePair<string, string>("HumanResourcesManagement", "Human resources management"));
- response.Add(new KeyValuePair<string, string>("MarketingManagement", "Marketing management"));
- response.Add(new KeyValuePair<string, string>("LearningManagement", "Learning management"));
- response.Add(new KeyValuePair<string, string>("FinancialManagement", "Financial management"));
- return response.Select(x=> new KeyValuePair<string, string>(x.Key, x.Value.ToTitleCase())).OrderBy(x => x.Value).ToList();
- }
- public static List<KeyValuePair<string, string>> GetTimezonesDisplayNames()
- {
- var response = new List<KeyValuePair<string, string>>();
- response.Add(new KeyValuePair<string, string>("UTC", "UTC"));
- return response.Select(x=> new KeyValuePair<string, string>(x.Key, x.Value.ToTitleCase())).OrderBy(x => x.Value).ToList();
- }
- /// <returns>Data format: user status enum id on user service - role display name</returns>
- public static List<KeyValuePair<string, string>> GetUserStatusesDisplayNames()
- {
- var response = new List<KeyValuePair<string, string>>();
- response.Add(new KeyValuePair<string, string>("Active", "Active"));
- response.Add(new KeyValuePair<string, string>("Inactive", "Inactive"));
- return response.Select(x=> new KeyValuePair<string, string>(x.Key, x.Value.ToTitleCase())).OrderBy(x => x.Value).ToList();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement