예제 #1
0
        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);
        }
예제 #2
0
 public static string[] GetPrivTypes(ClientPrivilege privs)
 {
     return(privs.ToString().Split(',').Select(x => x.Trim()).ToArray());
 }