private string GetSitePrivileges(DataRow dr) { string result = "<b>Privileges: </b>"; ClientPrivilege val = (ClientPrivilege)dr.Field <int>("Privs"); string list = val.ToString(); //creates a comma separated list of enum names if (list == null) { result += "none"; } else { result += list; } return(result); }
public static string[] GetPrivTypes(ClientPrivilege privs) { return(privs.ToString().Split(',').Select(x => x.Trim()).ToArray()); }