Exemplo n.º 1
0
 /// <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 : "");
 }
Exemplo n.º 2
0
 /// <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);
 }
Exemplo n.º 3
0
 public Rock.Client.Campus CampusFromId(int campusId)
 {
     return(Campuses.Find(c => c.Id == campusId));
 }