/// <summary> /// Sets the checkin label (Time, Name, PhoneNumber, etc) /// </summary> /// <param name="rockContext">The rock context.</param> /// <param name="personAliasId">The person alias identifier.</param> /// <param name="rockLiteral">The rock literal.</param> private static void SetCheckinInfoLabel(RockContext rockContext, DateTime?dateTime, int?personAliasId, RockLiteral rockLiteral) { if (dateTime == null) { rockLiteral.Visible = false; } rockLiteral.Text = dateTime.Value.ToShortDateTimeString(); if (!personAliasId.HasValue) { return; } var personAliasService = new PersonAliasService(rockContext); var person = personAliasService.GetSelect(personAliasId.Value, s => s.Person); if (person == null) { return; } var checkedInByPersonName = person.FullName; var checkedInByPersonPhone = person.GetPhoneNumber(Rock.SystemGuid.DefinedValue.PERSON_PHONE_TYPE_MOBILE.AsGuid()); rockLiteral.Text = string.Format("{0 } by {1} {2}", dateTime.Value.ToShortDateTimeString(), checkedInByPersonName, checkedInByPersonPhone); }