private void GetRole(int siteId, string roleName) { if (UseRelatedSiteMode) { siteId = RelatedSiteID; } using (IDataReader reader = DBRoles.GetByName(siteId, roleName)) { if (reader.Read()) { this.roleID = int.Parse(reader["RoleID"].ToString()); this.siteID = int.Parse(reader["SiteID"].ToString()); this.roleName = reader["RoleName"].ToString(); this.displayName = reader["DisplayName"].ToString(); this.siteGuid = new Guid(reader["SiteGuid"].ToString()); this.roleGuid = new Guid(reader["RoleGuid"].ToString()); } } }