private static string GetFileNameByRole(string defaultName) { string fileName = string.Empty; if (RoleName.IsNotEmpty()) { fileName = RoleName; } else if (RoleCode.IsNotEmpty()) { fileName = RoleCode; } if (fileName.IsNullOrEmpty()) { fileName = defaultName; } return(fileName); }