/// <summary> /// Helper method for converting a campus' guid to its name /// </summary> /// <returns>The identifier to name.</returns> public string CampusGuidToName(Guid campusGuid) { // guard against old, bad values. Rock.Client.Campus campusObj = Campuses.Find(c => c.Guid == campusGuid); return(campusObj != null ? campusObj.Name : ""); }
/// <summary> /// Helper method for converting a campus' name to its ID /// </summary> /// <returns>The name to identifier.</returns> public int CampusNameToId(string campusName) { Rock.Client.Campus campusObj = Campuses.Find(c => c.Name == campusName); return(campusObj != null ? campusObj.Id : 0); }
public Rock.Client.Campus CampusFromId(int campusId) { return(Campuses.Find(c => c.Id == campusId)); }