/// <summary> /// Sets the value on select. /// </summary> protected override void SetValueOnSelect() { int?connectionRequestId = ItemId.AsIntegerOrNull(); if (connectionRequestId.HasValue) { var connectionRequest = new ConnectionRequestService(new RockContext()).Get(connectionRequestId.Value); SetValue(connectionRequest); } }
/// <summary> /// Sets the value on select. /// </summary> protected override void SetValueOnSelect() { int?entityTypeId = ItemId.AsIntegerOrNull(); if (entityTypeId.HasValue) { var entityType = EntityTypeCache.Get(entityTypeId.Value); SetValue(entityType); } }
/// <summary> /// Sets the value on select. /// </summary> protected override void SetValueOnSelect() { var accountId = ItemId.AsIntegerOrNull(); FinancialAccount account = null; if (accountId.HasValue && accountId > 0) { account = new FinancialAccountService(new RockContext()).Get(accountId.Value); } SetValue(account); }
/// <summary> /// Sets the value on select. /// </summary> protected override void SetValueOnSelect() { var dataViewId = ItemId.AsIntegerOrNull(); DataView dataView = null; if (dataViewId.HasValue && dataViewId > 0) { dataView = new DataViewService(new RockContext()).Get(ItemId.AsInteger()); } SetValue(dataView); }
/// <summary> /// Sets the values on select. /// </summary> protected override void SetValuesOnSelect() { var connectionRequestIds = new List <int>(); foreach (var itemId in ItemIds) { int?connectionRequestId = ItemId.AsIntegerOrNull(); if (connectionRequestId.HasValue) { connectionRequestIds.Add(connectionRequestId.Value); } } var connectionRequests = new ConnectionRequestService(new RockContext()).Queryable().Where(g => connectionRequestIds.Contains(g.Id)); this.SetValues(connectionRequests); }
/// <summary> /// Sets the value on select. /// </summary> protected override void SetValueOnSelect() { this.SetValueFromLocationId(ItemId.AsIntegerOrNull()); }